mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-02 08:59:08 +02:00
doc: add rpc guidance for boolean verbosity avoidance
This commit is contained in:
parent
698f302df8
commit
7a2e6b68cd
@ -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…
x
Reference in New Issue
Block a user