rpc: Reject beginning newline in RPC docs

It is harmless, but a bit confusing and not needed for new code.

Also, update the remaining instances that were not found by the
scripted-diff.
This commit is contained in:
MarcoFalke
2025-05-15 15:26:17 +02:00
parent fa414eda08
commit fae840e94b
4 changed files with 15 additions and 10 deletions

View File

@@ -156,11 +156,12 @@ static RPCHelpMan help()
static RPCHelpMan stop()
{
static const std::string RESULT{CLIENT_NAME " stopping"};
return RPCHelpMan{"stop",
return RPCHelpMan{
"stop",
// Also accept the hidden 'wait' integer argument (milliseconds)
// For instance, 'stop 1000' makes the call wait 1 second before returning
// to the client (intended for testing)
"\nRequest a graceful shutdown of " CLIENT_NAME ".",
"Request a graceful shutdown of " CLIENT_NAME ".",
{
{"wait", RPCArg::Type::NUM, RPCArg::Optional::OMITTED, "how long to wait in ms", RPCArgOptions{.hidden=true}},
},