Add OptimizedLMDGhost fork choice rule and tests

This commit is contained in:
pawanjay176
2019-03-13 00:22:15 +05:30
parent b2926b4ed0
commit 2b7aa269c3
3 changed files with 475 additions and 3 deletions

View File

@@ -23,6 +23,7 @@ extern crate types;
pub mod bitwise_lmd_ghost;
pub mod longest_chain;
pub mod slow_lmd_ghost;
pub mod optimized_lmd_ghost;
use db::stores::BeaconBlockAtSlotError;
use db::DBError;
@@ -31,6 +32,7 @@ use types::{BeaconBlock, ChainSpec, Hash256};
pub use bitwise_lmd_ghost::BitwiseLMDGhost;
pub use longest_chain::LongestChain;
pub use slow_lmd_ghost::SlowLMDGhost;
pub use optimized_lmd_ghost::OptimizedLMDGhost;
/// Defines the interface for Fork Choices. Each Fork choice will define their own data structures
/// which can be built in block processing through the `add_block` and `add_attestation` functions.
@@ -101,4 +103,6 @@ pub enum ForkChoiceAlgorithm {
SlowLMDGhost,
/// An optimised version of bitwise LMD-GHOST by Vitalik.
BitwiseLMDGhost,
/// An optimised implementation of LMD ghost.
OptimizedLMDGhost
}