Merge pull request #3320 from laanwj/2013_11_cli_split

bitcoin-cli: remove unneeded dependencies (only minor code movement)
This commit is contained in:
Gavin Andresen
2013-12-03 03:47:44 -08:00
13 changed files with 142 additions and 105 deletions

View File

@@ -245,3 +245,35 @@ int CommandLineRPC(int argc, char *argv[])
}
return nRet;
}
std::string HelpMessageCli(bool mainProgram)
{
string strUsage;
if(mainProgram)
{
strUsage += _("Options:") + "\n";
strUsage += " -? " + _("This help message") + "\n";
strUsage += " -conf=<file> " + _("Specify configuration file (default: bitcoin.conf)") + "\n";
strUsage += " -datadir=<dir> " + _("Specify data directory") + "\n";
strUsage += " -testnet " + _("Use the test network") + "\n";
strUsage += " -regtest " + _("Enter regression test mode, which uses a special chain in which blocks can be "
"solved instantly. This is intended for regression testing tools and app development.") + "\n";
} else {
strUsage += _("RPC client options:") + "\n";
}
strUsage += " -rpcconnect=<ip> " + _("Send commands to node running on <ip> (default: 127.0.0.1)") + "\n";
strUsage += " -rpcport=<port> " + _("Connect to JSON-RPC on <port> (default: 8332 or testnet: 18332)") + "\n";
strUsage += " -rpcwait " + _("Wait for RPC server to start") + "\n";
strUsage += " -rpcuser=<user> " + _("Username for JSON-RPC connections") + "\n";
strUsage += " -rpcpassword=<pw> " + _("Password for JSON-RPC connections") + "\n";
if(mainProgram)
{
strUsage += "\n" + _("SSL options: (see the Bitcoin Wiki for SSL setup instructions)") + "\n";
strUsage += " -rpcssl " + _("Use OpenSSL (https) for JSON-RPC connections") + "\n";
}
return strUsage;
}