Add progress on state_processing fixed-len update

This commit is contained in:
Paul Hauner
2019-05-08 15:36:02 +10:00
parent 7a67d34293
commit 8cefd20e9d
29 changed files with 275 additions and 268 deletions

View File

@@ -6,8 +6,8 @@ use types::*;
/// slot.
///
/// Spec v0.5.1
pub fn inclusion_distance(
state: &BeaconState,
pub fn inclusion_distance<T: BeaconStateTypes>(
state: &BeaconState<T>,
attestations: &[&PendingAttestation],
validator_index: usize,
spec: &ChainSpec,
@@ -19,8 +19,8 @@ pub fn inclusion_distance(
/// Returns the slot of the earliest included attestation for some validator.
///
/// Spec v0.5.1
pub fn inclusion_slot(
state: &BeaconState,
pub fn inclusion_slot<T: BeaconStateTypes>(
state: &BeaconState<T>,
attestations: &[&PendingAttestation],
validator_index: usize,
spec: &ChainSpec,
@@ -32,8 +32,8 @@ pub fn inclusion_slot(
/// Finds the earliest included attestation for some validator.
///
/// Spec v0.5.1
fn earliest_included_attestation(
state: &BeaconState,
fn earliest_included_attestation<T: BeaconStateTypes>(
state: &BeaconState<T>,
attestations: &[&PendingAttestation],
validator_index: usize,
spec: &ChainSpec,