Optimize block production (#820)

* Remove SignatureVerif on block production; short-circuit fetching attestations when num attestations < T::MaxAttestation

* Cargo fmt

* Remove short-circuiting
This commit is contained in:
pscott
2020-01-23 11:35:13 +11:00
committed by Michael Sproul
parent 7396cd2cab
commit f8cff3bd2e
+3 -1
View File
@@ -96,6 +96,8 @@ impl<T: EthSpec> OperationPool<T> {
}
/// 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<T>,
@@ -125,7 +127,7 @@ impl<T: EthSpec> OperationPool<T> {
verify_attestation_for_block_inclusion(
state,
attestation,
VerifySignatures::True,
VerifySignatures::False,
spec,
)
.is_ok()