Allow state processing to compile under v0.5.0

This commit is contained in:
Paul Hauner
2019-03-17 17:47:12 +11:00
parent 3b8c1df5da
commit 3a384d93f8
13 changed files with 422 additions and 242 deletions

View File

@@ -72,8 +72,8 @@ fn per_block_processing_signature_optional(
process_block_header(state, block, spec)?;
// Ensure the current and previous epoch cache is built.
state.build_epoch_cache(RelativeEpoch::Current, spec)?;
state.build_epoch_cache(RelativeEpoch::Previous, spec)?;
state.build_epoch_cache(RelativeEpoch::Current, spec)?;
if should_verify_block_signature {
verify_block_signature(&state, &block, &spec)?;
@@ -94,7 +94,7 @@ fn per_block_processing_signature_optional(
///
/// Spec v0.5.0
pub fn process_block_header(
state: &BeaconState,
state: &mut BeaconState,
block: &BeaconBlock,
spec: &ChainSpec,
) -> Result<(), Error> {