From f7b331ea85d45c7337e527b6e77a45da7a689b7d Mon Sep 17 00:00:00 2001 From: Sjors Provoost Date: Thu, 17 Sep 2020 15:29:32 +0200 Subject: [PATCH] rpc: add brackets to ConstructTransaction --- src/rpc/rawtransaction_util.cpp | 8 +++++--- 1 file 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();