aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2015-04-23 18:03:34 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2015-04-23 18:03:51 +0200
commit734f80a5d18821f4f6d0488996655c6e35ce160c (patch)
treece65060c9fdafb8bd2034151240843612e12d637 /src
parentcf7adad3bb0bcff406a3ea4c59fa116367cb7915 (diff)
parent27ce808fb546eba0204cdcb2d87b62efdf583c62 (diff)
Merge pull request #6039
27ce808 tests: Error when setgenerate is used on regtest (Wladimir J. van der Laan)
Diffstat (limited to 'src')
-rw-r--r--src/rpcmining.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index 851d113f3b..aba250ba49 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)