mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-12 09:52:21 +02: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()
|
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…
x
Reference in New Issue
Block a user