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.
This PR fixes 2 more Unit tests. Unit tests are the most important C++ tests located in the src folder and are what first runs when you
make check
. This fixes policy_fee_tests.cpp & transaction_tests.cpp.You can read more about Unit Tests here:
https://github.com/DigiByte-Core/digibyte/blob/develop/src/test/README.md
To Compile & Run Unit Tests:
Run Specific Unit Test Fixed
Explanation of Changes In policy_fee_tests.cpp
10000
, and the expected rounded value for1000
was974
.100000
(10 times higher), the rounding logic changed.1000
becomes0
because1000
is less than the minimum fee unit of100000
.974
to0
to reflect the new rounding behavior.1071
was based on the fee rate of10000
.100000
, the rounding logic changed, and the expected value needed to be adjusted.50000
was determined by running the test and observing the actual rounded value.1000
should be either0
or another value (previously1071
, now50000
).50000
with the new fee rate, so the expected value was updated accordingly.9170997
for roundingMAX_MONEY
was based on the fee rate of10000
.100000
, the rounding behavior forMAX_MONEY
changed as well.9936506125
was determined by running the test and observing the actual rounded value.MAX_MONEY
should equal the expected value, which was previously9170997
but is now9936506125
with the new fee rate.After this PR
make check
now fails on: wallet_tests.cppSo we need to approve: #180