diff options
| author | Gloria Zhao <[email protected]> | 2020-03-04 14:01:31 -0800 |
|---|---|---|
| committer | Gloria Zhao <[email protected]> | 2020-03-05 10:09:28 -0800 |
| commit | 2455aa5d7f54befeade05795ed8f5dd89d01042a (patch) | |
| tree | 51db12a352b8f1495d41bda0bb6c45a0c2f9147c /src | |
| parent | Merge #17399: validation: Templatize ValidationState instead of subclassing (diff) | |
| download | discoin-2455aa5d7f54befeade05795ed8f5dd89d01042a.tar.xz discoin-2455aa5d7f54befeade05795ed8f5dd89d01042a.zip | |
[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 4279756f4..5d7a20b78 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 |