Skip to content

Commit

Permalink
rpc: add brackets to ConstructTransaction
Browse files Browse the repository at this point in the history
  • Loading branch information
Sjors committed Sep 17, 2020
1 parent d813d26 commit f7b331e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/rpc/rawtransaction_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit f7b331e

Please sign in to comment.