Skip to content

Commit f30246b

Browse files
authored
Some small changes (#5739)
1 parent 90179d4 commit f30246b

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
@@ -560,6 +560,7 @@ impl<'a, T: BeaconChainTypes> IndexedAggregatedAttestation<'a, T> {
560560
})?;
561561

562562
if let Some(committee) = committee {
563+
// TODO(electra):
563564
// Note: this clones the signature which is known to be a relatively slow operation.
564565
//
565566
// Future optimizations should remove this clone.
@@ -599,7 +600,7 @@ impl<'a, T: BeaconChainTypes> IndexedAggregatedAttestation<'a, T> {
599600

600601
let indexed_attestation = match map_attestation_committees(
601602
chain,
602-
&attestation,
603+
attestation,
603604
get_indexed_attestation_with_committee,
604605
) {
605606
Ok(indexed_attestation) => indexed_attestation,
@@ -1281,7 +1282,7 @@ pub fn obtain_indexed_attestation_and_committees_per_slot<T: BeaconChainTypes>(
12811282
chain: &BeaconChain<T>,
12821283
attestation: AttestationRef<T::EthSpec>,
12831284
) -> Result<(IndexedAttestation<T::EthSpec>, CommitteesPerSlot), Error> {
1284-
map_attestation_committees(chain, &attestation, |(committees, committees_per_slot)| {
1285+
map_attestation_committees(chain, attestation, |(committees, committees_per_slot)| {
12851286
match attestation {
12861287
AttestationRef::Base(att) => {
12871288
let committee = committees
@@ -1335,7 +1336,7 @@ pub fn obtain_indexed_attestation_and_committees_per_slot<T: BeaconChainTypes>(
13351336
/// from disk and then update the `shuffling_cache`.
13361337
fn map_attestation_committees<T, F, R>(
13371338
chain: &BeaconChain<T>,
1338-
attestation: &AttestationRef<T::EthSpec>,
1339+
attestation: AttestationRef<T::EthSpec>,
13391340
map_fn: F,
13401341
) -> Result<R, Error>
13411342
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)