Skip to content
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

Harden against mistakes handling invalid blocks #9765

Merged
merged 1 commit into from Feb 16, 2017

Conversation

Projects
None yet
6 participants
@sdaftuar
Copy link
Member

sdaftuar commented Feb 15, 2017

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).

Harden against mistakes handling invalid blocks
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.
@morcos

This comment has been minimized.

Copy link
Member

morcos commented Feb 15, 2017

utACK ba803ef

@morcos

This comment has been minimized.

Copy link
Member

morcos commented Feb 15, 2017

Also this is a bug fix that should be tagged 0.14 in my opinion

@laanwj laanwj added this to the 0.14.0 milestone Feb 15, 2017

@gmaxwell
Copy link
Member

gmaxwell left a comment

utACK (will test)

@fanquake fanquake added the Validation label Feb 15, 2017

@theuni

This comment has been minimized.

Copy link
Member

theuni commented Feb 15, 2017

Grr, we really shouldn't have default arguments in consensus code.

utACK ba803ef.

@laanwj

This comment has been minimized.

Copy link
Member

laanwj commented Feb 16, 2017

utACK ba803ef

Grr, we really shouldn't have default arguments in consensus code.

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.

@laanwj laanwj merged commit ba803ef into bitcoin:master Feb 16, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

laanwj added a commit that referenced this pull request Feb 16, 2017

Merge #9765: Harden against mistakes handling invalid blocks
ba803ef Harden against mistakes handling invalid blocks (Suhas Daftuar)

codablock added a commit to codablock/dash that referenced this pull request Feb 8, 2018

Merge bitcoin#9765: Harden against mistakes handling invalid blocks
ba803ef Harden against mistakes handling invalid blocks (Suhas Daftuar)

andvgal added a commit to energicryptocurrency/energi that referenced this pull request Jan 6, 2019

Merge bitcoin#9765: Harden against mistakes handling invalid blocks
ba803ef Harden against mistakes handling invalid blocks (Suhas Daftuar)

CryptoCentric added a commit to absolute-community/absolute that referenced this pull request Feb 28, 2019

Merge bitcoin#9765: Harden against mistakes handling invalid blocks
ba803ef Harden against mistakes handling invalid blocks (Suhas Daftuar)

CryptoCentric added a commit to absolute-community/absolute that referenced this pull request Mar 2, 2019

Merge bitcoin#9765: Harden against mistakes handling invalid blocks
ba803ef Harden against mistakes handling invalid blocks (Suhas Daftuar)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.