From 61c8781554cc30fd46c43b6bb1e7d0667a3b1b76 Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Wed, 15 Jan 2020 16:02:58 +1100 Subject: [PATCH] Adjust TODO --- beacon_node/beacon_chain/src/fork_choice.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/beacon_node/beacon_chain/src/fork_choice.rs b/beacon_node/beacon_chain/src/fork_choice.rs index e488a28a1f..b274342eb3 100644 --- a/beacon_node/beacon_chain/src/fork_choice.rs +++ b/beacon_node/beacon_chain/src/fork_choice.rs @@ -94,8 +94,6 @@ impl JustificationManager { ) -> Result<()> { 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. if new_checkpoint.epoch > self.justified_checkpoint.epoch { let new_checkpoint_balances = CheckpointBalances { @@ -119,6 +117,9 @@ impl JustificationManager { // If the new justified checkpoint is an ancestor of the current justified checkpoint, // 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) { self.justified_checkpoint = new_checkpoint_balances.clone() }