Chainparams: Decouple AllowSetMockTime from MineBlocksOnDemand#17106
Chainparams: Decouple AllowSetMockTime from MineBlocksOnDemand#17106jtimon wants to merge 4 commits intobitcoin:masterfrom
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
|
Concept ACK. I'd like to be able to set mocktime for my testnet3 node. Haven't looked at the implementation. |
|
I wrote this PR for you @MarcoFalke . I don't have particular interest in it. |
|
Ah sorry, I forgot about this. Nonetheless something similar has just been merged as 930d837 |
Even if a test chain doesn't MineBlocksOnDemand (aka consensus.fPowNoRetargeting = false), it may make sense to allow the rpc call setmocktime for that chain.
For example, it could be allowed by default for testnet3 (aka "test" on bip70).
Or at least this is what I think MarcoFalke wants from our last conversation on IRC.
For more context see #16770 (comment)
As a bonus, unlike consensus.fPowNoRetargeting, the new field m_allow_set_mocktime gets fully out of consensus code in the sense that people "greping" from consensus/params.h don't need to necessarily look at rpc call setmocktime in rpc/misc.cpp if that's not what they're looking for.
One less read to Consensus::Params.
Not sure if that last part makes sense to anyone else but me as reasons to get this merged.