Skip to content

Conversation

sdaftuar
Copy link
Member

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

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
Copy link
Contributor

morcos commented Feb 15, 2017

utACK ba803ef

@morcos
Copy link
Contributor

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
Copy link
Contributor

@gmaxwell gmaxwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK (will test)

@theuni
Copy link
Member

theuni commented Feb 15, 2017

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

utACK ba803ef.

@laanwj
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
laanwj added a commit that referenced this pull request Feb 16, 2017
ba803ef Harden against mistakes handling invalid blocks (Suhas Daftuar)
codablock pushed a commit to codablock/dash that referenced this pull request Feb 8, 2018
ba803ef Harden against mistakes handling invalid blocks (Suhas Daftuar)
andvgal pushed a commit to energicryptocurrency/gen2-energi that referenced this pull request Jan 6, 2019
ba803ef Harden against mistakes handling invalid blocks (Suhas Daftuar)
CryptoCentric pushed a commit to absolute-community/absolute that referenced this pull request Feb 28, 2019
ba803ef Harden against mistakes handling invalid blocks (Suhas Daftuar)
CryptoCentric pushed a commit to absolute-community/absolute that referenced this pull request Mar 2, 2019
ba803ef Harden against mistakes handling invalid blocks (Suhas Daftuar)
@adamjonas adamjonas mentioned this pull request Dec 16, 2020
3 tasks
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants