mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-11 18:04:18 +00:00
Keep execution payload during historical backfill when prune-payloads set to false (#6766)
- #6510 - Keep execution payload during historical backfill when `--prune-payloads false` is set - Add a field in the historical backfill debug log to indicate if execution payload is kept - Add a test to check historical blocks has execution payload when `--prune-payloads false is set - Very minor typo correction that I notice when working on this
This commit is contained in:
@@ -130,10 +130,20 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
});
|
||||
}
|
||||
|
||||
let blinded_block = block.clone_as_blinded();
|
||||
// Store block in the hot database without payload.
|
||||
self.store
|
||||
.blinded_block_as_kv_store_ops(&block_root, &blinded_block, &mut hot_batch);
|
||||
if !self.store.get_config().prune_payloads {
|
||||
// If prune-payloads is set to false, store the block which includes the execution payload
|
||||
self.store
|
||||
.block_as_kv_store_ops(&block_root, (*block).clone(), &mut hot_batch)?;
|
||||
} else {
|
||||
let blinded_block = block.clone_as_blinded();
|
||||
// Store block in the hot database without payload.
|
||||
self.store.blinded_block_as_kv_store_ops(
|
||||
&block_root,
|
||||
&blinded_block,
|
||||
&mut hot_batch,
|
||||
);
|
||||
}
|
||||
|
||||
// Store the blobs too
|
||||
if let Some(blobs) = maybe_blobs {
|
||||
new_oldest_blob_slot = Some(block.slot());
|
||||
|
||||
Reference in New Issue
Block a user