Auto merge of #2456 - btccom:master, r=str4d

[mining] let "getblocktemplate" work when disable wallet

we already support GetBlockTemplate without build wallet, see:

https://github.com/zcash/zcash/blob/master/src/rpcmining.cpp

```
    // Wallet or miner address is required because we support coinbasetxn
    if (GetArg("-mineraddress", "").empty()) {
#ifdef ENABLE_WALLET
        if (!pwalletMain) {
            throw JSONRPCError(RPC_METHOD_NOT_FOUND, "Wallet disabled and -mineraddress not set");
        }
#else
        throw JSONRPCError(RPC_METHOD_NOT_FOUND, "zcashd compiled without wallet and -mineraddress not set");
#endif
    }
```

so the macro should be removed from `src/rpcserver.cpp`, otherwise you can't call `getblocktemplate` when you disable wallet.
This commit is contained in:
Homu 2017-06-20 01:15:15 -07:00
commit c050b99469
1 changed files with 0 additions and 2 deletions

View File

@ -293,9 +293,7 @@ static const CRPCCommand vRPCCommands[] =
{ "blockchain", "verifychain", &verifychain, true },
/* Mining */
#ifdef ENABLE_WALLET
{ "mining", "getblocktemplate", &getblocktemplate, true },
#endif
{ "mining", "getmininginfo", &getmininginfo, true },
{ "mining", "getlocalsolps", &getlocalsolps, true },
{ "mining", "getnetworksolps", &getnetworksolps, true },