Skip to content

Commit 5cb7ac2

Browse files
committed
rpc: fix docs for bumpfee psbt update
- "psbt" field is only returned in psbtbumpfee and not bumpfee - bumpfee raises if privkeys are disabled, so drop "Only returned when wallet private keys are enabled." - add missing space in RPC example
1 parent eb4df9a commit 5cb7ac2

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/wallet/rpcwallet.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3430,12 +3430,10 @@ static RPCHelpMan bumpfee_helper(std::string method_name)
34303430
"options"},
34313431
},
34323432
RPCResult{
3433-
RPCResult::Type::OBJ, "", "", Cat(Cat<std::vector<RPCResult>>(
3434-
{
3435-
{RPCResult::Type::STR, "psbt", "The base64-encoded unsigned PSBT of the new transaction."},
3436-
},
3437-
want_psbt ? std::vector<RPCResult>{} : std::vector<RPCResult>{{RPCResult::Type::STR_HEX, "txid", "The id of the new transaction. Only returned when wallet private keys are enabled."}}
3438-
),
3433+
RPCResult::Type::OBJ, "", "", Cat(
3434+
want_psbt ?
3435+
std::vector<RPCResult>{{RPCResult::Type::STR, "psbt", "The base64-encoded unsigned PSBT of the new transaction."}} :
3436+
std::vector<RPCResult>{{RPCResult::Type::STR_HEX, "txid", "The id of the new transaction."}},
34393437
{
34403438
{RPCResult::Type::STR_AMOUNT, "origfee", "The fee of the replaced transaction."},
34413439
{RPCResult::Type::STR_AMOUNT, "fee", "The fee of the new transaction."},
@@ -3446,7 +3444,7 @@ static RPCHelpMan bumpfee_helper(std::string method_name)
34463444
})
34473445
},
34483446
RPCExamples{
3449-
"\nBump the fee, get the new transaction\'s" + std::string(want_psbt ? "psbt" : "txid") + "\n" +
3447+
"\nBump the fee, get the new transaction\'s " + std::string(want_psbt ? "psbt" : "txid") + "\n" +
34503448
HelpExampleCli(method_name, "<txid>")
34513449
},
34523450
[want_psbt](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue

0 commit comments

Comments
 (0)