The current reorg handling code chases backwards to fill in missing parents. If that interrupted part way through it would leave a gap. That gap would not be noticed by the current gap checking code which is purely numeric, and we do have a block at that height, it is just the wrong one.
We should improve the gap checking code to consider not just numbers, but missing parents as well.
The current reorg handling code chases backwards to fill in missing parents. If that interrupted part way through it would leave a gap. That gap would not be noticed by the current gap checking code which is purely numeric, and we do have a block at that height, it is just the wrong one.
We should improve the gap checking code to consider not just numbers, but missing parents as well.