From f8cff3bd2e1be3f1ce1bdf439ae59536024f094e Mon Sep 17 00:00:00 2001 From: pscott <30843220+pscott@users.noreply.github.com> Date: Thu, 23 Jan 2020 04:35:13 +0400 Subject: [PATCH] Optimize block production (#820) * Remove SignatureVerif on block production; short-circuit fetching attestations when num attestations < T::MaxAttestation * Cargo fmt * Remove short-circuiting --- eth2/operation_pool/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eth2/operation_pool/src/lib.rs b/eth2/operation_pool/src/lib.rs index 3beb2f28e3..9044fc6e47 100644 --- a/eth2/operation_pool/src/lib.rs +++ b/eth2/operation_pool/src/lib.rs @@ -96,6 +96,8 @@ impl OperationPool { } /// Get a list of attestations for inclusion in a block. + /// + /// NOTE: Assumes that all attestations in the operation_pool are valid. pub fn get_attestations( &self, state: &BeaconState, @@ -125,7 +127,7 @@ impl OperationPool { verify_attestation_for_block_inclusion( state, attestation, - VerifySignatures::True, + VerifySignatures::False, spec, ) .is_ok()