-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
Line 980 in 95e2c68
| int64_t nSubsidy = nCoinAge * COIN_YEAR_REWARD * 33 / (365 * 33 + 8); |
This is the simple fix (otherwise after 38.81million nCoinAge overflow and incorrect calculation occurs) :
in main.cpp (comment out old line and replace with nCoinAge at the end) 👍
// int64_t nSubsidy = nCoinAge * COIN_YEAR_REWARD * 33 / (365 * 33 + 8);
int64_t nSubsidy = COIN_YEAR_REWARD * 33 / (365 * 33 + 8) * nCoinAge;
to avoid the loss of accuracy and force floating point, simply add .0 to one of the numbers instead (nSubsidy is obviously still an integer):
int64_t nSubsidy = nCoinAge * COIN_YEAR_REWARD * 33.0 / (365 * 33 + 8);
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels