mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-18 13:28:33 +00:00
Various small tree-states fixes (#4861)
* Fix block backfill with genesis skip slots * Fix freezer upper limit * Fix: write post state in lcli skip-slots (#4843) * Added CARGO_USE_GIT_CLI to the Dockerfile (#4828) * chore: replace deprecated hub with gh for releases (#4839) * Put schema version back to 24 (ignore Deneb) * Minimise diff --------- Co-authored-by: Joe Clapis <jclapis@outlook.com> Co-authored-by: Dustin Brickwood <dustinbrickwood204@gmail.com>
This commit is contained in:
@@ -140,17 +140,17 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
prev_block_slot = block.slot();
|
||||
expected_block_root = block.message().parent_root();
|
||||
|
||||
// If we've reached genesis, add the genesis block root to the batch and set the
|
||||
// anchor slot to 0 to indicate completion.
|
||||
// If we've reached genesis, add the genesis block root to the batch for all slots
|
||||
// between 0 and the first block slot, and set the anchor slot to 0 to indicate
|
||||
// completion.
|
||||
if expected_block_root == self.genesis_block_root {
|
||||
let genesis_slot = self.spec.genesis_slot;
|
||||
cold_batch.push(KeyValueStoreOp::PutKeyValue(
|
||||
get_key_for_col(
|
||||
DBColumn::BeaconBlockRoots.into(),
|
||||
&genesis_slot.as_u64().to_be_bytes(),
|
||||
),
|
||||
self.genesis_block_root.as_bytes().to_vec(),
|
||||
));
|
||||
for slot in genesis_slot.as_u64()..block.slot().as_u64() {
|
||||
cold_batch.push(KeyValueStoreOp::PutKeyValue(
|
||||
get_key_for_col(DBColumn::BeaconBlockRoots.into(), &slot.to_be_bytes()),
|
||||
self.genesis_block_root.as_bytes().to_vec(),
|
||||
));
|
||||
}
|
||||
prev_block_slot = genesis_slot;
|
||||
expected_block_root = Hash256::zero();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user