doc: add rpc guidance for boolean verbosity avoidance

pull/31043/head
tdb3 2 weeks ago
parent 698f302df8
commit 7a2e6b68cd
No known key found for this signature in database

@ -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.

Loading…
Cancel
Save