aboutsummaryrefslogtreecommitdiff
path: root/doc/developer-notes.md
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2018-03-15 16:37:57 -0400
committerRussell Yanofsky <russ@yanofsky.org>2018-03-15 16:37:57 -0400
commit4c317d89e9d980328028ff01cd9a0465cc22bb7e (patch)
tree5ec9b1a874cffb97ff604ae855bd90d08a5bf0f7 /doc/developer-notes.md
parent947c25ead21a00f3f9a46bb462ae8bc6fb7a0bb6 (diff)
downloadbitcoin-4c317d89e9d980328028ff01cd9a0465cc22bb7e.tar.xz
Document RPC method aliasing
Suggested by Sjors Provoost <sjors@sprovoost.nl> in https://github.com/bitcoin/bitcoin/pull/11536#issuecomment-372820660
Diffstat (limited to 'doc/developer-notes.md')
-rw-r--r--doc/developer-notes.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/developer-notes.md b/doc/developer-notes.md
index a5468c3be3..8f06ee4eca 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.