diff --git a/beacon_chain/consensus_object_pools/blockchain_dag.nim b/beacon_chain/consensus_object_pools/blockchain_dag.nim index 36a721f53..3bd134502 100644 --- a/beacon_chain/consensus_object_pools/blockchain_dag.nim +++ b/beacon_chain/consensus_object_pools/blockchain_dag.nim @@ -874,7 +874,7 @@ proc delState(dag: ChainDAGRef, bs: BlockSlot) = proc pruneBlocksDAG(dag: ChainDAGRef) = ## This prunes the block DAG ## This does NOT prune the cached state checkpoints and EpochRef - ## This should be done after a new finalization point is reached + ## This must be done after a new finalization point is reached ## to invalidate pending blocks or attestations referring ## to a now invalid fork. ## @@ -882,43 +882,39 @@ proc pruneBlocksDAG(dag: ChainDAGRef) = ## as the caches and fork choice can be pruned at a later time. # Clean up block refs, walking block by block - if dag.lastPrunePoint != dag.finalizedHead: - let start = Moment.now() + let start = Moment.now() - # Finalization means that we choose a single chain as the canonical one - - # it also means we're no longer interested in any branches from that chain - # up to the finalization point - let hlen = dag.heads.len - for i in 0..