diff options
author | Gloria Zhao <gzhao408@berkeley.edu> | 2020-03-04 14:01:31 -0800 |
---|---|---|
committer | Gloria Zhao <gzhao408@berkeley.edu> | 2020-03-05 10:09:28 -0800 |
commit | 2455aa5d7f54befeade05795ed8f5dd89d01042a (patch) | |
tree | 51db12a352b8f1495d41bda0bb6c45a0c2f9147c /src | |
parent | 54a7ef612a3b69984d521432f8a694a682c76090 (diff) |
[rpc] changed MineBlocksOnDemand to IsMockableChain
Diffstat (limited to 'src')
-rw-r--r-- | src/rpc/misc.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp index 4279756f4d..5d7a20b78e 100644 --- a/src/rpc/misc.cpp +++ b/src/rpc/misc.cpp @@ -345,8 +345,9 @@ static UniValue setmocktime(const JSONRPCRequest& request) RPCExamples{""}, }.Check(request); - if (!Params().MineBlocksOnDemand()) - throw std::runtime_error("setmocktime for regression testing (-regtest mode) only"); + if (!Params().IsMockableChain()) { + throw std::runtime_error("setmocktime is for regression testing (-regtest mode) only"); + } // For now, don't change mocktime if we're in the middle of validation, as // this could have an effect on mempool time-based eviction, as well as |