mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-21 22:04:44 +00:00
Address majority of Michael's comments
This commit is contained in:
@@ -65,7 +65,7 @@ impl<T: BeaconChainTypes> ForkChoice<T> {
|
||||
Self {
|
||||
backend,
|
||||
genesis_block_root,
|
||||
checkpoint_manager: RwLock::new(CheckpointManager::new(genesis_checkpoint.clone())),
|
||||
checkpoint_manager: RwLock::new(CheckpointManager::new(genesis_checkpoint)),
|
||||
_phantom: PhantomData,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -248,10 +248,9 @@ impl CheckpointManager {
|
||||
finalized: state.finalized_checkpoint.clone(),
|
||||
};
|
||||
|
||||
// From the given state, read the block root at first slot of
|
||||
// `self.justified_checkpoint.epoch`. If that root matches, then
|
||||
// `new_justified_checkpoint` is a descendant of `self.justified_checkpoint` and we may
|
||||
// proceed (see next `if` statement).
|
||||
// Using the given `state`, determine its ancestor at the slot of our current justified
|
||||
// epoch. Later, this will be compared to the root of the current justified checkpoint
|
||||
// to determine if this state is descendant of our current justified state.
|
||||
let new_checkpoint_ancestor = Self::get_block_root_at_slot(
|
||||
state,
|
||||
chain,
|
||||
|
||||
Reference in New Issue
Block a user