aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
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 /src/rpc
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 'src/rpc')
-rw-r--r--src/rpc/server.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/rpc/server.h b/src/rpc/server.h
index 8b32924fbc..d25268a8ab 100644
--- a/src/rpc/server.h
+++ b/src/rpc/server.h
@@ -165,8 +165,17 @@ public:
/**
* Appends a CRPCCommand to the dispatch table.
+ *
* Returns false if RPC server is already running (dump concurrency protection).
+ *
* Commands cannot be overwritten (returns false).
+ *
+ * Commands with different method names but the same callback function will
+ * be considered aliases, and only the first registered method name will
+ * show up in the help text command listing. Aliased commands do not have
+ * to have the same behavior. Server and client code can distinguish
+ * between calls based on method name, and aliased commands can also
+ * register different names, types, and numbers of parameters.
*/
bool appendCommand(const std::string& name, const CRPCCommand* pcmd);
};