Skip to content

Commit

Permalink
Merge bitcoin#13968: [wallet] couple of walletcreatefundedpsbt fixes
Browse files Browse the repository at this point in the history
faaac5c RPCTypeCheck bip32derivs arg in walletcreatefunded (Gregory Sanders)
1f0c428 QA: add basic walletcreatefunded optional arg test (Gregory Sanders)
1f18d7b walletcreatefundedpsbt: remove duplicate replaceable arg (Gregory Sanders)
2252ec5 Allow ConstructTransaction to not throw error with 0-input txn (Gregory Sanders)

Pull request description:

  1) Previously an empty input argument transaction that is marked for replaceability fails to pass the `SignalsOptInRBF` check right before funding it. Explicitly check for that condition before throwing an error.

  2) The rpc call had two separate `replaceable` arguments, each of which being used in mutually exclusive places. I preserved the `options` version to retain compatability with `fundtransaction`.

Tree-SHA512: 26eb0c9e2d38ea51d11f741d61100223253271a084adadeb7e78c6d4e9004636f089e4273c5bf64a41bd7e9ff795317acf30531cb36aeb0d8db9304b3c8270c3
  • Loading branch information
laanwj authored and Munkybooty committed Jan 26, 2022
1 parent 0ed9f56 commit 2948eef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wallet/rpcwallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4030,7 +4030,7 @@ UniValue walletcreatefundedpsbt(const JSONRPCRequest& request)
return NullUniValue;
}

if (request.fHelp || request.params.size() < 2 || request.params.size() > 6)
if (request.fHelp || request.params.size() < 2 || request.params.size() > 5)
throw std::runtime_error(
RPCHelpMan{"walletcreatefundedpsbt",
"\nCreates and funds a transaction in the Partially Signed Transaction format. Inputs will be added if supplied inputs are not enough\n"
Expand Down

0 comments on commit 2948eef

Please sign in to comment.