mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 02:25:40 +01:00
cli: add multiwallet capability to GetNewAddress and -generate
This commit is contained in:
parent
18f93545a1
commit
4b859cfff9
@ -538,8 +538,10 @@ static void GetWalletBalances(UniValue& result)
|
||||
*/
|
||||
static UniValue GetNewAddress()
|
||||
{
|
||||
Optional<std::string> wallet_name{};
|
||||
if (gArgs.IsArgSet("-rpcwallet")) wallet_name = gArgs.GetArg("-rpcwallet", "");
|
||||
std::unique_ptr<BaseRequestHandler> rh{MakeUnique<DefaultRequestHandler>()};
|
||||
return ConnectAndCallRPC(rh.get(), "getnewaddress", /* args=*/{});
|
||||
return ConnectAndCallRPC(rh.get(), "getnewaddress", /* args=*/{}, wallet_name);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user