2019-06-15 18:03:29 +00:00
|
|
|
mod reduced_tree;
|
2019-06-15 15:26:56 +00:00
|
|
|
|
|
|
|
use std::sync::Arc;
|
2019-06-15 18:03:29 +00:00
|
|
|
use store::Store;
|
|
|
|
use types::{EthSpec, Hash256, Slot};
|
2019-06-15 15:26:56 +00:00
|
|
|
|
2019-06-15 18:03:29 +00:00
|
|
|
pub use reduced_tree::ThreadSafeReducedTree;
|
2019-06-15 15:26:56 +00:00
|
|
|
|
2019-06-15 18:03:29 +00:00
|
|
|
pub type Result<T> = std::result::Result<T, String>;
|
2019-06-15 15:26:56 +00:00
|
|
|
|
2019-06-15 18:03:29 +00:00
|
|
|
pub trait LmdGhost<S: Store, E: EthSpec>: Send + Sync {
|
|
|
|
fn new(store: Arc<S>) -> Self;
|
2019-06-15 15:26:56 +00:00
|
|
|
|
|
|
|
fn process_message(
|
|
|
|
&self,
|
|
|
|
validator_index: usize,
|
|
|
|
block_hash: Hash256,
|
|
|
|
block_slot: Slot,
|
|
|
|
) -> Result<()>;
|
|
|
|
|
|
|
|
fn find_head(&self) -> Result<Hash256>;
|
|
|
|
}
|