Skip to content

Commit 0ac8e09

Browse files
ethDreamerrealbigsean
authored andcommitted
Some small changes (sigp#5739)
1 parent f1a0dd9 commit 0ac8e09

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

beacon_node/beacon_chain/src/attestation_verification.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,7 @@ impl<'a, T: BeaconChainTypes> IndexedAggregatedAttestation<'a, T> {
583583
})?;
584584

585585
if let Some(committee) = committee {
586+
// TODO(electra):
586587
// Note: this clones the signature which is known to be a relatively slow operation.
587588
//
588589
// Future optimizations should remove this clone.
@@ -622,7 +623,7 @@ impl<'a, T: BeaconChainTypes> IndexedAggregatedAttestation<'a, T> {
622623

623624
let indexed_attestation = match map_attestation_committees(
624625
chain,
625-
&attestation,
626+
attestation,
626627
get_indexed_attestation_with_committee,
627628
) {
628629
Ok(indexed_attestation) => indexed_attestation,
@@ -1330,7 +1331,7 @@ pub fn obtain_indexed_attestation_and_committees_per_slot<T: BeaconChainTypes>(
13301331
chain: &BeaconChain<T>,
13311332
attestation: AttestationRef<T::EthSpec>,
13321333
) -> Result<(IndexedAttestation<T::EthSpec>, CommitteesPerSlot), Error> {
1333-
map_attestation_committees(chain, &attestation, |(committees, committees_per_slot)| {
1334+
map_attestation_committees(chain, attestation, |(committees, committees_per_slot)| {
13341335
match attestation {
13351336
AttestationRef::Base(att) => {
13361337
let committee = committees
@@ -1384,7 +1385,7 @@ pub fn obtain_indexed_attestation_and_committees_per_slot<T: BeaconChainTypes>(
13841385
/// from disk and then update the `shuffling_cache`.
13851386
fn map_attestation_committees<T, F, R>(
13861387
chain: &BeaconChain<T>,
1387-
attestation: &AttestationRef<T::EthSpec>,
1388+
attestation: AttestationRef<T::EthSpec>,
13881389
map_fn: F,
13891390
) -> Result<R, Error>
13901391
where

beacon_node/operation_pool/src/attestation_storage.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ impl<E: EthSpec> AttestationMap<E> {
239239
let attestation_map = self.checkpoint_map.entry(checkpoint).or_default();
240240
let attestations = attestation_map.attestations.entry(data).or_default();
241241

242+
// TODO(electra):
242243
// Greedily aggregate the attestation with all existing attestations.
243244
// NOTE: this is sub-optimal and in future we will remove this in favour of max-clique
244245
// aggregation.

0 commit comments

Comments
 (0)