mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-31 21:27:12 +00:00
Rename BeaconStateTypes to EthSpec
This commit is contained in:
@@ -11,7 +11,7 @@ use log::{debug, trace};
|
||||
use std::collections::HashMap;
|
||||
use std::marker::PhantomData;
|
||||
use std::sync::Arc;
|
||||
use types::{BeaconBlock, BeaconState, BeaconStateTypes, ChainSpec, Hash256, Slot, SlotHeight};
|
||||
use types::{BeaconBlock, BeaconState, ChainSpec, EthSpec, Hash256, Slot, SlotHeight};
|
||||
|
||||
//TODO: Pruning - Children
|
||||
//TODO: Handle Syncing
|
||||
@@ -54,7 +54,7 @@ pub struct BitwiseLMDGhost<T: ClientDB + Sized, B> {
|
||||
_phantom: PhantomData<B>,
|
||||
}
|
||||
|
||||
impl<T, B: BeaconStateTypes> BitwiseLMDGhost<T, B>
|
||||
impl<T, B: EthSpec> BitwiseLMDGhost<T, B>
|
||||
where
|
||||
T: ClientDB + Sized,
|
||||
{
|
||||
@@ -243,7 +243,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: ClientDB + Sized, B: BeaconStateTypes> ForkChoice for BitwiseLMDGhost<T, B> {
|
||||
impl<T: ClientDB + Sized, B: EthSpec> ForkChoice for BitwiseLMDGhost<T, B> {
|
||||
fn add_block(
|
||||
&mut self,
|
||||
block: &BeaconBlock,
|
||||
|
||||
@@ -11,7 +11,7 @@ use std::cmp::Ordering;
|
||||
use std::collections::HashMap;
|
||||
use std::marker::PhantomData;
|
||||
use std::sync::Arc;
|
||||
use types::{BeaconBlock, BeaconState, BeaconStateTypes, ChainSpec, Hash256, Slot, SlotHeight};
|
||||
use types::{BeaconBlock, BeaconState, ChainSpec, EthSpec, Hash256, Slot, SlotHeight};
|
||||
|
||||
//TODO: Pruning - Children
|
||||
//TODO: Handle Syncing
|
||||
@@ -54,7 +54,7 @@ pub struct OptimizedLMDGhost<T: ClientDB + Sized, B> {
|
||||
_phantom: PhantomData<B>,
|
||||
}
|
||||
|
||||
impl<T, B: BeaconStateTypes> OptimizedLMDGhost<T, B>
|
||||
impl<T, B: EthSpec> OptimizedLMDGhost<T, B>
|
||||
where
|
||||
T: ClientDB + Sized,
|
||||
{
|
||||
@@ -214,7 +214,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: ClientDB + Sized, B: BeaconStateTypes> ForkChoice for OptimizedLMDGhost<T, B> {
|
||||
impl<T: ClientDB + Sized, B: EthSpec> ForkChoice for OptimizedLMDGhost<T, B> {
|
||||
fn add_block(
|
||||
&mut self,
|
||||
block: &BeaconBlock,
|
||||
|
||||
@@ -9,7 +9,7 @@ use log::{debug, trace};
|
||||
use std::collections::HashMap;
|
||||
use std::marker::PhantomData;
|
||||
use std::sync::Arc;
|
||||
use types::{BeaconBlock, BeaconState, BeaconStateTypes, ChainSpec, Hash256, Slot};
|
||||
use types::{BeaconBlock, BeaconState, ChainSpec, EthSpec, Hash256, Slot};
|
||||
|
||||
//TODO: Pruning and syncing
|
||||
|
||||
@@ -26,7 +26,7 @@ pub struct SlowLMDGhost<T: ClientDB + Sized, B> {
|
||||
_phantom: PhantomData<B>,
|
||||
}
|
||||
|
||||
impl<T, B: BeaconStateTypes> SlowLMDGhost<T, B>
|
||||
impl<T, B: EthSpec> SlowLMDGhost<T, B>
|
||||
where
|
||||
T: ClientDB + Sized,
|
||||
{
|
||||
@@ -108,7 +108,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: ClientDB + Sized, B: BeaconStateTypes> ForkChoice for SlowLMDGhost<T, B> {
|
||||
impl<T: ClientDB + Sized, B: EthSpec> ForkChoice for SlowLMDGhost<T, B> {
|
||||
/// Process when a block is added
|
||||
fn add_block(
|
||||
&mut self,
|
||||
|
||||
Reference in New Issue
Block a user