diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp index ccfdfe43403..60a3a0dda93 100644 --- a/src/rpc/misc.cpp +++ b/src/rpc/misc.cpp @@ -351,8 +351,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