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:
parent
7396cd2cab
commit
f8cff3bd2e
@ -96,6 +96,8 @@ impl<T: EthSpec> OperationPool<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Get a list of attestations for inclusion in a block.
|
/// 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(
|
pub fn get_attestations(
|
||||||
&self,
|
&self,
|
||||||
state: &BeaconState<T>,
|
state: &BeaconState<T>,
|
||||||
@ -125,7 +127,7 @@ impl<T: EthSpec> OperationPool<T> {
|
|||||||
verify_attestation_for_block_inclusion(
|
verify_attestation_for_block_inclusion(
|
||||||
state,
|
state,
|
||||||
attestation,
|
attestation,
|
||||||
VerifySignatures::True,
|
VerifySignatures::False,
|
||||||
spec,
|
spec,
|
||||||
)
|
)
|
||||||
.is_ok()
|
.is_ok()
|
||||||
|
Loading…
Reference in New Issue
Block a user