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. PastaPastaPasta referenced this in commit 84ab28512b on Jun 17, 2020
  12. PastaPastaPasta referenced this in commit ead19bb722 on Jun 27, 2020
  13. PastaPastaPasta referenced this in commit 14ee0c018b on Jun 28, 2020
  14. PastaPastaPasta referenced this in commit 6895ffde18 on Jun 29, 2020
  15. random-zebra referenced this in commit 68517c6b39 on May 11, 2021
  16. MarcoFalke 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-12-19 00:12 UTC

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