aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2013-11-29 15:48:07 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2013-12-04 12:46:12 +0100
commitbbb093652e33c0905d93f9d4bb70dbaf269e0cad (patch)
tree4ab8dab830faf7c10e4fb0f9acfdcd53906bd7e5 /src
parent00cfc9f0749daed5137bea78a4234c3d074e8889 (diff)
Move HelpExample* from rpcwallet to rpcserver
General functions used throughout the RPC framework don't belong in rpcwallet.
Diffstat (limited to 'src')
-rw-r--r--src/rpcserver.cpp9
-rw-r--r--src/rpcwallet.cpp9
2 files changed, 9 insertions, 9 deletions
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index c746d8c8fb..949e81e07f 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -820,4 +820,13 @@ json_spirit::Value CRPCTable::execute(const std::string &strMethod, const json_s
}
}
+std::string HelpExampleCli(string methodname, string args){
+ return "> bitcoin-cli " + methodname + " " + args + "\n";
+}
+
+std::string HelpExampleRpc(string methodname, string args){
+ return "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", "
+ "\"method\": \"" + methodname + "\", \"params\": [" + args + "] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/\n";
+}
+
const CRPCTable tableRPC;
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index b4e522de8f..77ebc189a8 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -33,15 +33,6 @@ std::string HelpRequiringPassphrase()
: "";
}
-std::string HelpExampleCli(string methodname, string args){
- return "> bitcoin-cli " + methodname + " " + args + "\n";
-}
-
-std::string HelpExampleRpc(string methodname, string args){
- return "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", "
- "\"method\": \"" + methodname + "\", \"params\": [" + args + "] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/\n";
-}
-
void EnsureWalletIsUnlocked()
{
if (pwalletMain->IsLocked())