mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-24 22:09:20 +02:00
Merge #19969: Send RPC bug fix and touch-ups
f7b331ea85rpc: add brackets to ConstructTransaction (Sjors Provoost)d813d26f06[rpc] send: various touch-ups (Sjors Provoost)0fc1c685e1[rpc] send: fix parsing replaceable option (Sjors Provoost)efc9b85e6fMark 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: utACKf7b331ea85fjahr: utACKf7b331ea85kallewoof: ACKf7b331ea85Tree-SHA512: 82dd8ac76a6558872db3f5249d4d6440469400aaa339153bc627d1ee673a91ecfadecb486bc1939ba87ebbd80e26ff29698e93e358599f3d26fde0e526892afe
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user