Pull basic LMD Ghost into fork choice crate.

- Moves the basic implementation into the fork choice crate.
- Builds the option of fork choices into beacon_struct.
This commit is contained in:
Age Manning
2019-02-05 17:15:15 +11:00
parent 8109fad7bf
commit 0972c67d19
7 changed files with 214 additions and 198 deletions

View File

@@ -22,3 +22,15 @@ pub mod basic_lmd_ghost;
pub mod longest_chain;
pub mod optimised_lmd_ghost;
pub mod protolambda_lmd_ghost;
/// Fork choice options that are currently implemented.
pub enum ForkChoice {
/// Chooses the longest chain becomes the head. Not for production.
LongestChain,
/// A simple and highly inefficient implementation of LMD ghost.
BasicLMDGhost,
/// An optimised version of LMD-GHOST by Vitalik.
OptimmisedLMDGhost,
/// An optimised version of LMD-GHOST by Protolambda.
ProtoLMDGhost,
}