diff options
| author | Wladimir J. van der Laan <[email protected]> | 2015-04-23 18:03:34 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2015-04-23 18:03:51 +0200 |
| commit | 734f80a5d18821f4f6d0488996655c6e35ce160c (patch) | |
| tree | ce65060c9fdafb8bd2034151240843612e12d637 /src/rpcmining.cpp | |
| parent | Merge pull request #6052 (diff) | |
| parent | tests: Error when setgenerate is used on regtest (diff) | |
| download | discoin-734f80a5d18821f4f6d0488996655c6e35ce160c.tar.xz discoin-734f80a5d18821f4f6d0488996655c6e35ce160c.zip | |
Merge pull request #6039
27ce808 tests: Error when setgenerate is used on regtest (Wladimir J. van der Laan)
Diffstat (limited to 'src/rpcmining.cpp')
| -rw-r--r-- | src/rpcmining.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp index 851d113f3..aba250ba4 100644 --- a/src/rpcmining.cpp +++ b/src/rpcmining.cpp @@ -196,6 +196,8 @@ Value setgenerate(const Array& params, bool fHelp) if (pwalletMain == NULL) throw JSONRPCError(RPC_METHOD_NOT_FOUND, "Method not found (disabled)"); + if (Params().MineBlocksOnDemand()) + throw JSONRPCError(RPC_METHOD_NOT_FOUND, "Use the generate method instead of setgenerate on this network"); bool fGenerate = true; if (params.size() > 0) |