diff options
| author | Jon Atack <[email protected]> | 2020-05-03 11:10:24 +0200 |
|---|---|---|
| committer | Jon Atack <[email protected]> | 2020-05-21 10:24:23 +0200 |
| commit | afce85eb994384246e455b766549c3206cb059e0 (patch) | |
| tree | eb1a9fe559c95699df28555eb058d004b28fcd57 /src/bitcoin-cli.cpp | |
| parent | cli: create GetWalletBalances() to fetch multiwallet balances (diff) | |
| download | discoin-afce85eb994384246e455b766549c3206cb059e0.tar.xz discoin-afce85eb994384246e455b766549c3206cb059e0.zip | |
cli: use GetWalletBalances() functionality for -getinfo
and replace GetBoolArg with IsArgSet as we only want
to know if the arg is passed; we do not need the value.
Diffstat (limited to 'src/bitcoin-cli.cpp')
| -rw-r--r-- | src/bitcoin-cli.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp index 4d5b8f847..045442c9f 100644 --- a/src/bitcoin-cli.cpp +++ b/src/bitcoin-cli.cpp @@ -532,9 +532,8 @@ static int CommandLineRPC(int argc, char *argv[]) } std::unique_ptr<BaseRequestHandler> rh; std::string method; - if (gArgs.GetBoolArg("-getinfo", false)) { + if (gArgs.IsArgSet("-getinfo")) { rh.reset(new GetinfoRequestHandler()); - method = ""; } else { rh.reset(new DefaultRequestHandler()); if (args.size() < 1) { @@ -567,6 +566,9 @@ static int CommandLineRPC(int argc, char *argv[]) } } } else { + if (gArgs.IsArgSet("-getinfo") && !gArgs.IsArgSet("-rpcwallet")) { + GetWalletBalances(result); // fetch multiwallet balances and append to result + } // Result if (result.isNull()) { strPrint = ""; |