aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorJon Atack <jon@atack.com>2020-11-05 06:34:01 +0100
committerJon Atack <jon@atack.com>2020-11-11 15:55:46 +0100
commit3f7279161347543ce4e997d78ea89a4043491145 (patch)
tree405a3b40795572558bd39ee9d8919a7f2501f470 /src/wallet
parent155bf91c3b66e3ec9f870d8161e1a3c9a5c23251 (diff)
downloadbitcoin-3f7279161347543ce4e997d78ea89a4043491145.tar.xz
wallet: fix bug in RPC send options
when empty, options were not being populated by arguments of the same name found while adding test coverage in 603c0050
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/rpcwallet.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index ebcab1227d..4a3212e6fe 100644
--- a/src/wallet/rpcwallet.cpp
+++ b/src/wallet/rpcwallet.cpp
@@ -4087,7 +4087,7 @@ static RPCHelpMan send()
if (!wallet) return NullUniValue;
CWallet* const pwallet = wallet.get();
- UniValue options = request.params[3];
+ UniValue options{request.params[3].isNull() ? UniValue::VOBJ : request.params[3]};
if (options.exists("feeRate") || options.exists("fee_rate") || options.exists("estimate_mode") || options.exists("conf_target")) {
if (!request.params[1].isNull() || !request.params[2].isNull()) {
throw JSONRPCError(RPC_INVALID_PARAMETER, "Use either conf_target and estimate_mode or the options dictionary to control fee rate");