Skip to content

Commit 7a2e6b6

Browse files
committed
doc: add rpc guidance for boolean verbosity avoidance
1 parent 698f302 commit 7a2e6b6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

doc/developer-notes.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1397,6 +1397,12 @@ A few guidelines for introducing and reviewing new RPC interfaces:
13971397
to a multi-value, or due to other historical reasons. **Always** have false map to 0 and
13981398
true to 1 in this case.
13991399

1400+
- For new RPC methods, if implementing a `verbosity` argument, use integer verbosity rather than boolean.
1401+
Disallow usage of boolean verbosity (see `ParseVerbosity()` in [util.h](/src/rpc/util.h)).
1402+
1403+
- *Rationale*: Integer verbosity allows for multiple values. Undocumented boolean verbosity is deprecated
1404+
and new RPC methods should prevent its use.
1405+
14001406
- Don't forget to fill in the argument names correctly in the RPC command table.
14011407

14021408
- *Rationale*: If not, the call cannot be used with name-based arguments.

0 commit comments

Comments
 (0)