aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-12-08 19:00:54 +0100
committerMarcoFalke <falke.marco@gmail.com>2021-12-08 19:43:24 +0100
commitfaa0833c43b089d502e625ea6189d56ff7a419ae (patch)
tree666e22abd9c9881bf214b0059a9c79dc580595eb
parentf727d814bd8df5a5346c128dd4573e457c1970e1 (diff)
downloadbitcoin-faa0833c43b089d502e625ea6189d56ff7a419ae.tar.xz
doc: Normalize RPC description whitespace
-rw-r--r--src/rpc/misc.cpp2
-rw-r--r--src/rpc/util.cpp3
-rwxr-xr-xtest/functional/rpc_generate.py4
3 files changed, 4 insertions, 5 deletions
diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp
index 3716d58d4b..62e7ebec63 100644
--- a/src/rpc/misc.cpp
+++ b/src/rpc/misc.cpp
@@ -301,7 +301,7 @@ static RPCHelpMan deriveaddresses()
static RPCHelpMan verifymessage()
{
return RPCHelpMan{"verifymessage",
- "\nVerify a signed message\n",
+ "Verify a signed message.",
{
{"address", RPCArg::Type::STR, RPCArg::Optional::NO, "The bitcoin address to use for the signature."},
{"signature", RPCArg::Type::STR, RPCArg::Optional::NO, "The signature provided by the signer in base 64 encoding (see signmessage)."},
diff --git a/src/rpc/util.cpp b/src/rpc/util.cpp
index 683cf88af8..4a5cd0a4be 100644
--- a/src/rpc/util.cpp
+++ b/src/rpc/util.cpp
@@ -620,10 +620,9 @@ std::string RPCHelpMan::ToString() const
ret += arg.ToString(/* oneline */ true);
}
if (was_optional) ret += " )";
- ret += "\n";
// Description
- ret += m_description;
+ ret += "\n\n" + TrimString(m_description) + "\n";
// Arguments
Sections sections;
diff --git a/test/functional/rpc_generate.py b/test/functional/rpc_generate.py
index e55f2e6d12..ac44f0b7f7 100755
--- a/test/functional/rpc_generate.py
+++ b/test/functional/rpc_generate.py
@@ -17,9 +17,9 @@ class RPCGenerateTest(BitcoinTestFramework):
def run_test(self):
message = (
- "generate\n"
+ "generate\n\n"
"has been replaced by the -generate "
- "cli option. Refer to -help for more information."
+ "cli option. Refer to -help for more information.\n"
)
self.log.info("Test rpc generate raises with message to use cli option")