Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
DigiByte specific main_tests (subsidy)
What is the intention of this PR?
This PR fixes the
main_tests
with DigiByte's specific Supply Curve Parameters.Unfortunately, there have been many hard forks along the road of DigiByte, and almost all of them seem to have altered the supply parameters, which basically means we can't just loop through the halvings and validate the supply curve.
Be warned: This unit test was adapted to check the whole supply curve, even if the supply curve itself is erroneous. A new PR which alters the supply curve parameters must also provide an updated
main_tests
unit test.This test will take some time to run due to the huge number of blocks it iterates through (6-8 min). The new code, in which the supply curve parameters have been altered, needs 6 different loops to test each and every hard fork (starting here: https://github.com/SmartArray/digibyte/blob/1dde1ec334a33e756a0724a3a0c679b16143bc80/src/test/main_tests.cpp#L62)
Description of the changes
The commit SmartArray@5747bb3 updated the
main_tests
unit test in order to test DigiBytes Subsidy.SmartArray@1dde1ec adds a major algorithmical optimization in order to drastically reduce the runtime of this unit test.
How to verify?
Expected outcome
Remarks
This doesn't fix the issue discussed in #20