aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSjors Provoost <sjors@sprovoost.nl>2021-03-26 10:28:37 +0100
committerSjors Provoost <sjors@sprovoost.nl>2021-04-08 17:56:00 +0200
commit88d4d5ff2f5c71a9a2f4c78c2b2e2fd00568cfee (patch)
treee8585072ff643c460a99b142f218b2a8fca956e1
parentb0db187e5b30a491c9f95685430a82a1e35e921d (diff)
downloadbitcoin-88d4d5ff2f5c71a9a2f4c78c2b2e2fd00568cfee.tar.xz
rpc: add help for enumeratesigners and walletdisplayaddress
-rw-r--r--src/rpc/external_signer.cpp11
-rw-r--r--src/wallet/rpcwallet.cpp8
2 files changed, 11 insertions, 8 deletions
diff --git a/src/rpc/external_signer.cpp b/src/rpc/external_signer.cpp
index 628c684215..0f8f197ad8 100644
--- a/src/rpc/external_signer.cpp
+++ b/src/rpc/external_signer.cpp
@@ -13,8 +13,7 @@
static RPCHelpMan enumeratesigners()
{
- return RPCHelpMan{
- "enumeratesigners",
+ return RPCHelpMan{"enumeratesigners",
"Returns a list of external signers from -signer.",
{},
RPCResult{
@@ -28,8 +27,12 @@ static RPCHelpMan enumeratesigners()
}
}
},
- RPCExamples{""},
- [](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue {
+ RPCExamples{
+ HelpExampleCli("enumeratesigners", "")
+ + HelpExampleRpc("enumeratesigners", "")
+ },
+ [&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
+ {
const std::string command = gArgs.GetArg("-signer", "");
if (command == "") throw JSONRPCError(RPC_MISC_ERROR, "Error: restart bitcoind with -signer=<cmd>");
std::string chain = gArgs.GetChainName();
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index dc821dc06d..a3e42a34d9 100644
--- a/src/wallet/rpcwallet.cpp
+++ b/src/wallet/rpcwallet.cpp
@@ -4529,9 +4529,8 @@ static RPCHelpMan upgradewallet()
#ifdef ENABLE_EXTERNAL_SIGNER
static RPCHelpMan walletdisplayaddress()
{
- return RPCHelpMan{
- "walletdisplayaddress",
- "Display address on an external signer for verification.\n",
+ return RPCHelpMan{"walletdisplayaddress",
+ "Display address on an external signer for verification.",
{
{"address", RPCArg::Type::STR, RPCArg::Optional::NO, /* default_val */ "", "bitcoin address to display"},
},
@@ -4542,7 +4541,8 @@ static RPCHelpMan walletdisplayaddress()
}
},
RPCExamples{""},
- [](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue {
+ [&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
+ {
std::shared_ptr<CWallet> const wallet = GetWalletForJSONRPCRequest(request);
if (!wallet) return NullUniValue;
CWallet* const pwallet = wallet.get();