Skip to content

Commit

Permalink
Use oldest_block_slot to break off pruning payloads (#6745)
Browse files Browse the repository at this point in the history
* Use oldest_block_slot to break of pruning payloads

* Update beacon_node/store/src/hot_cold_store.rs

Co-authored-by: Michael Sproul <micsproul@gmail.com>

* Merge remote-tracking branch 'origin/unstable' into anchor_slot_pruning
  • Loading branch information
dapplion authored Jan 10, 2025
1 parent a244aa3 commit 722573f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions beacon_node/store/src/hot_cold_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2629,7 +2629,7 @@ impl<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> HotColdDB<E, Hot, Cold>
"Pruning finalized payloads";
"info" => "you may notice degraded I/O performance while this runs"
);
let anchor_slot = self.get_anchor_info().anchor_slot;
let anchor_info = self.get_anchor_info();

let mut ops = vec![];
let mut last_pruned_block_root = None;
Expand Down Expand Up @@ -2670,10 +2670,10 @@ impl<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> HotColdDB<E, Hot, Cold>
ops.push(StoreOp::DeleteExecutionPayload(block_root));
}

if slot == anchor_slot {
if slot <= anchor_info.oldest_block_slot {
info!(
self.log,
"Payload pruning reached anchor state";
"Payload pruning reached anchor oldest block slot";
"slot" => slot
);
break;
Expand Down

0 comments on commit 722573f

Please sign in to comment.