Skip to content

Conversation

@sipa
Copy link
Member

@sipa sipa commented May 7, 2018

Introduced in 4e0eed8

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.

Introduced in 4e0eed8

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.
@sdaftuar
Copy link
Member

sdaftuar commented May 8, 2018

ACK

@fanquake fanquake requested a review from gmaxwell May 9, 2018 06:23
@jonasschnelli
Copy link
Contributor

utACK a2f678d

1 similar comment
@laanwj
Copy link
Member

laanwj commented May 9, 2018

utACK a2f678d

@jamesob
Copy link
Contributor

jamesob commented May 9, 2018

utACK a2f678d

@laanwj laanwj merged commit a2f678d into bitcoin:master May 9, 2018
laanwj added a commit that referenced this pull request May 9, 2018
…ect fails

a2f678d Bugfix: the end of a reorged chain is invalid when connect fails (Pieter Wuille)

Pull request description:

  Introduced in 4e0eed8

  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.

Tree-SHA512: ddf749f8a78083811a5a17152723f545c1463768d09dc9832ec3682e803a3c106fb768de9fa91c03aa95e644d4e41361a7e4ee791940fd7d51cdefea90de31fc
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 29, 2020
…en connect fails

a2f678d Bugfix: the end of a reorged chain is invalid when connect fails (Pieter Wuille)

Pull request description:

  Introduced in 4e0eed8

  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.

Tree-SHA512: ddf749f8a78083811a5a17152723f545c1463768d09dc9832ec3682e803a3c106fb768de9fa91c03aa95e644d4e41361a7e4ee791940fd7d51cdefea90de31fc
random-zebra added a commit to PIVX-Project/PIVX that referenced this pull request May 11, 2021
…ect fails

b7910a8 Bugfix: the end of a reorged chain is invalid when connect fails (Pieter Wuille)

Pull request description:

  Found this bug fix investigating master's GA test failure reason. Not related to it but still a bug-fix.

  > 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 has no direct impact, only affects the warning logging system.
  Coming from bitcoin#13185.

ACKs for top commit:
  random-zebra:
    utACK b7910a8
  Fuzzbawls:
    utACK b7910a8

Tree-SHA512: 2d8269950e9c78d1d190a1a336b0ef4c48da1976e5cfc247bcf8929bbd6e9c9d8e2a0c6977931955cf3d3689549823f383f0ef12ec7975b85717ae8dcb7b5b31
@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