mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-30 02:31:05 +02:00
Document RPC method aliasing
Suggested by Sjors Provoost <sjors@sprovoost.nl> in https://github.com/bitcoin/bitcoin/pull/11536#issuecomment-372820660
This commit is contained in:
@ -710,3 +710,14 @@ A few guidelines for introducing and reviewing new RPC interfaces:
|
||||
client may be aware of prior to entering a wallet RPC call, we must block
|
||||
until the wallet is caught up to the chainstate as of the RPC call's entry.
|
||||
This also makes the API much easier for RPC clients to reason about.
|
||||
|
||||
- Be aware of RPC method aliases and generally avoid registering the same
|
||||
callback function pointer for different RPCs.
|
||||
|
||||
- *Rationale*: RPC methods registered with the same function pointer will be
|
||||
considered aliases and only the first method name will show up in the
|
||||
`help` rpc command list.
|
||||
|
||||
- *Exception*: Using RPC method aliases may be appropriate in cases where a
|
||||
new RPC is replacing a deprecated RPC, to avoid both RPCs confusingly
|
||||
showing up in the command list.
|
||||
|
Reference in New Issue
Block a user