Add unit tests for next difficulty calculations #5813

pull rnicoll wants to merge 1 commits into bitcoin:master from rnicoll:difficulty-unit-test changing 4 files +74 −1
  1. rnicoll commented at 1:16 PM on February 21, 2015: contributor

    Split GetNextWorkRequired() into two functions to allow the difficulty calculations to be tested without requiring a full blockchain. Add unit tests to cover basic difficulty calculation, plus each of the min/max actual time, and maximum difficulty target conditions.

    All test cases have been additionally validated against an independent implementation in Python.

  2. Add unit tests for next difficulty calculations
    Split GetNextWorkRequired() into two functions to allow the difficulty calculations to
    be tested without requiring a full blockchain.
    Add unit tests to cover basic difficulty calculation, plus each of the min/max actual
    time, and maximum difficulty target conditions.
    34e5015cd2
  3. laanwj added the label Tests on Feb 23, 2015
  4. petertodd commented at 12:44 PM on February 24, 2015: contributor

    utACK

  5. sipa commented at 11:19 AM on March 1, 2015: member

    ACK

  6. laanwj merged this on Mar 6, 2015
  7. laanwj closed this on Mar 6, 2015

  8. laanwj referenced this in commit ee9f2bfa7b on Mar 6, 2015
  9. rnicoll deleted the branch on Mar 13, 2018
  10. DrahtBot locked this on Sep 8, 2021
Labels

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: 2026-04-21 21:15 UTC

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