strUsage+=HelpMessageOpt("-datadir=<dir>",_("Specify data directory"));
strUsage+=HelpMessageOpt("-datadir=<dir>",_("Specify data directory"));
AppendParamsHelpMessages(strUsage);
AppendParamsHelpMessages(strUsage);
strUsage+=HelpMessageOpt("-named",strprintf(_("Pass named instead of positional arguments (default: %s)"),DEFAULT_NAMED));
strUsage+=HelpMessageOpt("-rpcconnect=<ip>",strprintf(_("Send commands to node running on <ip> (default: %s)"),DEFAULT_RPCCONNECT));
strUsage+=HelpMessageOpt("-rpcconnect=<ip>",strprintf(_("Send commands to node running on <ip> (default: %s)"),DEFAULT_RPCCONNECT));
strUsage+=HelpMessageOpt("-rpcport=<port>",strprintf(_("Connect to JSON-RPC on <port> (default: %u or testnet: %u)"),BaseParams(CBaseChainParams::MAIN).RPCPort(),BaseParams(CBaseChainParams::TESTNET).RPCPort()));
strUsage+=HelpMessageOpt("-rpcport=<port>",strprintf(_("Connect to JSON-RPC on <port> (default: %u or testnet: %u)"),BaseParams(CBaseChainParams::MAIN).RPCPort(),BaseParams(CBaseChainParams::TESTNET).RPCPort()));
strUsage+=HelpMessageOpt("-rpcwait",_("Wait for RPC server to start"));
strUsage+=HelpMessageOpt("-rpcwait",_("Wait for RPC server to start"));
@ -80,6 +82,7 @@ static int AppInitRPC(int argc, char* argv[])
if(!IsArgSet("-version")){
if(!IsArgSet("-version")){
strUsage+="\n"+_("Usage:")+"\n"+
strUsage+="\n"+_("Usage:")+"\n"+
" bitcoin-cli [options] <command> [params] "+strprintf(_("Send command to %s"),_(PACKAGE_NAME))+"\n"+
" bitcoin-cli [options] <command> [params] "+strprintf(_("Send command to %s"),_(PACKAGE_NAME))+"\n"+
" bitcoin-cli [options] -named <command> [name=value] ... "+strprintf(_("Send command to %s (with named arguments)"),_(PACKAGE_NAME))+"\n"+
" bitcoin-cli [options] help "+_("List commands")+"\n"+
" bitcoin-cli [options] help "+_("List commands")+"\n"+
" bitcoin-cli [options] help <command> "+_("Get help for a command")+"\n";
" bitcoin-cli [options] help <command> "+_("Get help for a command")+"\n";
@ -278,7 +281,14 @@ int CommandLineRPC(int argc, char *argv[])
if(args.size()<1)
if(args.size()<1)
throwstd::runtime_error("too few parameters (need at least command)");
throwstd::runtime_error("too few parameters (need at least command)");