Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix testnet ASERTDaa anchor #271

Merged
merged 4 commits into from
Jan 27, 2023
Merged

Commits on Jan 27, 2023

  1. Configuration menu
    Copy the full SHA
    99dc232 View commit details
    Browse the repository at this point in the history
  2. Fix DAA activation height for testnet3

    It had the wrong value. Source:
    https://gitlab.com/bitcoin-cash-node/bitcoin-cash-node/-/blob/master/src/chainparams.cpp#L348
    
    It didn't matter that it had the wrong value since it was behind a
    checkpoint.  But still, it is worth fixing.
    cculianu authored and PiRK committed Jan 27, 2023
    Configuration menu
    Copy the full SHA
    44091b1 View commit details
    Browse the repository at this point in the history
  3. add ASERTDaa anchor for testnet

    Previously I didn't backport the testnet changes for Electron-Cash@3f63318
    
    > The issues manifests itself whenever the checkpoint block is after
    > the asert anchor. This caused the code in blockchain.py to have a bad time.
    >
    > The asert anchor calculation code needs all headers, but if we have a
    > checkpoint after the anchor, all headers are not always available. The fix
    > is to either have checkpoints before the anchor, or to hard-code the anchor.
    >
    > This is the case for all chains we support now.
    
    It broke headers synchronization when I set a new tesnet checkpoint on November 15th 2021, but I didn't notice because I already had a complete header chain so it did not trigger the bug for me. But for a user who does not already have the headers prior to the checkpoint locally, it causes the headers synchronization to fail.
    PiRK committed Jan 27, 2023
    Configuration menu
    Copy the full SHA
    9304a7f View commit details
    Browse the repository at this point in the history
  4. ASERTDaa: remove special case for testnet

    The difficulty adjustment for eCash testnet has the same half-life as for eCash MainNet. This paramameter is only used on the BCH chain.
    
    This is a follow-up to commit bf82557
    PiRK committed Jan 27, 2023
    Configuration menu
    Copy the full SHA
    dd3f683 View commit details
    Browse the repository at this point in the history