Skip to content

Commit

Permalink
add missing finals
Browse files Browse the repository at this point in the history
  • Loading branch information
mehdi-aouadi committed Feb 2, 2024
1 parent 3112b9a commit 3978a82
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import tech.pegasys.teku.spec.datastructures.operations.AttesterSlashing;

public class AttesterSlashingEvent extends Event<AttesterSlashing> {
AttesterSlashingEvent(AttesterSlashing attesterSlashing) {
AttesterSlashingEvent(final AttesterSlashing attesterSlashing) {
super(attesterSlashing.getSchema().getJsonTypeDefinition(), attesterSlashing);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import tech.pegasys.teku.spec.datastructures.operations.ProposerSlashing;

public class ProposerSlashingEvent extends Event<ProposerSlashing> {
ProposerSlashingEvent(ProposerSlashing proposerSlashing) {
ProposerSlashingEvent(final ProposerSlashing proposerSlashing) {
super(proposerSlashing.getSchema().getJsonTypeDefinition(), proposerSlashing);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public NodeDataProvider(
}

public List<Attestation> getAttestations(
Optional<UInt64> maybeSlot, Optional<UInt64> maybeCommitteeIndex) {
final Optional<UInt64> maybeSlot, final Optional<UInt64> maybeCommitteeIndex) {
return attestationPool.getAttestations(maybeSlot, maybeCommitteeIndex);
}

Expand All @@ -113,20 +113,22 @@ public List<SignedVoluntaryExit> getVoluntaryExits() {
return new ArrayList<>(voluntaryExitPool.getAll());
}

public SafeFuture<InternalValidationResult> postVoluntaryExit(SignedVoluntaryExit exit) {
public SafeFuture<InternalValidationResult> postVoluntaryExit(final SignedVoluntaryExit exit) {
return voluntaryExitPool.addLocal(exit);
}

public SafeFuture<InternalValidationResult> postAttesterSlashing(AttesterSlashing slashing) {
public SafeFuture<InternalValidationResult> postAttesterSlashing(
final AttesterSlashing slashing) {
return attesterSlashingPool.addLocal(slashing);
}

public SafeFuture<InternalValidationResult> postProposerSlashing(ProposerSlashing slashing) {
public SafeFuture<InternalValidationResult> postProposerSlashing(
final ProposerSlashing slashing) {
return proposerSlashingPool.addLocal(slashing);
}

public List<SignedBlsToExecutionChange> getBlsToExecutionChanges(
Optional<Boolean> locallySubmitted) {
final Optional<Boolean> locallySubmitted) {
if (locallySubmitted.isPresent() && locallySubmitted.get()) {
return new ArrayList<>(blsToExecutionChangePool.getLocallySubmitted());
}
Expand Down Expand Up @@ -168,37 +170,40 @@ private SafeFuture<Optional<SubmitDataError>> addBlsToExecutionChange(
});
}

public void subscribeToReceivedBlocks(ReceivedBlockListener listener) {
public void subscribeToReceivedBlocks(final ReceivedBlockListener listener) {
blockManager.subscribeToReceivedBlocks(listener);
}

public void subscribeToReceivedBlobSidecar(NewBlobSidecarSubscriber listener) {
public void subscribeToReceivedBlobSidecar(final NewBlobSidecarSubscriber listener) {
blockBlobSidecarsTrackersPool.subscribeNewBlobSidecar(listener);
}

public void subscribeToAttesterSlashing(OperationAddedSubscriber<AttesterSlashing> listener) {
public void subscribeToAttesterSlashing(
final OperationAddedSubscriber<AttesterSlashing> listener) {
attesterSlashingPool.subscribeOperationAdded(listener);
}

public void subscribeToProposerSlashing(OperationAddedSubscriber<ProposerSlashing> listener) {
public void subscribeToProposerSlashing(
final OperationAddedSubscriber<ProposerSlashing> listener) {
proposerSlashingPool.subscribeOperationAdded(listener);
}

public void subscribeToValidAttestations(ProcessedAttestationListener listener) {
public void subscribeToValidAttestations(final ProcessedAttestationListener listener) {
attestationManager.subscribeToAllValidAttestations(listener);
}

public void subscribeToNewVoluntaryExits(OperationAddedSubscriber<SignedVoluntaryExit> listener) {
public void subscribeToNewVoluntaryExits(
final OperationAddedSubscriber<SignedVoluntaryExit> listener) {
voluntaryExitPool.subscribeOperationAdded(listener);
}

public void subscribeToNewBlsToExecutionChanges(
OperationAddedSubscriber<SignedBlsToExecutionChange> listener) {
final OperationAddedSubscriber<SignedBlsToExecutionChange> listener) {
blsToExecutionChangePool.subscribeOperationAdded(listener);
}

public void subscribeToSyncCommitteeContributions(
OperationAddedSubscriber<SignedContributionAndProof> listener) {
final OperationAddedSubscriber<SignedContributionAndProof> listener) {
syncCommitteeContributionPool.subscribeOperationAdded(listener);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ public void onAttestationAggregationDue(final UInt64 slot) {
}

@Override
public void onAttesterSlashing(AttesterSlashing attesterSlashing) {}
public void onAttesterSlashing(final AttesterSlashing attesterSlashing) {}

@Override
public void onProposerSlashing(ProposerSlashing proposerSlashing) {}
public void onProposerSlashing(final ProposerSlashing proposerSlashing) {}

@Override
public void onUpdatedValidatorStatuses(
Expand Down

0 comments on commit 3978a82

Please sign in to comment.