mirror of
https://gitlab.com/pulsechaincom/lighthouse-pulse.git
synced 2025-01-07 03:22:20 +00:00
Only store non-empty orphaned blobs
This commit is contained in:
parent
caa04db58a
commit
0bdc291490
@ -596,12 +596,18 @@ impl<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> BackgroundMigrator<E, Ho
|
|||||||
.into_iter()
|
.into_iter()
|
||||||
.map(Into::into)
|
.map(Into::into)
|
||||||
.flat_map(|block_root: Hash256| {
|
.flat_map(|block_root: Hash256| {
|
||||||
[
|
let mut store_ops = vec![
|
||||||
StoreOp::DeleteBlock(block_root),
|
StoreOp::DeleteBlock(block_root),
|
||||||
StoreOp::DeleteExecutionPayload(block_root),
|
StoreOp::DeleteExecutionPayload(block_root),
|
||||||
StoreOp::DeleteBlobs(block_root),
|
];
|
||||||
StoreOp::PutOrphanedBlobsKey(block_root),
|
if let Ok(true) = store.blobs_sidecar_exists(&block_root) {
|
||||||
]
|
// Keep track of non-empty orphaned blobs sidecars.
|
||||||
|
store_ops.extend([
|
||||||
|
StoreOp::DeleteBlobs(block_root),
|
||||||
|
StoreOp::PutOrphanedBlobsKey(block_root),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
store_ops
|
||||||
})
|
})
|
||||||
.chain(
|
.chain(
|
||||||
abandoned_states
|
abandoned_states
|
||||||
|
Loading…
Reference in New Issue
Block a user