aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-03-19 17:17:53 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2018-03-19 17:17:57 +0100
commitebdf84c9601e7a3ccf66974b5efba67f6d064456 (patch)
tree6772189f852f776ad396582efe0a70b6d4c0743a /src
parent93634f296e0b2281b25fdbbd5e608b2f5e662ea3 (diff)
parent4c317d89e9d980328028ff01cd9a0465cc22bb7e (diff)
downloadbitcoin-ebdf84c9601e7a3ccf66974b5efba67f6d064456.tar.xz
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 'src')
-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);
};