diff options
| author | Wladimir J. van der Laan <[email protected]> | 2018-03-19 17:17:53 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2018-03-19 17:17:57 +0100 |
| commit | ebdf84c9601e7a3ccf66974b5efba67f6d064456 (patch) | |
| tree | 6772189f852f776ad396582efe0a70b6d4c0743a /doc | |
| parent | Merge #12553: Prefer wait_until over polling with time.sleep (diff) | |
| parent | Document RPC method aliasing (diff) | |
| download | discoin-ebdf84c9601e7a3ccf66974b5efba67f6d064456.tar.xz discoin-ebdf84c9601e7a3ccf66974b5efba67f6d064456.zip | |
Merge #12700: Document RPC method aliasing
4c317d89e Document RPC method aliasing (Russell Yanofsky)
Pull request description:
Suggested by @Sjors in https://github.com/bitcoin/bitcoin/pull/11536#issuecomment-372820660
Tree-SHA512: 7bf16238e41b6c6c078e9103d8eac2ac76739a2c16b4f964be49bfde1f20f31a1fb30badf1faaa6ddc301a74f0d785d19567069b50de78c502144479143cb38c
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/developer-notes.md | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/developer-notes.md b/doc/developer-notes.md index a5468c3be..8f06ee4ec 100644 --- a/doc/developer-notes.md +++ b/doc/developer-notes.md @@ -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. |