mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-08 17:26:04 +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";
|
"Pruning finalized payloads";
|
||||||
"info" => "you may notice degraded I/O performance while this runs"
|
"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 ops = vec![];
|
||||||
let mut last_pruned_block_root = None;
|
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));
|
ops.push(StoreOp::DeleteExecutionPayload(block_root));
|
||||||
}
|
}
|
||||||
|
|
||||||
if slot == anchor_slot {
|
if slot <= anchor_info.oldest_block_slot {
|
||||||
info!(
|
info!(
|
||||||
self.log,
|
self.log,
|
||||||
"Payload pruning reached anchor state";
|
"Payload pruning reached anchor oldest block slot";
|
||||||
"slot" => slot
|
"slot" => slot
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user