old hardfork tests spend too much time incrementing blocks #225

Closed
opened 2018-10-19 20:28:26 +02:00 by BrannonKing · 2 comments
BrannonKing commented 2018-10-19 20:28:26 +02:00 (Migrated from github.com)

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

  • Tested against acceptance criteria
  • The project builds without errors
  • Peer Code Review performed
[durations.txt](https://github.com/lbryio/lbrycrd/files/2496904/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: ```cpp 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 - [ ] Tested against acceptance criteria - [ ] The project builds without errors - [ ] Peer Code Review performed
Techievena commented 2018-10-28 07:44:42 +01:00 (Migrated from github.com)

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

I want to work on this. Can you please help me with what needs to be done.
BrannonKing commented 2019-05-07 00:30:52 +02:00 (Migrated from github.com)

done via cherry-pick

done via cherry-pick
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
LBRYCommunity/lbrycrd#225
No description provided.