Match deep block behavior in missed spot from b498084388

This commit is contained in:
DataHoarder 2024-04-05 18:08:59 +02:00
parent 878d9df69b
commit 61cfc4478c
Signed by: DataHoarder
SSH key fingerprint: SHA256:OLTRf6Fl87G52SiR7sWLGNzlJt4WOX+tfI2yxo0z7xk

View file

@ -821,8 +821,9 @@ func (c *SideChain) updateDepths(block *PoolBlock) {
blocksToUpdate = blocksToUpdate[:len(blocksToUpdate)-1]
blockDepth := block.Depth.Load()
// Verify this block and possibly other blocks on top of it when we're sure it will get verified
if !block.Verified.Load() && (blockDepth >= c.Consensus().ChainWindowSize*2 || block.Side.Height == 0) {
if !block.Verified.Load() && (blockDepth > ((c.Consensus().ChainWindowSize-1)*2+UncleBlockDepth) || block.Side.Height == 0) {
_ = c.verifyLoop(block)
}