mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
Remove cli functionality from bitcoind
As it says on the tin. It was deprecated in version 0.9, and at some point it should be removed. Removes the dependency of bitcoind on libbitcoin-cli.a. Move some functions that used to be shared but are now only used in bitcoin-cli.cpp to that file. After this change, an error is printed (and exit code 1 is returned) when the user tries to send RPC commands using bitcoind.
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include "rpcserver.h"
|
||||
#include "rpcclient.h"
|
||||
#include "init.h"
|
||||
#include "main.h"
|
||||
#include "noui.h"
|
||||
@@ -94,14 +93,9 @@ bool AppInit(int argc, char* argv[])
|
||||
else
|
||||
{
|
||||
strUsage += "\n" + _("Usage:") + "\n" +
|
||||
" bitcoind [options] " + _("Start Bitcoin Core Daemon") + "\n" +
|
||||
_("Usage (deprecated, use bitcoin-cli):") + "\n" +
|
||||
" bitcoind [options] <command> [params] " + _("Send command to Bitcoin Core") + "\n" +
|
||||
" bitcoind [options] help " + _("List commands") + "\n" +
|
||||
" bitcoind [options] help <command> " + _("Get help for a command") + "\n";
|
||||
" bitcoind [options] " + _("Start Bitcoin Core Daemon") + "\n";
|
||||
|
||||
strUsage += "\n" + HelpMessage(HMM_BITCOIND);
|
||||
strUsage += "\n" + HelpMessageCli(false);
|
||||
}
|
||||
|
||||
fprintf(stdout, "%s", strUsage.c_str());
|
||||
@@ -116,8 +110,8 @@ bool AppInit(int argc, char* argv[])
|
||||
|
||||
if (fCommandLine)
|
||||
{
|
||||
int ret = CommandLineRPC(argc, argv);
|
||||
exit(ret);
|
||||
fprintf(stderr, "Error: There is no RPC client functionality in bitcoind anymore. Use the bitcoin-cli utility instead.\n");
|
||||
exit(1);
|
||||
}
|
||||
#ifndef WIN32
|
||||
fDaemon = GetBoolArg("-daemon", false);
|
||||
|
||||
Reference in New Issue
Block a user