Integrate proto_array into lighthouse

This commit is contained in:
Paul Hauner
2020-01-14 17:05:59 +11:00
parent 0f9d0ff3b9
commit b8d33ae26b
12 changed files with 259 additions and 345 deletions

View File

@@ -201,6 +201,10 @@ impl ProtoArrayForkChoice {
self.proto_array.read().nodes.len()
}
pub fn contains_block(&self, block_root: &Hash256) -> bool {
self.proto_array.read().indices.contains_key(block_root)
}
pub fn latest_message(&self, validator_index: usize) -> Option<(Hash256, Epoch)> {
let votes = self.votes.read();

View File

@@ -18,7 +18,6 @@ serde_yaml = "0.8.11"
eth2_ssz = "0.1.2"
beacon_chain = { path = "../../beacon_node/beacon_chain" }
store = { path = "../../beacon_node/store" }
lmd_ghost = { path = "../lmd_ghost" }
[dependencies]