aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2020-09-29 14:35:28 +0800
committerfanquake <fanquake@gmail.com>2020-09-29 15:14:08 +0800
commite36aa351a31cde0f95ce957b2ff593a97f91eb6d (patch)
tree1aed9bf37a14f4b855ea1da2941553b4fc64bf85 /src/rpc
parent7ea649946daa421ed7dfa478cbb0bcf2de3cc2f8 (diff)
parentf7b331ea85d45c7337e527b6e77a45da7a689b7d (diff)
Merge #19969: Send RPC bug fix and touch-ups
f7b331ea85d45c7337e527b6e77a45da7a689b7d rpc: add brackets to ConstructTransaction (Sjors Provoost) d813d26f06248aaa7be3c698c87939cc777fafd0 [rpc] send: various touch-ups (Sjors Provoost) 0fc1c685e1ca68ca8ed2b35f623bbe6a9fc36d66 [rpc] send: fix parsing replaceable option (Sjors Provoost) efc9b85e6f4aa431d308089874a18f0bbdcdd0fd Mark send RPC experimental (Sjors Provoost) Pull request description: Followup based on #16378 nits. It also fixes an argument parsing error (uncaught because the test wasn't sufficiently thorough). I marked the RPC as experimental so we can tweak it a bit over the next release cycle. ACKs for top commit: meshcollider: utACK f7b331ea85d45c7337e527b6e77a45da7a689b7d fjahr: utACK f7b331ea85d45c7337e527b6e77a45da7a689b7d kallewoof: ACK f7b331ea85d45c7337e527b6e77a45da7a689b7d Tree-SHA512: 82dd8ac76a6558872db3f5249d4d6440469400aaa339153bc627d1ee673a91ecfadecb486bc1939ba87ebbd80e26ff29698e93e358599f3d26fde0e526892afe
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/rawtransaction_util.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/rpc/rawtransaction_util.cpp b/src/rpc/rawtransaction_util.cpp
index cfe4575090..8dfbead0e4 100644
--- a/src/rpc/rawtransaction_util.cpp
+++ b/src/rpc/rawtransaction_util.cpp
@@ -21,14 +21,16 @@
CMutableTransaction ConstructTransaction(const UniValue& inputs_in, const UniValue& outputs_in, const UniValue& locktime, bool rbf)
{
- if (outputs_in.isNull())
+ if (outputs_in.isNull()) {
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter, output argument must be non-null");
+ }
UniValue inputs;
- if (inputs_in.isNull())
+ if (inputs_in.isNull()) {
inputs = UniValue::VARR;
- else
+ } else {
inputs = inputs_in.get_array();
+ }
const bool outputs_is_obj = outputs_in.isObject();
UniValue outputs = outputs_is_obj ? outputs_in.get_obj() : outputs_in.get_array();