mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-01 03:33:47 +00:00
Use oldest_block_slot to break off pruning payloads (#6745)
* 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
This commit is contained in:
@@ -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;
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user