Skip to content

Commit

Permalink
chaingen: Add ASERT difficulty algorithm support.
Browse files Browse the repository at this point in the history
This adds support for generating blocks that require the new difficulty
algorithm defined in DCP0011 to the test chain generator.

It accomplishes this by introducing a new type and method, named
PowDifficultyAlgorithm and UsePowDiffAlgo, respectively, to the chain
generator along with logic to calculate the appropriate difficulty
accordingly.  The method takes a parameter of the new type in order to
allow the caller selectively choose which difficulty algorithm to use.

This will allow future code to test all edge conditions around switching
the difficulty algorithm over to the new one defined in DCP0011.
  • Loading branch information
davecgh committed Jun 6, 2023
1 parent 860dd50 commit a7939e9
Showing 1 changed file with 368 additions and 58 deletions.
Loading

0 comments on commit a7939e9

Please sign in to comment.