Skip to content

Commit 91cc3b0

Browse files
authored
skip orphan processing if syncing (#1471)
1 parent b5a80b3 commit 91cc3b0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/pos_blockchain.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,11 @@ func (bc *Blockchain) processBlockPoS(block *MsgDeSoBlock, currentView uint64, v
365365
}
366366
}
367367

368+
// If we're currently syncing, then we can skip the orphan processing step.
369+
if bc.isSyncing() {
370+
return appliedNewTip, false, nil, nil
371+
}
372+
368373
// Now that we've processed this block, we check for any blocks that were previously
369374
// stored as orphans, which are children of this block. We can process them now.
370375
blockNodesAtNextHeight := bc.blockIndex.GetBlockNodesByHeight(uint64(blockNode.Height) + 1)

0 commit comments

Comments
 (0)