Move HelpExample* from rpcwallet to rpcserver
General functions used throughout the RPC framework don't belong in rpcwallet.
This commit is contained in:
parent
00cfc9f074
commit
bbb093652e
@ -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;
|
const CRPCTable tableRPC;
|
||||||
|
@ -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()
|
void EnsureWalletIsUnlocked()
|
||||||
{
|
{
|
||||||
if (pwalletMain->IsLocked())
|
if (pwalletMain->IsLocked())
|
||||||
|
Loading…
Reference in New Issue
Block a user