mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-10 10:52:31 -05:00
[rpc] changed MineBlocksOnDemand to IsMockableChain
This commit is contained in:
parent
54a7ef612a
commit
2455aa5d7f
1 changed files with 3 additions and 2 deletions
|
@ -345,8 +345,9 @@ static UniValue setmocktime(const JSONRPCRequest& request)
|
||||||
RPCExamples{""},
|
RPCExamples{""},
|
||||||
}.Check(request);
|
}.Check(request);
|
||||||
|
|
||||||
if (!Params().MineBlocksOnDemand())
|
if (!Params().IsMockableChain()) {
|
||||||
throw std::runtime_error("setmocktime for regression testing (-regtest mode) only");
|
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
|
// 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
|
// this could have an effect on mempool time-based eviction, as well as
|
||||||
|
|
Loading…
Add table
Reference in a new issue