-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor Subsidy Code #33
Refactor Subsidy Code #33
Conversation
Added more comments and merged GetDGBSubsidy and GetBlockSubsidy
ACK, beautifully commented too! 👍 Thanks @SmartArray |
Thank you @ChillingSilence. Documentation is the biggest intent of this PR. Also, this PR is a great example of how development can continue on DigiByte Core now, since we have the working unit tests. |
Run `make check` every time a code push happens.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
…DER checking until block 1251 (regtest-only)
Enable caching for apt dependencies as well as for `depends` subdirectory
Looks good initially. The automated tests are great. But to double check everything 100% was this tested with a running tweaked 7.17.2 node to sync from scratch on main net? |
Yes that's what the unit tests confirm. They do a full subsidy simulation. However yes, it syncs from scratch. |
Merge with branch tests/ci
Thanks @JaredTate for reviewing #40 Thanks to you, this PR is currently being validated by the approved automatic CI workflow and it should yield the build status shortly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
Refactor Subsidy Code
Looking at the code in
validation.cpp
:digibyte/src/validation.cpp
Lines 1216 to 1244 in 1cb4d6b
The original Bitcoin Code-Style Convention was not followed at all.
This PR is supposed to tidy up the subsidy code before introducing future changes (see #20)
Expectations
The altered code must still pass the
main_tests
unit test with 100%.Changes
d54c650 merged
GetBlockSubsidy
andGetDGBSubsidy
into one function.24b4d23 removes dead code that wasn't removed with the previous commit.
How to verify?
./autogen.sh && ./configure
cd src/test make -j4
Expected outcome