Bugfix: the end of a reorged chain is invalid when connect fails #13185

pull sipa wants to merge 1 commits into bitcoin:master from sipa:201805_bugfix_invalidchain_end changing 1 files +3 −2
  1. sipa commented at 6:22 PM on May 7, 2018: member

    Introduced in 4e0eed88acdd41826868c151373068bfad18b84d

    When an invalid block is found during a reorg, we know the last of the blocks in the was-to-be-connected chain is invalid, but not necessarily the first. As vpIndexToConnect is ordered in decreasing height, the end of the reorg is the front of the vector, and not the back.

    This only affected the warning system.

  2. Bugfix: the end of a reorged chain is invalid when connect fails
    Introduced in 4e0eed88acdd41826868c151373068bfad18b84d
    
    When an invalid block is found during a reorg, we know the last of the blocks in
    the was-to-be-connected chain is invalid, but not necessarily the first. As
    vpIndexToConnect is ordered in decreasing height, the end of the reorg is the
    front of the vector, and not the back.
    
    This only affected the warning system.
    a2f678d355
  3. fanquake added the label Validation on May 7, 2018
  4. sdaftuar commented at 2:19 PM on May 8, 2018: member

    ACK

  5. fanquake requested review from gmaxwell on May 9, 2018
  6. jonasschnelli commented at 6:52 AM on May 9, 2018: contributor

    utACK a2f678d3552aaaaa8d6f480cf5f2fbc849f376c3

  7. laanwj commented at 1:20 PM on May 9, 2018: member

    utACK a2f678d3552aaaaa8d6f480cf5f2fbc849f376c3

  8. laanwj merged this on May 9, 2018
  9. laanwj closed this on May 9, 2018

  10. laanwj referenced this in commit 08c1caf863 on May 9, 2018
  11. Bushstar cross-referenced this on May 10, 2018 from issue commits from bitcoin/master by Bushstar
  12. sipa cross-referenced this on May 13, 2018 from issue Rewrite the interface between validation and net_processing wrt DoS by TheBlueMatt
  13. PastaPastaPasta referenced this in commit 84ab28512b on Jun 17, 2020
  14. PastaPastaPasta referenced this in commit ead19bb722 on Jun 27, 2020
  15. PastaPastaPasta referenced this in commit 14ee0c018b on Jun 28, 2020
  16. PastaPastaPasta referenced this in commit 6895ffde18 on Jun 29, 2020
  17. furszy cross-referenced this on Apr 24, 2021 from issue [Bugfix] the end of a reorged chain is invalid when connect fails by furszy
  18. random-zebra referenced this in commit 68517c6b39 on May 11, 2021
  19. bitcoin 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: 2026-05-20 06:55 UTC