diff options
author | stickies-v <stickies-v@protonmail.com> | 2024-01-18 17:27:50 +0000 |
---|---|---|
committer | stickies-v <stickies-v@protonmail.com> | 2024-03-01 13:51:21 +0000 |
commit | 30a6c999351041d6a1e8712a9659be1296a1b46a (patch) | |
tree | fd475a5328acaba8f2177c36396222d60312a8a1 /src/wallet/rpc | |
parent | bbb31269bfa449e82d3b6a20c2c3481fb3dcc316 (diff) | |
download | bitcoin-30a6c999351041d6a1e8712a9659be1296a1b46a.tar.xz |
rpc: access some args by name
Use the new key-based Arg helper in a few locations to show how
it is used.
Diffstat (limited to 'src/wallet/rpc')
-rw-r--r-- | src/wallet/rpc/coins.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/wallet/rpc/coins.cpp b/src/wallet/rpc/coins.cpp index 0cb0891141..b6c7396f4b 100644 --- a/src/wallet/rpc/coins.cpp +++ b/src/wallet/rpc/coins.cpp @@ -194,15 +194,12 @@ RPCHelpMan getbalance() LOCK(pwallet->cs_wallet); - const auto dummy_value{self.MaybeArg<std::string>(0)}; + const auto dummy_value{self.MaybeArg<std::string>("dummy")}; if (dummy_value && *dummy_value != "*") { throw JSONRPCError(RPC_METHOD_DEPRECATED, "dummy first argument must be excluded or set to \"*\"."); } - int min_depth = 0; - if (!request.params[1].isNull()) { - min_depth = request.params[1].getInt<int>(); - } + const auto min_depth{self.Arg<int>("minconf")}; bool include_watchonly = ParseIncludeWatchonly(request.params[2], *pwallet); |