Fix tree-states sub-epoch diffs (#5097)

This commit is contained in:
Michael Sproul
2024-01-30 15:56:48 +11:00
committed by GitHub
parent 11461d8f51
commit 7862c71bb5
12 changed files with 255 additions and 65 deletions

View File

@@ -130,6 +130,8 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
}
// Store block roots, including at all skip slots in the freezer DB.
// The block root mapping for `block.slot()` itself was already written when the block
// was stored, above.
for slot in (block.slot().as_usize() + 1..prev_block_slot.as_usize()).rev() {
cold_batch.push(KeyValueStoreOp::PutKeyValue(
get_key_for_col(DBColumn::BeaconBlockRoots.into(), &slot.to_be_bytes()),