Skip to content

Commit 2455aa5

Browse files
committed
[rpc] changed MineBlocksOnDemand to IsMockableChain
1 parent 54a7ef6 commit 2455aa5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/rpc/misc.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,8 +345,9 @@ static UniValue setmocktime(const JSONRPCRequest& request)
345345
RPCExamples{""},
346346
}.Check(request);
347347

348-
if (!Params().MineBlocksOnDemand())
349-
throw std::runtime_error("setmocktime for regression testing (-regtest mode) only");
348+
if (!Params().IsMockableChain()) {
349+
throw std::runtime_error("setmocktime is for regression testing (-regtest mode) only");
350+
}
350351

351352
// For now, don't change mocktime if we're in the middle of validation, as
352353
// this could have an effect on mempool time-based eviction, as well as

0 commit comments

Comments
 (0)