Updates all fork-choices to use ChainSpec for consts.

This commit is contained in:
Age Manning
2019-02-18 17:49:05 +11:00
parent 6e6d451978
commit 4eddb47fd0
4 changed files with 44 additions and 24 deletions

View File

@@ -347,7 +347,7 @@ impl<T: ClientDB + Sized> ForkChoice for OptimisedLMDGhost<T> {
let mut current_head = *justified_block_start;
let mut latest_votes = self.get_latest_votes(&state_root, block_slot)?;
let mut latest_votes = self.get_latest_votes(&state_root, &block_slot, spec)?;
// remove any votes that don't relate to our current head.
latest_votes
@@ -370,6 +370,7 @@ impl<T: ClientDB + Sized> ForkChoice for OptimisedLMDGhost<T> {
if let Some(clear_winner) = self.get_clear_winner(
&latest_votes,
block_height - (block_height % u64::from(step)) + u64::from(step),
spec,
) {
current_head = clear_winner;
break;