aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Atack <jon@atack.com>2021-05-21 21:57:49 +0200
committerJon Atack <jon@atack.com>2021-05-22 09:22:14 +0200
commit5cb7ac23fb97a0cbc75b7eef0951da0e0bc5292b (patch)
treec021f7b07d943e9114e43cf71d86cc75a03425b6
parenteb4df9a628bdcdd1333c7fa4fb23c73df9642902 (diff)
downloadbitcoin-5cb7ac23fb97a0cbc75b7eef0951da0e0bc5292b.tar.xz
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
-rw-r--r--src/wallet/rpcwallet.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index 4e3c8ce49d..8aac9f8f25 100644
--- a/src/wallet/rpcwallet.cpp
+++ b/src/wallet/rpcwallet.cpp
@@ -3430,12 +3430,10 @@ static RPCHelpMan bumpfee_helper(std::string method_name)
"options"},
},
RPCResult{
- RPCResult::Type::OBJ, "", "", Cat(Cat<std::vector<RPCResult>>(
- {
- {RPCResult::Type::STR, "psbt", "The base64-encoded unsigned PSBT of the new transaction."},
- },
- 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."}}
- ),
+ RPCResult::Type::OBJ, "", "", Cat(
+ want_psbt ?
+ std::vector<RPCResult>{{RPCResult::Type::STR, "psbt", "The base64-encoded unsigned PSBT of the new transaction."}} :
+ std::vector<RPCResult>{{RPCResult::Type::STR_HEX, "txid", "The id of the new transaction."}},
{
{RPCResult::Type::STR_AMOUNT, "origfee", "The fee of the replaced transaction."},
{RPCResult::Type::STR_AMOUNT, "fee", "The fee of the new transaction."},
@@ -3446,7 +3444,7 @@ static RPCHelpMan bumpfee_helper(std::string method_name)
})
},
RPCExamples{
- "\nBump the fee, get the new transaction\'s" + std::string(want_psbt ? "psbt" : "txid") + "\n" +
+ "\nBump the fee, get the new transaction\'s " + std::string(want_psbt ? "psbt" : "txid") + "\n" +
HelpExampleCli(method_name, "<txid>")
},
[want_psbt](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue