mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-07 16:55:46 +00:00
Adjust TODO
This commit is contained in:
@@ -94,8 +94,6 @@ impl JustificationManager {
|
|||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
let new_checkpoint = &state.current_justified_checkpoint;
|
let new_checkpoint = &state.current_justified_checkpoint;
|
||||||
|
|
||||||
// TODO: add check about block.slot <= justified epoch start slot.
|
|
||||||
|
|
||||||
// Only proceeed if the new checkpoint is better than our current checkpoint.
|
// Only proceeed if the new checkpoint is better than our current checkpoint.
|
||||||
if new_checkpoint.epoch > self.justified_checkpoint.epoch {
|
if new_checkpoint.epoch > self.justified_checkpoint.epoch {
|
||||||
let new_checkpoint_balances = CheckpointBalances {
|
let new_checkpoint_balances = CheckpointBalances {
|
||||||
@@ -119,6 +117,9 @@ impl JustificationManager {
|
|||||||
|
|
||||||
// If the new justified checkpoint is an ancestor of the current justified checkpoint,
|
// If the new justified checkpoint is an ancestor of the current justified checkpoint,
|
||||||
// it is always safe to change it.
|
// it is always safe to change it.
|
||||||
|
//
|
||||||
|
// TODO: check the slot of the block to see if we can update it. Might involve DB read
|
||||||
|
// or maybe we can add it to proto-array.
|
||||||
if new_checkpoint_ancestor == Some(self.justified_checkpoint.root) {
|
if new_checkpoint_ancestor == Some(self.justified_checkpoint.root) {
|
||||||
self.justified_checkpoint = new_checkpoint_balances.clone()
|
self.justified_checkpoint = new_checkpoint_balances.clone()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user