Skip to content

Commit

Permalink
spotlessly
Browse files Browse the repository at this point in the history
  • Loading branch information
tbenr committed Jan 17, 2025
1 parent b2073fb commit 61ff4bf
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,8 @@ private AttestationPerformance calculateAttestationPerformance(
// data hash to inclusion slot to aggregation bitlist
final Map<Bytes32, NavigableMap<UInt64, AttestationBitsAggregator>>
slotAndBitlistsByAttestationDataHash = new HashMap<>();
for (final Map.Entry<UInt64, List<Attestation>> entry : attestationsIncludedOnChain.entrySet()) {
for (final Map.Entry<UInt64, List<Attestation>> entry :
attestationsIncludedOnChain.entrySet()) {
for (final Attestation attestation : entry.getValue()) {
final Optional<Int2IntMap> committeesSize = getCommitteesSize(attestation, state);
final Bytes32 attestationDataHash = attestation.getData().hashTreeRoot();
Expand Down Expand Up @@ -373,11 +374,12 @@ private AttestationPerformance calculateAttestationPerformance(
analyzedEpoch, validatorTracker.getNumberOfValidatorsForEpoch(analyzedEpoch));
}

private Optional<Int2IntMap> getCommitteesSize(final Attestation attestation, final BeaconState state) {
if(!attestation.requiresCommitteeBits()) {
private Optional<Int2IntMap> getCommitteesSize(
final Attestation attestation, final BeaconState state) {
if (!attestation.requiresCommitteeBits()) {
return Optional.empty();
}
return Optional.of(spec.getBeaconCommitteesSize(state, attestation.getData().getSlot()));
return Optional.of(spec.getBeaconCommitteesSize(state, attestation.getData().getSlot()));
}

private SafeFuture<Set<BeaconBlock>> getBlocksInEpochs(
Expand Down

0 comments on commit 61ff4bf

Please sign in to comment.