Chainparams: Decouple AllowSetMockTime from MineBlocksOnDemand #17106

pull jtimon wants to merge 4 commits into bitcoin:master from jtimon:b20-chainparams-mocktime changing 6 files +45 −3
  1. jtimon commented at 3:43 am on October 11, 2019: contributor

    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.

  2. Chainparams: Decouple AllowSetMockTime from MineBlocksOnDemand 4173ad0b04
  3. Chainparams: Allow chain 'test' (aka testnet3) to set mock time bb1bbea24f
  4. Chainparams: Make allow_set_mocktime customizable for regtest 528844a732
  5. Test allow_set_mocktime=0 aec19e7e4e
  6. DrahtBot added the label RPC/REST/ZMQ on Oct 11, 2019
  7. DrahtBot added the label Tests on Oct 11, 2019
  8. DrahtBot added the label Validation on Oct 11, 2019
  9. DrahtBot commented at 6:19 am on October 11, 2019: member

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #17037 (Testschains: Many regtests with different genesis and default datadir by jtimon)
    • #17032 (Tests: Chainparams: Make regtest almost fully customizable by jtimon)
    • #16411 (BIP-325: Signet support by kallewoof)

    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.

  10. MarcoFalke commented at 2:50 pm on October 11, 2019: member
    Concept ACK. I’d like to be able to set mocktime for my testnet3 node. Haven’t looked at the implementation.
  11. jtimon commented at 11:43 am on February 4, 2020: contributor
    I wrote this PR for you @MarcoFalke . I don’t have particular interest in it. Since you don’t seem specially interested either, I’m closing for now due to lack of interest. I can reopen later if you’re interested again and want to review.
  12. jtimon closed this on Feb 4, 2020

  13. MarcoFalke commented at 1:05 am on February 18, 2020: member
    Ah sorry, I forgot about this. Nonetheless something similar has just been merged as 930d8375421451c8c4127608c360b0f6a0a62127
  14. DrahtBot locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-19 09:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me