From 7a2e6b68cd928a32dd307273727a85890a74c7da Mon Sep 17 00:00:00 2001 From: tdb3 <106488469+tdb3@users.noreply.github.com> Date: Fri, 25 Oct 2024 12:04:24 -0400 Subject: [PATCH] doc: add rpc guidance for boolean verbosity avoidance --- doc/developer-notes.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/developer-notes.md b/doc/developer-notes.md index 952dbc77a0d..81eeac88f56 100644 --- a/doc/developer-notes.md +++ b/doc/developer-notes.md @@ -1397,6 +1397,12 @@ A few guidelines for introducing and reviewing new RPC interfaces: to a multi-value, or due to other historical reasons. **Always** have false map to 0 and true to 1 in this case. +- For new RPC methods, if implementing a `verbosity` argument, use integer verbosity rather than boolean. + Disallow usage of boolean verbosity (see `ParseVerbosity()` in [util.h](/src/rpc/util.h)). + + - *Rationale*: Integer verbosity allows for multiple values. Undocumented boolean verbosity is deprecated + and new RPC methods should prevent its use. + - Don't forget to fill in the argument names correctly in the RPC command table. - *Rationale*: If not, the call cannot be used with name-based arguments.