-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Harden against mistakes handling invalid blocks #9765
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
Conversation
Fixes a bug in AcceptBlock() in invoking CheckBlock() with incorrect arguments, and restores a call to CheckBlock() from ProcessNewBlock() as belt-and-suspenders. Updates the (overspecified) tests to match behavior.
utACK ba803ef |
Also this is a bug fix that should be tagged 0.14 in my opinion |
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 (will test)
Grr, we really shouldn't have default arguments in consensus code. utACK ba803ef. |
utACK ba803ef
Bitfields/Enumerations instead of bool, bool, bool, ... also tends to help make code like this more readable and thus reviewable. Multiple boolean parameters to a function make code hard to understand, always have to look at the signature to find out which one is what. |
ba803ef Harden against mistakes handling invalid blocks (Suhas Daftuar)
ba803ef Harden against mistakes handling invalid blocks (Suhas Daftuar)
ba803ef Harden against mistakes handling invalid blocks (Suhas Daftuar)
ba803ef Harden against mistakes handling invalid blocks (Suhas Daftuar)
ba803ef Harden against mistakes handling invalid blocks (Suhas Daftuar)
Fixes a bug in AcceptBlock() in invoking CheckBlock() with incorrect
arguments (introduced in #8068), and restores a call to CheckBlock() from ProcessNewBlock()
as belt-and-suspenders (effectively reverting #7225).
Updates the (overspecified) tests to match the slight behavior change (different reject code).