lbryio / lbrycrd

The blockchain that provides the digital content namespace for the LBRY protocol
https://lbry.com
MIT License
2.57k stars 178 forks source link

old hardfork tests spend too much time incrementing blocks #225

Closed BrannonKing closed 5 years ago

BrannonKing commented 6 years ago

durations.txt

See the attached file for unit test runtimes. Notice that the old hardfork tests take too long. We have a better mechanism to bring the hardfork block numbers in line with the number of blocks already mined in the unit test. I.e. from the normalization fork:

    int currentHeight = chainActive.Height();
    const Consensus::Params& consensus = Params().GetConsensus();
    const_cast<Consensus::Params&>(consensus).nNormalizedNameForkHeight = currentHeight + 2;

Feel free to encapsulate this somehow.

Acceptance Criteria

These tests have been sped up: hardfork_claim_test, hardfork_support_test, claimtriebranching_hardfork_disktest, claim_expiration_test

Definition of Done

Techievena commented 5 years ago

I want to work on this. Can you please help me with what needs to be done.

BrannonKing commented 5 years ago

done via cherry-pick