Skip to content

Commit 304ece9

Browse files
committed
rpc: document bools in FillPSBT() calls
1 parent e88a52e commit 304ece9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/wallet/rpc/spend.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ static UniValue FinishTransaction(const std::shared_ptr<CWallet> pwallet, const
8282
PartiallySignedTransaction psbtx(rawTx);
8383

8484
// First fill transaction with our data without signing,
85-
// so external signers are not asked sign more than once.
85+
// so external signers are not asked to sign more than once.
8686
bool complete;
87-
pwallet->FillPSBT(psbtx, complete, SIGHASH_DEFAULT, false, true);
88-
const TransactionError err{pwallet->FillPSBT(psbtx, complete, SIGHASH_DEFAULT, true, false)};
87+
pwallet->FillPSBT(psbtx, complete, SIGHASH_DEFAULT, /*sign=*/false, /*bip32derivs=*/true);
88+
const TransactionError err{pwallet->FillPSBT(psbtx, complete, SIGHASH_DEFAULT, /*sign=*/true, /*bip32derivs=*/false)};
8989
if (err != TransactionError::OK) {
9090
throw JSONRPCTransactionError(err);
9191
}
@@ -1100,7 +1100,7 @@ static RPCHelpMan bumpfee_helper(std::string method_name)
11001100
} else {
11011101
PartiallySignedTransaction psbtx(mtx);
11021102
bool complete = false;
1103-
const TransactionError err = pwallet->FillPSBT(psbtx, complete, SIGHASH_DEFAULT, false /* sign */, true /* bip32derivs */);
1103+
const TransactionError err = pwallet->FillPSBT(psbtx, complete, SIGHASH_DEFAULT, /*sign=*/false, /*bip32derivs=*/true);
11041104
CHECK_NONFATAL(err == TransactionError::OK);
11051105
CHECK_NONFATAL(!complete);
11061106
CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
@@ -1675,7 +1675,7 @@ RPCHelpMan walletcreatefundedpsbt()
16751675
// Fill transaction with out data but don't sign
16761676
bool bip32derivs = request.params[4].isNull() ? true : request.params[4].get_bool();
16771677
bool complete = true;
1678-
const TransactionError err{wallet.FillPSBT(psbtx, complete, 1, false, bip32derivs)};
1678+
const TransactionError err{wallet.FillPSBT(psbtx, complete, 1, /*sign=*/false, /*bip32derivs=*/bip32derivs)};
16791679
if (err != TransactionError::OK) {
16801680
throw JSONRPCTransactionError(err);
16811681
}

0 commit comments

Comments
 (0)