cli: add multiwallet capability to GetNewAddress and -generate
This commit is contained in:
1 file changed
+3
-1
+3
-1
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in new issue
Block a user