From 5031ee5505924071f46029a944794cf7c0782862 Mon Sep 17 00:00:00 2001 From: Age Manning Date: Fri, 15 Feb 2019 13:32:37 +1100 Subject: [PATCH] Remove comments from fork choice. --- eth2/fork_choice/src/lib.rs | 5 ----- eth2/fork_choice/src/longest_chain.rs | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/eth2/fork_choice/src/lib.rs b/eth2/fork_choice/src/lib.rs index e876ed60f..c0df820c6 100644 --- a/eth2/fork_choice/src/lib.rs +++ b/eth2/fork_choice/src/lib.rs @@ -44,14 +44,12 @@ extern crate types; pub mod longest_chain; pub mod optimised_lmd_ghost; -//pub mod protolambda_lmd_ghost; pub mod slow_lmd_ghost; use db::stores::BeaconBlockAtSlotError; use db::DBError; use types::{BeaconBlock, Hash256}; -// export the main structs pub use longest_chain::LongestChain; pub use optimised_lmd_ghost::OptimisedLMDGhost; @@ -118,7 +116,4 @@ pub enum ForkChoiceAlgorithms { SlowLMDGhost, /// An optimised version of LMD-GHOST by Vitalik. OptimisedLMDGhost, - // Protolambda currently not implemented - // /// An optimised version of LMD-GHOST by Protolambda. - //ProtoLMDGhost, } diff --git a/eth2/fork_choice/src/longest_chain.rs b/eth2/fork_choice/src/longest_chain.rs index c25cd43a1..8056c11f2 100644 --- a/eth2/fork_choice/src/longest_chain.rs +++ b/eth2/fork_choice/src/longest_chain.rs @@ -52,7 +52,7 @@ impl ForkChoice for LongestChain { let block = self .block_store .get_deserialized(&block_hash)? - .ok_or(ForkChoiceError::MissingBeaconBlock(*block_hash))?; + .ok_or_else(|| ForkChoiceError::MissingBeaconBlock(*block_hash))?; head_blocks.push((index, block)); }