diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2013-12-08 15:26:08 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2013-12-09 08:44:57 +0100 |
commit | 4a85e067502a5df340e1b8c49df21e4c30a0de68 (patch) | |
tree | e036991e5f02c9d5017e9230cceace4433f1d297 /src/rpcserver.cpp | |
parent | 70370ae502df8756f3a067a00ccd61b9fc819581 (diff) |
Allow mining RPCs with --disable-wallet
The following mining-related RPC calls don't use the wallet:
- getnetworkhashps
- getmininginfo
- getblocktemplate
- submitblock
Enable them when compiling with --disable-wallet.
Diffstat (limited to 'src/rpcserver.cpp')
-rw-r--r-- | src/rpcserver.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp index 2dc7b34f88..c95f450c82 100644 --- a/src/rpcserver.cpp +++ b/src/rpcserver.cpp @@ -248,12 +248,14 @@ static const CRPCCommand vRPCCommands[] = { "gettxout", &gettxout, true, false, false }, { "verifychain", &verifychain, true, false, false }, -#ifdef ENABLE_WALLET + /* Mining */ { "getnetworkhashps", &getnetworkhashps, true, false, false }, - { "getgenerate", &getgenerate, true, false, false }, - { "setgenerate", &setgenerate, true, true, false }, - { "gethashespersec", &gethashespersec, true, false, false }, { "getmininginfo", &getmininginfo, true, false, false }, + { "getblocktemplate", &getblocktemplate, true, false, false }, + { "submitblock", &submitblock, false, false, false }, + +#ifdef ENABLE_WALLET + /* Wallet */ { "getnewaddress", &getnewaddress, true, false, true }, { "getaccountaddress", &getaccountaddress, true, false, true }, { "getrawchangeaddress", &getrawchangeaddress, true, false, true }, @@ -283,10 +285,7 @@ static const CRPCCommand vRPCCommands[] = { "listaddressgroupings", &listaddressgroupings, false, false, true }, { "signmessage", &signmessage, false, false, true }, { "verifymessage", &verifymessage, false, false, false }, - { "getwork", &getwork, true, false, true }, { "listaccounts", &listaccounts, false, false, true }, - { "getblocktemplate", &getblocktemplate, true, false, false }, - { "submitblock", &submitblock, false, false, false }, { "listsinceblock", &listsinceblock, false, false, true }, { "dumpprivkey", &dumpprivkey, true, false, true }, { "dumpwallet", &dumpwallet, true, false, true }, @@ -295,6 +294,12 @@ static const CRPCCommand vRPCCommands[] = { "listunspent", &listunspent, false, false, true }, { "lockunspent", &lockunspent, false, false, true }, { "listlockunspent", &listlockunspent, false, false, true }, + + /* Wallet-enabled mining */ + { "getgenerate", &getgenerate, true, false, false }, + { "setgenerate", &setgenerate, true, true, false }, + { "gethashespersec", &gethashespersec, true, false, false }, + { "getwork", &getwork, true, false, true }, #endif // ENABLE_WALLET }; |