mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-11 04:12:36 -03:00
cli: add multiwallet capability to GetNewAddress and -generate
This commit is contained in:
parent
18f93545a1
commit
4b859cfff9
1 changed files with 3 additions and 1 deletions
|
@ -538,8 +538,10 @@ static void GetWalletBalances(UniValue& result)
|
||||||
*/
|
*/
|
||||||
static UniValue GetNewAddress()
|
static UniValue GetNewAddress()
|
||||||
{
|
{
|
||||||
|
Optional<std::string> wallet_name{};
|
||||||
|
if (gArgs.IsArgSet("-rpcwallet")) wallet_name = gArgs.GetArg("-rpcwallet", "");
|
||||||
std::unique_ptr<BaseRequestHandler> rh{MakeUnique<DefaultRequestHandler>()};
|
std::unique_ptr<BaseRequestHandler> rh{MakeUnique<DefaultRequestHandler>()};
|
||||||
return ConnectAndCallRPC(rh.get(), "getnewaddress", /* args=*/{});
|
return ConnectAndCallRPC(rh.get(), "getnewaddress", /* args=*/{}, wallet_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue