Add non-compiling half finished changes

This commit is contained in:
Paul Hauner
2019-08-08 10:29:27 +10:00
parent 65ce94b2ef
commit 9f9af746ea
2 changed files with 54 additions and 73 deletions

View File

@@ -14,10 +14,7 @@ pub use self::verify_proposer_slashing::verify_proposer_slashing;
pub use is_valid_indexed_attestation::{
is_valid_indexed_attestation, is_valid_indexed_attestation_without_signature,
};
pub use verify_attestation::{
verify_attestation, verify_attestation_time_independent_only,
verify_attestation_without_signature,
};
pub use verify_attestation::{verify_attestation_for_block, verify_attestation_for_state};
pub use verify_deposit::{
get_existing_validator_index, verify_deposit_merkle_proof, verify_deposit_signature,
};
@@ -37,6 +34,12 @@ mod verify_exit;
mod verify_proposer_slashing;
mod verify_transfer;
#[derive(PartialEq)]
pub enum VerifySignatures {
True,
False,
}
/// Updates the state for a new block, whilst validating that the block is valid.
///
/// Returns `Ok(())` if the block is valid and the state was successfully updated. Otherwise
@@ -312,7 +315,8 @@ pub fn process_attestations<T: EthSpec>(
.par_iter()
.enumerate()
.try_for_each(|(i, attestation)| {
verify_attestation(state, attestation, spec).map_err(|e| e.into_with_index(i))
verify_attestation_for_block(state, attestation, spec, VerifySignatures::True)
.map_err(|e| e.into_with_index(i))
})?;
// Update the state in series.