Update account manager config parsing

This commit is contained in:
Paul Hauner
2019-06-09 04:34:56 -04:00
parent 3487b16ce5
commit ab12787610
12 changed files with 66 additions and 96 deletions

View File

@@ -22,7 +22,7 @@ impl<T: EthSpec> BlockProcessingBuilder<T> {
}
}
pub fn set_slot(&mut self, slot: Slot, spec: &ChainSpec) {
pub fn set_slot(&mut self, slot: Slot) {
self.state_builder.teleport_to_slot(slot);
}

View File

@@ -223,7 +223,7 @@ impl ValidatorStatuses {
if is_from_epoch(a, state.current_epoch()) {
status.is_current_epoch_attester = true;
if target_matches_epoch_start_block(a, state, state.current_epoch(), spec)? {
if target_matches_epoch_start_block(a, state, state.current_epoch())? {
status.is_current_epoch_target_attester = true;
}
} else if is_from_epoch(a, state.previous_epoch()) {
@@ -244,7 +244,7 @@ impl ValidatorStatuses {
)?,
});
if target_matches_epoch_start_block(a, state, state.previous_epoch(), spec)? {
if target_matches_epoch_start_block(a, state, state.previous_epoch())? {
status.is_previous_epoch_target_attester = true;
}
@@ -336,7 +336,6 @@ fn target_matches_epoch_start_block<T: EthSpec>(
a: &PendingAttestation,
state: &BeaconState<T>,
epoch: Epoch,
spec: &ChainSpec,
) -> Result<bool, BeaconStateError> {
let slot = epoch.start_slot(T::slots_per_epoch());
let state_boundary_root = *state.get_block_root(slot)?;