-
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
Update coincontrol.h #182
Update coincontrol.h #182
Conversation
Fix netflix bug
After small change in the code. ( std:: ) i can build it. The fix is working! Ty @mctrivia |
specified that numeric_limits is part of standard
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.
Tested 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.
cACK
Thank you @mctrivia
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.
cACK. Thanks @mctrivia!
Thank you @mctrivia for finding this and your PR. Wouldn't it be best to add 3 more 9's to the variable to match the same proportions as found in BTC, respecting the 1:1000 DGB to BTC ratio?... well actually our block times are 40x faster... so maybe no need for 1000x more. Or was there another reason you set it to "infinity"?
However, in this context, you've mentioned setting it to infinity, but std::numeric_limits::max() doesn't represent infinity; it represents the maximum finite value that can be stored in an int. To represent infinity in C++, you would typically use a floating-point type and set it to So setting it to |
@JaredTate technically you are correct it is not infinity. But it is as close to infinity as possible with the restriction that the input is a 32bit integer. Keeping as a limit makes obvious that if the variable gets switched to 64bit that this should change also. Admittedly using 15 sec timing your suggestion of adding 3x 9s will work for another 4000 years, but if the timing changes or the coin gets really old it will reissue this bug in the future and it may get missed. *edit actually there isn't room in a 32 bit integer to add 3x 9s so that isn't even possible. |
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.
Fair point, we will all be dead and AI will have taken over humanity with quantum computers and will have gone interstellar by the time this matters.
ACK. Compiles and runs as expected, though I do not have an old wallet to test the main issue this fixes but I am sure we will get the chance with this bull run as people come out of the woodwork.
For what it's worth, this has been tested by going in the opposite direction and setting a ridiculously low number. You can see the conversation on this Discord thread: https://discord.com/channels/878200503815782400/1212897730129825883 |
Fix netflix bug