Harden against mistakes handling invalid blocks #9765

pull sdaftuar wants to merge 1 commits into bitcoin:master from sdaftuar:fix-checkblock-call changing 2 files +13 −7
  1. sdaftuar commented at 1:23 pm on February 15, 2017: 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).

  2. 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.
    ba803efb68
  3. morcos commented at 3:44 pm on February 15, 2017: member
    utACK ba803ef
  4. morcos commented at 3:45 pm on February 15, 2017: member
    Also this is a bug fix that should be tagged 0.14 in my opinion
  5. laanwj added this to the milestone 0.14.0 on Feb 15, 2017
  6. gmaxwell commented at 6:22 pm on February 15, 2017: contributor
    utACK (will test)
  7. fanquake added the label Validation on Feb 15, 2017
  8. theuni commented at 7:40 pm on February 15, 2017: member

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

    utACK ba803efb687c2cb408176c546a544a8466c652ea.

  9. laanwj commented at 7:28 am on February 16, 2017: member

    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.

  10. laanwj merged this on Feb 16, 2017
  11. laanwj closed this on Feb 16, 2017

  12. laanwj referenced this in commit 1e92e041dd on Feb 16, 2017
  13. codablock referenced this in commit a0685f8950 on Feb 7, 2018
  14. codablock referenced this in commit 23a9fa671c on Feb 8, 2018
  15. codablock referenced this in commit 4ac4e96e8f on Feb 8, 2018
  16. andvgal referenced this in commit 54ef6fa1e4 on Jan 6, 2019
  17. CryptoCentric referenced this in commit 6ccf0538b5 on Feb 28, 2019
  18. CryptoCentric referenced this in commit 8bb3617254 on Mar 2, 2019
  19. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-07-05 19:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me