diff --git a/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/AbstractMonitorableEth1Provider.java b/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/AbstractMonitorableEth1Provider.java index d833c503649..bdeba1f3275 100644 --- a/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/AbstractMonitorableEth1Provider.java +++ b/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/AbstractMonitorableEth1Provider.java @@ -30,16 +30,16 @@ protected enum Result { protected Result lastCallResult = Result.FAILED; protected Result lastValidationResult = Result.FAILED; - protected AbstractMonitorableEth1Provider(TimeProvider timeProvider) { + protected AbstractMonitorableEth1Provider(final TimeProvider timeProvider) { this.timeProvider = timeProvider; } - protected synchronized void updateLastValidation(Result result) { + protected synchronized void updateLastValidation(final Result result) { lastValidationTime = timeProvider.getTimeInSeconds(); lastValidationResult = result; } - protected synchronized void updateLastCall(Result result) { + protected synchronized void updateLastCall(final Result result) { lastCallTime = timeProvider.getTimeInSeconds(); lastCallResult = result; } diff --git a/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/DepositEventsAccessor.java b/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/DepositEventsAccessor.java index eaf0bcca2b4..074a200ad45 100644 --- a/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/DepositEventsAccessor.java +++ b/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/DepositEventsAccessor.java @@ -27,13 +27,13 @@ public class DepositEventsAccessor { private final Eth1Provider eth1Provider; private final String contractAddress; - public DepositEventsAccessor(Eth1Provider eth1Provider, String contractAddress) { + public DepositEventsAccessor(final Eth1Provider eth1Provider, final String contractAddress) { this.eth1Provider = eth1Provider; this.contractAddress = contractAddress; } public SafeFuture> depositEventInRange( - DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) { + final DefaultBlockParameter startBlock, final DefaultBlockParameter endBlock) { final EthFilter filter = new EthFilter(startBlock, endBlock, this.contractAddress); filter.addSingleTopic(EventEncoder.encode(DepositContract.DEPOSITEVENT_EVENT)); return SafeFuture.of( diff --git a/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/DepositFetcher.java b/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/DepositFetcher.java index e38414e2acb..94b56621b28 100644 --- a/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/DepositFetcher.java +++ b/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/DepositFetcher.java @@ -84,7 +84,7 @@ public DepositFetcher( // Inclusive on both sides public synchronized SafeFuture fetchDepositsInRange( - BigInteger fromBlockNumber, BigInteger toBlockNumber) { + final BigInteger fromBlockNumber, final BigInteger toBlockNumber) { checkArgument( fromBlockNumber.compareTo(toBlockNumber) <= 0, "From block number (%s) must be less than or equal to block number (%s)", @@ -161,10 +161,11 @@ private SafeFuture processDepositsInBatch( } private SafeFuture postDepositEvents( - List> blockRequests, - Map> depositEventsByBlock, - BigInteger fromBlock, - BigInteger toBlock) { + final List> blockRequests, + final Map> + depositEventsByBlock, + final BigInteger fromBlock, + final BigInteger toBlock) { LOG.trace("Posting deposit events for {} blocks", depositEventsByBlock.size()); BigInteger from = fromBlock; // First process completed requests using iteration. @@ -220,7 +221,7 @@ private DepositsFromBlockEvent createDepositFromBlockEvent( } private List> getListOfEthBlockFutures( - Set neededBlockHashes) { + final Set neededBlockHashes) { return neededBlockHashes.stream() .map(BlockNumberAndHash::getHash) .map(eth1Provider::getGuaranteedEth1Block) @@ -229,7 +230,7 @@ private List> getListOfEthBlockFutures( private NavigableMap> groupDepositEventResponsesByBlockHash( - List events) { + final List events) { return events.stream() .collect( groupingBy( @@ -239,7 +240,7 @@ private List> getListOfEthBlockFutures( toList())); } - private void postDeposits(DepositsFromBlockEvent event) { + private void postDeposits(final DepositsFromBlockEvent event) { eth1EventsChannel.onDepositsFromBlock(event); } diff --git a/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/DepositProcessingController.java b/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/DepositProcessingController.java index 7545d5a0722..ca8be5a4e47 100644 --- a/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/DepositProcessingController.java +++ b/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/DepositProcessingController.java @@ -51,13 +51,13 @@ public class DepositProcessingController { private final Eth1BlockFetcher eth1BlockFetcher; public DepositProcessingController( - SpecConfig config, - Eth1Provider eth1Provider, - Eth1EventsChannel eth1EventsChannel, - AsyncRunner asyncRunner, - DepositFetcher depositFetcher, - Eth1BlockFetcher eth1BlockFetcher, - Eth1HeadTracker headTracker) { + final SpecConfig config, + final Eth1Provider eth1Provider, + final Eth1EventsChannel eth1EventsChannel, + final AsyncRunner asyncRunner, + final DepositFetcher depositFetcher, + final Eth1BlockFetcher eth1BlockFetcher, + final Eth1HeadTracker headTracker) { this.config = config; this.eth1Provider = eth1Provider; this.eth1EventsChannel = eth1EventsChannel; @@ -73,7 +73,7 @@ public synchronized void switchToBlockByBlockMode() { } // inclusive of start block - public synchronized void startSubscription(BigInteger subscriptionStartBlock) { + public synchronized void startSubscription(final BigInteger subscriptionStartBlock) { LOG.debug("Starting subscription at block {}", subscriptionStartBlock); latestSuccessfullyQueriedBlock = subscriptionStartBlock.subtract(BigInteger.ONE); newBlockSubscription = headTracker.subscribe(this::onNewCanonicalBlockNumber); @@ -89,7 +89,7 @@ public synchronized SafeFuture fetchDepositsInRange( return depositFetcher.fetchDepositsInRange(fromBlockNumber, toBlockNumber); } - private synchronized void onNewCanonicalBlockNumber(UInt64 newCanonicalBlockNumber) { + private synchronized void onNewCanonicalBlockNumber(final UInt64 newCanonicalBlockNumber) { this.latestCanonicalBlockNumber = newCanonicalBlockNumber.bigIntegerValue(); fetchLatestSubscriptionDeposits(); } @@ -165,7 +165,8 @@ private boolean isActiveOrAlreadyQueriedLatestCanonicalBlock() { return active || latestCanonicalBlockNumber.compareTo(latestSuccessfullyQueriedBlock) <= 0; } - private synchronized void onSubscriptionDepositRequestSuccessful(BigInteger requestToBlock) { + private synchronized void onSubscriptionDepositRequestSuccessful( + final BigInteger requestToBlock) { active = false; latestSuccessfullyQueriedBlock = requestToBlock; if (latestCanonicalBlockNumber.compareTo(latestSuccessfullyQueriedBlock) > 0) { @@ -177,12 +178,12 @@ private synchronized void onSubscriptionDepositRequestSuccessful(BigInteger requ } private synchronized void onSubscriptionDepositRequestFailed( - Throwable err, BigInteger fromBlock) { + final Throwable err, final BigInteger fromBlock) { onSubscriptionDepositRequestFailed(err, fromBlock, fromBlock); } private synchronized void onSubscriptionDepositRequestFailed( - Throwable err, BigInteger fromBlock, BigInteger toBlock) { + final Throwable err, final BigInteger fromBlock, final BigInteger toBlock) { active = false; if (Throwables.getRootCause(err) instanceof InvalidDepositEventsException) { diff --git a/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/ErrorTrackingEth1Provider.java b/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/ErrorTrackingEth1Provider.java index db4a60c8984..0217962c0d7 100644 --- a/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/ErrorTrackingEth1Provider.java +++ b/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/ErrorTrackingEth1Provider.java @@ -96,7 +96,7 @@ public SafeFuture ethSyncing() { } @Override - public SafeFuture>> ethGetLogs(EthFilter ethFilter) { + public SafeFuture>> ethGetLogs(final EthFilter ethFilter) { return logStatus(delegate.ethGetLogs(ethFilter)); } diff --git a/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/Eth1BlockFetcher.java b/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/Eth1BlockFetcher.java index 910eca0c31c..5290c135358 100644 --- a/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/Eth1BlockFetcher.java +++ b/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/Eth1BlockFetcher.java @@ -147,11 +147,11 @@ private void backfillEth1Blocks(final UInt64 nextBlockToRequest) { error -> LOG.error("Unexpected error while back-filling ETH1 blocks", error)); } - private boolean isAboveLowerBound(UInt64 timestamp) { + private boolean isAboveLowerBound(final UInt64 timestamp) { return timestamp.compareTo(getCacheRangeLowerBound(timeProvider.getTimeInSeconds())) >= 0; } - private UInt64 getCacheRangeLowerBound(UInt64 currentTime) { + private UInt64 getCacheRangeLowerBound(final UInt64 currentTime) { return currentTime.compareTo(cacheDuration) > 0 ? currentTime.minus(cacheDuration) : ZERO; } } diff --git a/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/Eth1Provider.java b/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/Eth1Provider.java index 595caadf49f..10d891c2d0e 100644 --- a/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/Eth1Provider.java +++ b/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/Eth1Provider.java @@ -34,7 +34,7 @@ public interface Eth1Provider { SafeFuture> getEth1BlockWithRetry( UInt64 blockNumber, Duration retryDelay, int maxRetries); - default SafeFuture> getEth1BlockWithRetry(UInt64 blockNumber) { + default SafeFuture> getEth1BlockWithRetry(final UInt64 blockNumber) { return getEth1BlockWithRetry(blockNumber, Duration.ofSeconds(5), 2); } @@ -43,7 +43,7 @@ default SafeFuture> getEth1BlockWithRetry(UInt64 blockNumber) { SafeFuture> getEth1BlockWithRetry( String blockHash, Duration retryDelay, int maxRetries); - default SafeFuture> getEth1BlockWithRetry(String blockHash) { + default SafeFuture> getEth1BlockWithRetry(final String blockHash) { return getEth1BlockWithRetry(blockHash, Duration.ofSeconds(5), 2); } diff --git a/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/FallbackAwareEth1Provider.java b/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/FallbackAwareEth1Provider.java index b86ccd7baa4..ee1ed5792e8 100644 --- a/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/FallbackAwareEth1Provider.java +++ b/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/FallbackAwareEth1Provider.java @@ -131,7 +131,7 @@ public SafeFuture ethSyncing() { } @Override - public SafeFuture>> ethGetLogs(EthFilter ethFilter) { + public SafeFuture>> ethGetLogs(final EthFilter ethFilter) { return run(eth1Provider -> eth1Provider.ethGetLogs(ethFilter)); } diff --git a/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/MinimumGenesisTimeBlockFinder.java b/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/MinimumGenesisTimeBlockFinder.java index 36c94a77549..ea4b424fb1d 100644 --- a/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/MinimumGenesisTimeBlockFinder.java +++ b/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/MinimumGenesisTimeBlockFinder.java @@ -46,9 +46,9 @@ public class MinimumGenesisTimeBlockFinder { private final Optional eth1DepositContractDeployBlock; public MinimumGenesisTimeBlockFinder( - SpecConfig config, - Eth1Provider eth1Provider, - Optional eth1DepositContractDeployBlock) { + final SpecConfig config, + final Eth1Provider eth1Provider, + final Optional eth1DepositContractDeployBlock) { this.config = config; this.eth1Provider = eth1Provider; this.eth1DepositContractDeployBlock = eth1DepositContractDeployBlock; @@ -191,12 +191,15 @@ private boolean blockIsAtOrAfterMinGenesis(final SpecConfig config, final EthBlo } private void traceWithBlock( - final String message, final EthBlock.Block block, Object... otherArgs) { + final String message, final EthBlock.Block block, final Object... otherArgs) { logWithBlock(Level.TRACE, message, block, otherArgs); } private void logWithBlock( - final Level level, final String message, final EthBlock.Block block, Object... otherArgs) { + final Level level, + final String message, + final EthBlock.Block block, + final Object... otherArgs) { final Object[] args = new Object[otherArgs.length + 3]; System.arraycopy(otherArgs, 0, args, 0, otherArgs.length); @@ -211,16 +214,18 @@ private UInt64 calculateMinGenesisTimeThreshold() { return config.getMinGenesisTime().minusMinZero(config.getGenesisDelay()); } - static UInt64 calculateCandidateGenesisTimestamp(SpecConfig config, BigInteger eth1Timestamp) { + static UInt64 calculateCandidateGenesisTimestamp( + final SpecConfig config, final BigInteger eth1Timestamp) { return UInt64.valueOf(eth1Timestamp).plus(config.getGenesisDelay()); } - static int compareBlockTimestampToMinGenesisTime(SpecConfig config, EthBlock.Block block) { + static int compareBlockTimestampToMinGenesisTime( + final SpecConfig config, final EthBlock.Block block) { return calculateCandidateGenesisTimestamp(config, block.getTimestamp()) .compareTo(config.getMinGenesisTime()); } - static Boolean isBlockAfterMinGenesis(SpecConfig config, EthBlock.Block block) { + static Boolean isBlockAfterMinGenesis(final SpecConfig config, final EthBlock.Block block) { int comparison = compareBlockTimestampToMinGenesisTime(config, block); // If block timestamp is greater than min genesis time, // min genesis block must be in the future @@ -228,7 +233,7 @@ static Boolean isBlockAfterMinGenesis(SpecConfig config, EthBlock.Block block) { } static void notifyMinGenesisTimeBlockReached( - Eth1EventsChannel eth1EventsChannel, EthBlock.Block block) { + final Eth1EventsChannel eth1EventsChannel, final EthBlock.Block block) { MinGenesisTimeBlockEvent event = new MinGenesisTimeBlockEvent( UInt64.valueOf(block.getTimestamp()), diff --git a/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/ThrottlingEth1Provider.java b/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/ThrottlingEth1Provider.java index 5028cee4beb..0dad37ed2a0 100644 --- a/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/ThrottlingEth1Provider.java +++ b/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/ThrottlingEth1Provider.java @@ -106,7 +106,7 @@ public SafeFuture ethSyncing() { } @Override - public SafeFuture>> ethGetLogs(EthFilter ethFilter) { + public SafeFuture>> ethGetLogs(final EthFilter ethFilter) { return taskQueue.queueTask(() -> delegate.ethGetLogs(ethFilter)); } } diff --git a/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/ValidatingEth1EventsPublisher.java b/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/ValidatingEth1EventsPublisher.java index df207bd7b77..f3fc1c5f992 100644 --- a/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/ValidatingEth1EventsPublisher.java +++ b/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/ValidatingEth1EventsPublisher.java @@ -60,7 +60,7 @@ private void assertDepositEventIsValid(final DepositsFromBlockEvent event) { } @Override - public void onInitialDepositTreeSnapshot(DepositTreeSnapshot depositTreeSnapshot) { + public void onInitialDepositTreeSnapshot(final DepositTreeSnapshot depositTreeSnapshot) { delegate.onInitialDepositTreeSnapshot(depositTreeSnapshot); } } diff --git a/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/Web3jEth1Provider.java b/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/Web3jEth1Provider.java index 34a972805a6..afbc3c48d40 100644 --- a/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/Web3jEth1Provider.java +++ b/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/Web3jEth1Provider.java @@ -181,7 +181,7 @@ public SafeFuture getGuaranteedLatestEth1Block() { @Override public SafeFuture ethCall( - final String from, String to, String data, final UInt64 blockNumber) { + final String from, final String to, final String data, final UInt64 blockNumber) { return SafeFuture.of( web3j .ethCall( @@ -203,7 +203,7 @@ public SafeFuture ethSyncing() { @Override @SuppressWarnings({"unchecked", "rawtypes"}) - public SafeFuture>> ethGetLogs(EthFilter ethFilter) { + public SafeFuture>> ethGetLogs(final EthFilter ethFilter) { return sendAsync(web3j.ethGetLogs(ethFilter)) .thenApply(EthLog::getLogs) .thenApply(logs -> (List>) (List) logs); diff --git a/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/contract/DepositContract.java b/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/contract/DepositContract.java index c2a5a08e93a..60216aaeb69 100644 --- a/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/contract/DepositContract.java +++ b/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/contract/DepositContract.java @@ -57,23 +57,23 @@ public class DepositContract extends Contract { new TypeReference() {})); protected DepositContract( - String contractAddress, - Web3j web3j, - TransactionManager transactionManager, - ContractGasProvider contractGasProvider) { + final String contractAddress, + final Web3j web3j, + final TransactionManager transactionManager, + final ContractGasProvider contractGasProvider) { super(BINARY, contractAddress, web3j, transactionManager, contractGasProvider); } - public static EventValuesWithLog staticExtractDepositEventWithLog(Log log) { + public static EventValuesWithLog staticExtractDepositEventWithLog(final Log log) { return staticExtractEventParametersWithLog(DEPOSITEVENT_EVENT, log); } public RemoteFunctionCall deposit( - byte[] pubkey, - byte[] withdrawalCredentials, - byte[] signature, - byte[] depositDataRoot, - BigInteger weiValue) { + final byte[] pubkey, + final byte[] withdrawalCredentials, + final byte[] signature, + final byte[] depositDataRoot, + final BigInteger weiValue) { final Function function = new Function( FUNC_DEPOSIT, @@ -87,10 +87,10 @@ public RemoteFunctionCall deposit( } public static DepositContract load( - String contractAddress, - Web3j web3j, - TransactionManager transactionManager, - ContractGasProvider contractGasProvider) { + final String contractAddress, + final Web3j web3j, + final TransactionManager transactionManager, + final ContractGasProvider contractGasProvider) { return new DepositContract(contractAddress, web3j, transactionManager, contractGasProvider); } diff --git a/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/exception/Eth1RequestException.java b/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/exception/Eth1RequestException.java index c859824607f..0cd4d67a06a 100644 --- a/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/exception/Eth1RequestException.java +++ b/beacon/pow/src/main/java/tech/pegasys/teku/beacon/pow/exception/Eth1RequestException.java @@ -24,7 +24,7 @@ public Eth1RequestException() { super("Some eth1 endpoints threw an Exception or no eth1 endpoints available"); } - public static boolean shouldTryWithSmallerRange(Throwable err) { + public static boolean shouldTryWithSmallerRange(final Throwable err) { return ExceptionUtil.hasCause( err, SocketTimeoutException.class, diff --git a/beacon/sync/src/main/java/tech/pegasys/teku/beacon/sync/NoopSyncService.java b/beacon/sync/src/main/java/tech/pegasys/teku/beacon/sync/NoopSyncService.java index 86b12a26d09..4e342290802 100644 --- a/beacon/sync/src/main/java/tech/pegasys/teku/beacon/sync/NoopSyncService.java +++ b/beacon/sync/src/main/java/tech/pegasys/teku/beacon/sync/NoopSyncService.java @@ -76,7 +76,7 @@ public long subscribeToSyncChanges(final SyncSubscriber subscriber) { } @Override - public long subscribeToSyncStateChangesAndUpdate(SyncStateSubscriber subscriber) { + public long subscribeToSyncStateChangesAndUpdate(final SyncStateSubscriber subscriber) { final long subscriptionId = subscribeToSyncStateChanges(subscriber); subscriber.onSyncStateChange(getCurrentSyncState()); return subscriptionId; @@ -116,7 +116,7 @@ public void cancelRecentBlobSidecarRequest(final BlobIdentifier blobIdentifier) } @Override - public void onOptimisticHeadChanged(boolean isSyncingOptimistically) { + public void onOptimisticHeadChanged(final boolean isSyncingOptimistically) { // No-op } diff --git a/beacon/sync/src/main/java/tech/pegasys/teku/beacon/sync/events/SyncStateTracker.java b/beacon/sync/src/main/java/tech/pegasys/teku/beacon/sync/events/SyncStateTracker.java index cf565392416..432c4e78747 100644 --- a/beacon/sync/src/main/java/tech/pegasys/teku/beacon/sync/events/SyncStateTracker.java +++ b/beacon/sync/src/main/java/tech/pegasys/teku/beacon/sync/events/SyncStateTracker.java @@ -124,7 +124,7 @@ public long subscribeToSyncStateChangesAndUpdate(final SyncStateSubscriber subsc } @Override - public boolean unsubscribeFromSyncStateChanges(long subscriberId) { + public boolean unsubscribeFromSyncStateChanges(final long subscriberId) { return subscribers.unsubscribe(subscriberId); } diff --git a/beacon/sync/src/main/java/tech/pegasys/teku/beacon/sync/fetch/FetchResult.java b/beacon/sync/src/main/java/tech/pegasys/teku/beacon/sync/fetch/FetchResult.java index e5b99026a08..9446fcc0352 100644 --- a/beacon/sync/src/main/java/tech/pegasys/teku/beacon/sync/fetch/FetchResult.java +++ b/beacon/sync/src/main/java/tech/pegasys/teku/beacon/sync/fetch/FetchResult.java @@ -40,7 +40,7 @@ public static FetchResult createSuccessful(final T result) { return new FetchResult<>(Optional.empty(), Status.SUCCESSFUL, Optional.of(result)); } - public static FetchResult createSuccessful(final Eth2Peer peer, T result) { + public static FetchResult createSuccessful(final Eth2Peer peer, final T result) { return new FetchResult<>(Optional.of(peer), Status.SUCCESSFUL, Optional.of(result)); } diff --git a/beacon/sync/src/main/java/tech/pegasys/teku/beacon/sync/fetch/FetchTaskFactory.java b/beacon/sync/src/main/java/tech/pegasys/teku/beacon/sync/fetch/FetchTaskFactory.java index 59ed080c7a1..f9fd8832b6d 100644 --- a/beacon/sync/src/main/java/tech/pegasys/teku/beacon/sync/fetch/FetchTaskFactory.java +++ b/beacon/sync/src/main/java/tech/pegasys/teku/beacon/sync/fetch/FetchTaskFactory.java @@ -20,13 +20,13 @@ public interface FetchTaskFactory { - default FetchBlockTask createFetchBlockTask(Bytes32 blockRoot) { + default FetchBlockTask createFetchBlockTask(final Bytes32 blockRoot) { return createFetchBlockTask(blockRoot, Optional.empty()); } FetchBlockTask createFetchBlockTask(Bytes32 blockRoot, Optional preferredPeer); - default FetchBlobSidecarTask createFetchBlobSidecarTask(BlobIdentifier blobIdentifier) { + default FetchBlobSidecarTask createFetchBlobSidecarTask(final BlobIdentifier blobIdentifier) { return createFetchBlobSidecarTask(blobIdentifier, Optional.empty()); } diff --git a/beacon/sync/src/main/java/tech/pegasys/teku/beacon/sync/forward/singlepeer/SyncManager.java b/beacon/sync/src/main/java/tech/pegasys/teku/beacon/sync/forward/singlepeer/SyncManager.java index 6acfdfc96f4..984b35a9b65 100644 --- a/beacon/sync/src/main/java/tech/pegasys/teku/beacon/sync/forward/singlepeer/SyncManager.java +++ b/beacon/sync/src/main/java/tech/pegasys/teku/beacon/sync/forward/singlepeer/SyncManager.java @@ -259,14 +259,14 @@ Optional findBestSyncPeer() { .thenComparing(p -> Math.random())); } - private void onNewPeer(Eth2Peer peer) { + private void onNewPeer(final Eth2Peer peer) { if (isPeerSyncSuitable(peer)) { LOG.trace("New peer connected ({}), schedule sync.", peer.getId()); startOrScheduleSync(); } } - private boolean isPeerSyncSuitable(Eth2Peer peer) { + private boolean isPeerSyncSuitable(final Eth2Peer peer) { UInt64 ourFinalizedEpoch = recentChainData.getFinalizedEpoch(); LOG.trace( "Looking for suitable peer (out of {}) with finalized epoch > {}.", diff --git a/beacon/sync/src/main/java/tech/pegasys/teku/beacon/sync/gossip/AbstractFetchService.java b/beacon/sync/src/main/java/tech/pegasys/teku/beacon/sync/gossip/AbstractFetchService.java index b647fb9f3b8..fa407ea6e34 100644 --- a/beacon/sync/src/main/java/tech/pegasys/teku/beacon/sync/gossip/AbstractFetchService.java +++ b/beacon/sync/src/main/java/tech/pegasys/teku/beacon/sync/gossip/AbstractFetchService.java @@ -49,7 +49,7 @@ public abstract class AbstractFetchService, private final AsyncRunner asyncRunner; private final int maxConcurrentRequests; - protected AbstractFetchService(final AsyncRunner asyncRunner, int maxConcurrentRequests) { + protected AbstractFetchService(final AsyncRunner asyncRunner, final int maxConcurrentRequests) { this.asyncRunner = asyncRunner; this.maxConcurrentRequests = maxConcurrentRequests; } diff --git a/beacon/sync/src/main/java/tech/pegasys/teku/beacon/sync/historical/ReconstructHistoricalStatesService.java b/beacon/sync/src/main/java/tech/pegasys/teku/beacon/sync/historical/ReconstructHistoricalStatesService.java index 7b4fef07280..5916be87242 100644 --- a/beacon/sync/src/main/java/tech/pegasys/teku/beacon/sync/historical/ReconstructHistoricalStatesService.java +++ b/beacon/sync/src/main/java/tech/pegasys/teku/beacon/sync/historical/ReconstructHistoricalStatesService.java @@ -147,7 +147,7 @@ protected SafeFuture doStart() { }); } - private SafeFuture applyNextBlock(Context context) { + private SafeFuture applyNextBlock(final Context context) { if (context.checkStopApplyBlock()) { statusLogger.reconstructHistoricalStatesServiceComplete(); stopped.complete(null); @@ -188,7 +188,7 @@ private static class Context { private UInt64 slot; private final UInt64 anchorSlot; - Context(BeaconState currentState, UInt64 slot, UInt64 anchorSlot) { + Context(final BeaconState currentState, final UInt64 slot, final UInt64 anchorSlot) { this.currentState = currentState; this.slot = slot; this.anchorSlot = anchorSlot; diff --git a/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/DepositProvider.java b/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/DepositProvider.java index 3a519af6808..40683cbe798 100644 --- a/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/DepositProvider.java +++ b/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/DepositProvider.java @@ -323,7 +323,7 @@ public synchronized void onInitialDepositTreeSnapshot( private static class DepositsSchemaCache { private SszListSchema cachedSchema; - public SszListSchema get(long maxDeposits) { + public SszListSchema get(final long maxDeposits) { SszListSchema cachedSchemaLoc = cachedSchema; if (cachedSchemaLoc == null || maxDeposits != cachedSchemaLoc.getMaxLength()) { cachedSchemaLoc = SszListSchema.create(Deposit.SSZ_SCHEMA, maxDeposits); diff --git a/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/DutyMetrics.java b/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/DutyMetrics.java index c42d7cc2270..ab164a47efe 100644 --- a/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/DutyMetrics.java +++ b/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/DutyMetrics.java @@ -45,7 +45,7 @@ public class DutyMetrics { final RecentChainData recentChainData, final MetricsCountersByIntervals attestationTimings, final MetricsCountersByIntervals blockTimings, - LabelledMetric validatorDutyMetric, + final LabelledMetric validatorDutyMetric, final Spec spec) { this.timeProvider = timeProvider; this.recentChainData = recentChainData; diff --git a/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/Eth1DataProvider.java b/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/Eth1DataProvider.java index 425d8fae35c..7f3e440b333 100644 --- a/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/Eth1DataProvider.java +++ b/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/Eth1DataProvider.java @@ -34,7 +34,8 @@ public class Eth1DataProvider { private final Eth1DataCache eth1DataCache; private final DepositProvider depositProvider; - public Eth1DataProvider(Eth1DataCache eth1DataCache, DepositProvider depositProvider) { + public Eth1DataProvider( + final Eth1DataCache eth1DataCache, final DepositProvider depositProvider) { this.eth1DataCache = eth1DataCache; this.depositProvider = depositProvider; } diff --git a/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/Eth1Vote.java b/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/Eth1Vote.java index ef4fd08c278..d75bd70c16c 100644 --- a/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/Eth1Vote.java +++ b/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/Eth1Vote.java @@ -20,7 +20,7 @@ public class Eth1Vote implements Comparable { private int vote = 0; private final int index; - public Eth1Vote(int index) { + public Eth1Vote(final int index) { this.index = index; } @@ -35,7 +35,7 @@ public int getVoteCount() { // Greater vote number, or in case of a tie, // smallest index number wins @Override - public int compareTo(Eth1Vote eth1Vote) { + public int compareTo(final Eth1Vote eth1Vote) { if (this.vote > eth1Vote.vote) { return 1; } else if (this.vote < eth1Vote.vote) { diff --git a/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/MilestoneBasedBlockFactory.java b/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/MilestoneBasedBlockFactory.java index 637e34bcf5c..7b2effbbd8e 100644 --- a/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/MilestoneBasedBlockFactory.java +++ b/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/MilestoneBasedBlockFactory.java @@ -96,7 +96,7 @@ public SafeFuture unblindSignedBlockIfBlinded( @Override public List createBlobSidecars( final SignedBlockContainer blockContainer, - BlockPublishingPerformance blockPublishingPerformance) { + final BlockPublishingPerformance blockPublishingPerformance) { final SpecMilestone milestone = getMilestone(blockContainer.getSlot()); return registeredFactories .get(milestone) diff --git a/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/ValidatorApiHandler.java b/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/ValidatorApiHandler.java index 18b47a3ccb9..046b6019290 100644 --- a/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/ValidatorApiHandler.java +++ b/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/ValidatorApiHandler.java @@ -294,7 +294,7 @@ public SafeFuture> getProposerDuties(final UInt64 epoch @Override public SafeFuture>> getValidatorStatuses( - Collection validatorIdentifiers) { + final Collection validatorIdentifiers) { return isSyncActive() ? SafeFuture.completedFuture(Optional.empty()) : chainDataProvider @@ -547,7 +547,7 @@ private void processSyncCommitteeSubnetSubscriptions( @Override public SafeFuture subscribeToPersistentSubnets( - Set subnetSubscriptions) { + final Set subnetSubscriptions) { return SafeFuture.fromRunnable( () -> attestationTopicSubscriber.subscribeToPersistentSubnets(subnetSubscriptions)); } diff --git a/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/duties/AttesterDutiesGenerator.java b/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/duties/AttesterDutiesGenerator.java index 46502b517e6..a978a647edf 100644 --- a/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/duties/AttesterDutiesGenerator.java +++ b/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/duties/AttesterDutiesGenerator.java @@ -30,7 +30,7 @@ public class AttesterDutiesGenerator { private final Spec spec; - public AttesterDutiesGenerator(Spec spec) { + public AttesterDutiesGenerator(final Spec spec) { this.spec = spec; } diff --git a/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/performance/AttestationPerformance.java b/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/performance/AttestationPerformance.java index bb538a028f7..ccf4c689aca 100644 --- a/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/performance/AttestationPerformance.java +++ b/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/performance/AttestationPerformance.java @@ -30,15 +30,15 @@ public class AttestationPerformance { final int correctHeadBlockCount; public AttestationPerformance( - UInt64 epoch, - int numberOfExpectedAttestations, - int numberOfProducedAttestations, - int numberOfIncludedAttestations, - int inclusionDistanceMax, - int inclusionDistanceMin, - double inclusionDistanceAverage, - int correctTargetCount, - int correctHeadBlockCount) { + final UInt64 epoch, + final int numberOfExpectedAttestations, + final int numberOfProducedAttestations, + final int numberOfIncludedAttestations, + final int inclusionDistanceMax, + final int inclusionDistanceMin, + final double inclusionDistanceAverage, + final int correctTargetCount, + final int correctHeadBlockCount) { this.epoch = epoch; this.numberOfExpectedAttestations = numberOfExpectedAttestations; this.numberOfProducedAttestations = numberOfProducedAttestations; @@ -50,12 +50,13 @@ public AttestationPerformance( this.correctHeadBlockCount = correctHeadBlockCount; } - public static AttestationPerformance empty(UInt64 epoch, int numberOfExpectedAttestations) { + public static AttestationPerformance empty( + final UInt64 epoch, final int numberOfExpectedAttestations) { return new AttestationPerformance(epoch, numberOfExpectedAttestations, 0, 0, 0, 0, 0, 0, 0); } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/performance/BlockPerformance.java b/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/performance/BlockPerformance.java index dac19b9f5d6..b5bf8f4947f 100644 --- a/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/performance/BlockPerformance.java +++ b/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/performance/BlockPerformance.java @@ -25,10 +25,10 @@ public class BlockPerformance { final int numberOfProducedBlocks; public BlockPerformance( - UInt64 epoch, - int numberOfExpectedBlocks, - int numberOfIncludedBlocks, - int numberOfProducedBlocks) { + final UInt64 epoch, + final int numberOfExpectedBlocks, + final int numberOfIncludedBlocks, + final int numberOfProducedBlocks) { this.epoch = epoch; this.numberOfExpectedBlocks = numberOfExpectedBlocks; this.numberOfIncludedBlocks = numberOfIncludedBlocks; @@ -36,7 +36,7 @@ public BlockPerformance( } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/performance/DefaultPerformanceTracker.java b/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/performance/DefaultPerformanceTracker.java index 3ff741b8110..64ff6c7a4a0 100644 --- a/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/performance/DefaultPerformanceTracker.java +++ b/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/performance/DefaultPerformanceTracker.java @@ -423,7 +423,7 @@ public void saveProducedBlock(final SignedBeaconBlock block) { } @Override - public void reportBlockProductionAttempt(UInt64 epoch) { + public void reportBlockProductionAttempt(final UInt64 epoch) { final AtomicInteger numberOfBlockProductionAttempts = blockProductionAttemptsByEpoch.computeIfAbsent(epoch, __ -> new AtomicInteger(0)); numberOfBlockProductionAttempts.incrementAndGet(); diff --git a/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/publisher/BlockPublisherDeneb.java b/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/publisher/BlockPublisherDeneb.java index 2eee9a561d9..9fe3baf6c4d 100644 --- a/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/publisher/BlockPublisherDeneb.java +++ b/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/publisher/BlockPublisherDeneb.java @@ -65,7 +65,7 @@ SafeFuture importBlockAndBlobSidecars( void publishBlockAndBlobSidecars( final SignedBeaconBlock block, final List blobSidecars, - BlockPublishingPerformance blockPublishingPerformance) { + final BlockPublishingPerformance blockPublishingPerformance) { blockGossipChannel.publishBlock(block); blobSidecarGossipChannel.publishBlobSidecars(blobSidecars); blockPublishingPerformance.blockAndBlobSidecarsPublishingInitiated(); diff --git a/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/publisher/MilestoneBasedBlockPublisher.java b/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/publisher/MilestoneBasedBlockPublisher.java index 2dabbf3ebac..dd63d330161 100644 --- a/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/publisher/MilestoneBasedBlockPublisher.java +++ b/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/publisher/MilestoneBasedBlockPublisher.java @@ -81,7 +81,7 @@ public MilestoneBasedBlockPublisher( public SafeFuture sendSignedBlock( final SignedBlockContainer blockContainer, final BroadcastValidationLevel broadcastValidationLevel, - BlockPublishingPerformance blockPublishingPerformance) { + final BlockPublishingPerformance blockPublishingPerformance) { final SpecMilestone blockMilestone = spec.atSlot(blockContainer.getSlot()).getMilestone(); return registeredPublishers .get(blockMilestone) diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/tekuv1/admin/PutLogLevel.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/tekuv1/admin/PutLogLevel.java index 84f9f095112..e1dbc75f25c 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/tekuv1/admin/PutLogLevel.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/tekuv1/admin/PutLogLevel.java @@ -46,7 +46,7 @@ public PutLogLevel() { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final LogLevel requestBody = request.getRequestBody(); final List logFilters = requestBody.getLogFilter().orElse(List.of("")); @@ -85,7 +85,7 @@ public Level getLevel() { return level; } - public void setLevel(Level level) { + public void setLevel(final Level level) { this.level = level; } @@ -93,7 +93,7 @@ public Optional> getLogFilter() { return logFilter; } - public void setLogFilter(Optional> logFilter) { + public void setLogFilter(final Optional> logFilter) { this.logFilter = logFilter; } @@ -111,7 +111,7 @@ static DeserializableTypeDefinition getJsonTypeDefinition() { } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/tekuv1/admin/Readiness.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/tekuv1/admin/Readiness.java index 304ebb4f47c..27fa9446c3d 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/tekuv1/admin/Readiness.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/tekuv1/admin/Readiness.java @@ -77,7 +77,7 @@ public Readiness(final DataProvider provider) { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { request.header(Header.CACHE_CONTROL, CACHE_NONE); if (!chainDataProvider.isStoreAvailable() diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/tekuv1/beacon/GetAllBlobSidecarsAtSlot.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/tekuv1/beacon/GetAllBlobSidecarsAtSlot.java index 5b49c78eb21..b055c433016 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/tekuv1/beacon/GetAllBlobSidecarsAtSlot.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/tekuv1/beacon/GetAllBlobSidecarsAtSlot.java @@ -72,7 +72,7 @@ private static EndpointMetadata createEndpointMetadata(final SchemaDefinitionCac } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final List indices = request.getQueryParameterList(BLOB_INDICES_PARAMETER); final SafeFuture>> future = chainDataProvider.getAllBlobSidecarsAtSlot( diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/tekuv1/beacon/GetAllBlocksAtSlot.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/tekuv1/beacon/GetAllBlocksAtSlot.java index 36746425589..e14b1bcefbf 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/tekuv1/beacon/GetAllBlocksAtSlot.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/tekuv1/beacon/GetAllBlocksAtSlot.java @@ -71,7 +71,7 @@ public GetAllBlocksAtSlot( } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { request.header(Header.CACHE_CONTROL, CACHE_NONE); final UInt64 slot = request.getPathParameter(SLOT_PARAMETER); diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/tekuv1/beacon/GetEth1DataCache.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/tekuv1/beacon/GetEth1DataCache.java index ec8f7500791..cfc51a9c202 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/tekuv1/beacon/GetEth1DataCache.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/tekuv1/beacon/GetEth1DataCache.java @@ -45,7 +45,7 @@ public class GetEth1DataCache extends RestApiEndpoint { private final Eth1DataProvider eth1DataProvider; - public GetEth1DataCache(Eth1DataProvider eth1DataProvider) { + public GetEth1DataCache(final Eth1DataProvider eth1DataProvider) { super( EndpointMetadata.get(ROUTE) .operationId("getTekuV1BeaconPoolEth1cache") @@ -60,7 +60,7 @@ public GetEth1DataCache(Eth1DataProvider eth1DataProvider) { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { request.header(Header.CACHE_CONTROL, CACHE_NONE); Collection eth1CachedBlocks = this.eth1DataProvider.getEth1CachedBlocks(); if (eth1CachedBlocks.isEmpty()) { diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/tekuv1/beacon/GetProposersData.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/tekuv1/beacon/GetProposersData.java index 5d2a54bc4ad..11fda354c11 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/tekuv1/beacon/GetProposersData.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/tekuv1/beacon/GetProposersData.java @@ -52,7 +52,7 @@ public GetProposersData(final DataProvider provider) { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { request.header(CACHE_CONTROL, CACHE_NONE); request.respondOk( new ProposersData( diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/tekuv1/beacon/GetStateByBlockRoot.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/tekuv1/beacon/GetStateByBlockRoot.java index 1303ad2454d..02bd129e657 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/tekuv1/beacon/GetStateByBlockRoot.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/tekuv1/beacon/GetStateByBlockRoot.java @@ -65,7 +65,7 @@ public GetStateByBlockRoot(final ChainDataProvider chainDataProvider, final Spec } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { request.header(Header.CACHE_CONTROL, CACHE_NONE); final String blockId = request.getPathParameter(PARAMETER_BLOCK_ID); diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/tekuv1/node/GetPeersScore.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/tekuv1/node/GetPeersScore.java index 11c642d373e..c0a7c015bbf 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/tekuv1/node/GetPeersScore.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/tekuv1/node/GetPeersScore.java @@ -66,7 +66,7 @@ public GetPeersScore(final DataProvider provider) { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { request.header(Header.CACHE_CONTROL, CACHE_NONE); request.respondOk(network.getPeerScores()); } diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/AbstractGetSimpleDataFromState.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/AbstractGetSimpleDataFromState.java index f3195043aaf..3c34337628d 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/AbstractGetSimpleDataFromState.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/AbstractGetSimpleDataFromState.java @@ -36,7 +36,7 @@ public AbstractGetSimpleDataFromState( } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final SafeFuture> future = chainDataProvider.getBeaconStateAndMetadata(request.getPathParameter(PARAMETER_STATE_ID)); request.respondAsync( diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetAttestations.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetAttestations.java index bb5bfd2c2e4..06ede42208e 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetAttestations.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetAttestations.java @@ -41,7 +41,7 @@ public class GetAttestations extends RestApiEndpoint { public static final String ROUTE = "/eth/v1/beacon/pool/attestations"; private final NodeDataProvider nodeDataProvider; - public GetAttestations(final DataProvider dataProvider, Spec spec) { + public GetAttestations(final DataProvider dataProvider, final Spec spec) { this(dataProvider.getNodeDataProvider(), spec); } @@ -61,7 +61,7 @@ public GetAttestations(final NodeDataProvider nodeDataProvider, final Spec spec) } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { request.header(Header.CACHE_CONTROL, CACHE_NONE); final Optional slot = request.getOptionalQueryParameter(SLOT_PARAMETER.withDescription(SLOT_QUERY_DESCRIPTION)); @@ -72,7 +72,7 @@ public void handleRequest(RestApiRequest request) throws JsonProcessingException } private static SerializableTypeDefinition> getResponseType( - SpecConfig specConfig) { + final SpecConfig specConfig) { return SerializableTypeDefinition.>object() .name("GetPoolAttestationsResponse") .withField( diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetAttesterSlashings.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetAttesterSlashings.java index cc40eff277e..6266d361c2f 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetAttesterSlashings.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetAttesterSlashings.java @@ -36,11 +36,11 @@ public class GetAttesterSlashings extends RestApiEndpoint { public static final String ROUTE = "/eth/v1/beacon/pool/attester_slashings"; private final NodeDataProvider nodeDataProvider; - public GetAttesterSlashings(final DataProvider dataProvider, Spec spec) { + public GetAttesterSlashings(final DataProvider dataProvider, final Spec spec) { this(dataProvider.getNodeDataProvider(), spec); } - GetAttesterSlashings(final NodeDataProvider provider, Spec spec) { + GetAttesterSlashings(final NodeDataProvider provider, final Spec spec) { super( EndpointMetadata.get(ROUTE) .operationId("getPoolAttesterSlashings") @@ -54,13 +54,14 @@ public GetAttesterSlashings(final DataProvider dataProvider, Spec spec) { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { request.header(Header.CACHE_CONTROL, CACHE_NONE); List attesterSlashings = nodeDataProvider.getAttesterSlashings(); request.respondOk(attesterSlashings); } - private static SerializableTypeDefinition> getResponseType(Spec spec) { + private static SerializableTypeDefinition> getResponseType( + final Spec spec) { final IndexedAttestation.IndexedAttestationSchema indexedAttestationSchema = new IndexedAttestation.IndexedAttestationSchema(spec.getGenesisSpecConfig()); final AttesterSlashing.AttesterSlashingSchema attesterSlashingSchema = diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetBlindedBlock.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetBlindedBlock.java index eb742c74975..bbdef75a84e 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetBlindedBlock.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetBlindedBlock.java @@ -72,7 +72,7 @@ public GetBlindedBlock( } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final SafeFuture>> future = chainDataProvider.getBlindedBlock(request.getPathParameter(PARAMETER_BLOCK_ID)); @@ -91,7 +91,7 @@ public void handleRequest(RestApiRequest request) throws JsonProcessingException } private static SerializableTypeDefinition> getResponseType( - SchemaDefinitionCache schemaDefinitionCache) { + final SchemaDefinitionCache schemaDefinitionCache) { final SerializableTypeDefinition signedBeaconBlockType = getSchemaDefinitionForAllSupportedMilestones( schemaDefinitionCache, diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetBlobSidecars.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetBlobSidecars.java index 64754841d55..1a7ef4d4624 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetBlobSidecars.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetBlobSidecars.java @@ -73,7 +73,7 @@ private static EndpointMetadata createEndpointMetadata(final SchemaDefinitionCac } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final List indices = request.getQueryParameterList(BLOB_INDICES_PARAMETER); final SafeFuture>> future = chainDataProvider.getBlobSidecars(request.getPathParameter(PARAMETER_BLOCK_ID), indices); diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetBlockAttestations.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetBlockAttestations.java index 07757393f7f..6d67f545bf8 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetBlockAttestations.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetBlockAttestations.java @@ -40,11 +40,11 @@ public class GetBlockAttestations extends RestApiEndpoint { public static final String ROUTE = "/eth/v1/beacon/blocks/{block_id}/attestations"; private final ChainDataProvider chainDataProvider; - public GetBlockAttestations(final DataProvider dataProvider, Spec spec) { + public GetBlockAttestations(final DataProvider dataProvider, final Spec spec) { this(dataProvider.getChainDataProvider(), spec); } - public GetBlockAttestations(final ChainDataProvider chainDataProvider, Spec spec) { + public GetBlockAttestations(final ChainDataProvider chainDataProvider, final Spec spec) { super( EndpointMetadata.get(ROUTE) .operationId("getBlockAttestations") @@ -59,7 +59,7 @@ public GetBlockAttestations(final ChainDataProvider chainDataProvider, Spec spec } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final SafeFuture>>> future = chainDataProvider.getBlockAttestations(request.getPathParameter(PARAMETER_BLOCK_ID)); @@ -72,7 +72,7 @@ public void handleRequest(RestApiRequest request) throws JsonProcessingException } private static SerializableTypeDefinition>> getResponseType( - Spec spec) { + final Spec spec) { Attestation.AttestationSchema dataSchema = new Attestation.AttestationSchema(spec.getGenesisSpecConfig()); diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetBlockHeader.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetBlockHeader.java index 92245969e8d..3c2e3a735be 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetBlockHeader.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetBlockHeader.java @@ -66,7 +66,7 @@ public GetBlockHeader(final ChainDataProvider chainDataProvider) { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final SafeFuture> future = chainDataProvider.getBlockAndMetaData(request.getPathParameter(PARAMETER_BLOCK_ID)); diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetBlockHeaders.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetBlockHeaders.java index e383df95140..f5eef3a6d26 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetBlockHeaders.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetBlockHeaders.java @@ -73,7 +73,7 @@ public GetBlockHeaders(final ChainDataProvider chainDataProvider) { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final Optional parentRoot = request.getOptionalQueryParameter(PARENT_ROOT_PARAMETER); final Optional slot = request.getOptionalQueryParameter(SLOT_PARAMETER.withDescription(SLOT_QUERY_DESCRIPTION)); diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetBlockRoot.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetBlockRoot.java index 60ebc8673f2..e69a56c84d5 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetBlockRoot.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetBlockRoot.java @@ -65,7 +65,7 @@ public GetBlockRoot(final ChainDataProvider chainDataProvider) { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final SafeFuture>> future = chainDataProvider.getBlockRoot(request.getPathParameter(PARAMETER_BLOCK_ID)); diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetBlsToExecutionChanges.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetBlsToExecutionChanges.java index dd862a6dfca..037e6d620e4 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetBlsToExecutionChanges.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetBlsToExecutionChanges.java @@ -86,7 +86,7 @@ private static EndpointMetadata createEndpointMetadata(final SchemaDefinitionCac } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { request.header(Header.CACHE_CONTROL, CACHE_NONE); final Optional locallySubmitted = request.getOptionalQueryParameter(LOCALLY_SUBMITTED_QUERY_PARAMETER); diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetFinalizedBlockRoot.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetFinalizedBlockRoot.java index fb0dcdc69f2..8d5521aecb7 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetFinalizedBlockRoot.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetFinalizedBlockRoot.java @@ -43,11 +43,11 @@ public class GetFinalizedBlockRoot extends RestApiEndpoint { .withField("data", ROOT_TYPE, Function.identity()) .build(); - public GetFinalizedBlockRoot(DataProvider dataProvider) { + public GetFinalizedBlockRoot(final DataProvider dataProvider) { this(dataProvider.getChainDataProvider()); } - public GetFinalizedBlockRoot(ChainDataProvider chainDataProvider) { + public GetFinalizedBlockRoot(final ChainDataProvider chainDataProvider) { super( EndpointMetadata.get(ROUTE) .operationId("getFinalizedBlockRoot") @@ -64,7 +64,7 @@ public GetFinalizedBlockRoot(ChainDataProvider chainDataProvider) { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final UInt64 slot = request.getPathParameter(SLOT_PARAMETER); final SafeFuture> futureFinalizedBlockRoot = chainDataProvider.getFinalizedBlockRoot(slot); diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetFinalizedCheckpointState.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetFinalizedCheckpointState.java index b8e6b6284c5..2394120c7bc 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetFinalizedCheckpointState.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetFinalizedCheckpointState.java @@ -38,11 +38,11 @@ public class GetFinalizedCheckpointState extends RestApiEndpoint { public static final String ROUTE = "/eth/v1/checkpoint/finalized_state"; private final ChainDataProvider chainDataProvider; - public GetFinalizedCheckpointState(final DataProvider dataProvider, Spec spec) { + public GetFinalizedCheckpointState(final DataProvider dataProvider, final Spec spec) { this(dataProvider.getChainDataProvider(), spec); } - public GetFinalizedCheckpointState(final ChainDataProvider chainDataProvider, Spec spec) { + public GetFinalizedCheckpointState(final ChainDataProvider chainDataProvider, final Spec spec) { super( EndpointMetadata.get(ROUTE) .operationId("getFinalizedCheckpointState") @@ -64,7 +64,7 @@ public GetFinalizedCheckpointState(final ChainDataProvider chainDataProvider, Sp } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final SafeFuture> future = chainDataProvider.getBeaconStateAndMetadata("finalized"); diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetGenesis.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetGenesis.java index 06e155f08de..8532f97153d 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetGenesis.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetGenesis.java @@ -59,7 +59,7 @@ private Optional getGenesisData() { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final Optional maybeData = getGenesisData(); if (maybeData.isEmpty()) { request.respondWithCode(SC_NOT_FOUND); diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetProposerSlashings.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetProposerSlashings.java index 6bd9d8ec722..342b6dd1a92 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetProposerSlashings.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetProposerSlashings.java @@ -61,7 +61,7 @@ public GetProposerSlashings(final DataProvider dataProvider) { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { request.header(Header.CACHE_CONTROL, CACHE_NONE); List proposerSlashings = nodeDataProvider.getProposerSlashings(); request.respondOk(proposerSlashings); diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetStateCommittees.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetStateCommittees.java index adcbac11a95..61ad5867895 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetStateCommittees.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetStateCommittees.java @@ -89,7 +89,7 @@ public GetStateCommittees(final DataProvider dataProvider) { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final Optional epoch = request.getOptionalQueryParameter(EPOCH_PARAMETER); final Optional committeeIndex = request.getOptionalQueryParameter(INDEX_PARAMETER); final Optional slot = diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetStateSyncCommittees.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetStateSyncCommittees.java index cec44e00070..92f0a0349c5 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetStateSyncCommittees.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetStateSyncCommittees.java @@ -83,7 +83,7 @@ public GetStateSyncCommittees(final ChainDataProvider chainDataProvider) { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final Optional epoch = request.getOptionalQueryParameter(EPOCH_PARAMETER); final SafeFuture>> future = chainDataProvider.getStateSyncCommittees( diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetStateValidator.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetStateValidator.java index 1f5307c6686..a3cb1eaaf5f 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetStateValidator.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetStateValidator.java @@ -72,7 +72,7 @@ public GetStateValidator(final DataProvider dataProvider) { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final SafeFuture> future = chainDataProvider.getBeaconStateAndMetadata(request.getPathParameter(PARAMETER_STATE_ID)); diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetStateValidatorBalances.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetStateValidatorBalances.java index 020e0ab6f71..e8f9ca66e61 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetStateValidatorBalances.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetStateValidatorBalances.java @@ -74,7 +74,7 @@ public GetStateValidatorBalances(final DataProvider dataProvider) { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final List validators = request.getQueryParameterList(ID_PARAMETER); final SafeFuture>>> future = diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetStateValidators.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetStateValidators.java index 9a876e2ace4..b65dbb7116f 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetStateValidators.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetStateValidators.java @@ -64,7 +64,7 @@ public GetStateValidators(final DataProvider dataProvider) { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final List validators = request.getQueryParameterList(ID_PARAMETER); final List statusParameters = request.getQueryParameterList(STATUS_PARAMETER); diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetVoluntaryExits.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetVoluntaryExits.java index 69008e2eabc..9f534b33c6a 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetVoluntaryExits.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/GetVoluntaryExits.java @@ -62,7 +62,7 @@ public GetVoluntaryExits(final DataProvider dataProvider) { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { request.header(Header.CACHE_CONTROL, CACHE_NONE); request.respondOk(nodeDataProvider.getVoluntaryExits()); } diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/PostAttestation.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/PostAttestation.java index 1aef8da8d4e..2325f27aeaf 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/PostAttestation.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/PostAttestation.java @@ -70,7 +70,7 @@ public PostAttestation( } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final List attestations = request.getRequestBody(); final SafeFuture> future = provider.submitAttestations(attestations); diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/PostAttesterSlashing.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/PostAttesterSlashing.java index d66aff7b692..51e0e2a278e 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/PostAttesterSlashing.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/PostAttesterSlashing.java @@ -56,7 +56,7 @@ public PostAttesterSlashing(final NodeDataProvider provider, final Spec spec) { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final AttesterSlashing attesterSlashing = request.getRequestBody(); final SafeFuture future = nodeDataProvider.postAttesterSlashing(attesterSlashing); @@ -79,7 +79,7 @@ public void handleRequest(RestApiRequest request) throws JsonProcessingException } private static DeserializableTypeDefinition getRequestType( - SpecConfig specConfig) { + final SpecConfig specConfig) { final IndexedAttestation.IndexedAttestationSchema indexedAttestationSchema = new IndexedAttestation.IndexedAttestationSchema(specConfig); final AttesterSlashing.AttesterSlashingSchema attesterSlashingSchema = diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/PostBlsToExecutionChanges.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/PostBlsToExecutionChanges.java index e4c7cacd153..89e1c5b3cca 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/PostBlsToExecutionChanges.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/PostBlsToExecutionChanges.java @@ -75,7 +75,7 @@ private static EndpointMetadata createEndpointMetadata(final SchemaDefinitionCac } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final List blsToExecutionChanges = request.getRequestBody(); if (blsToExecutionChanges.size() > MAX_BLS_MESSAGES_PER_REQUEST) { final String errorMessage = diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/PostProposerSlashing.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/PostProposerSlashing.java index 6df0827edee..3b2e3942731 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/PostProposerSlashing.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/PostProposerSlashing.java @@ -59,7 +59,7 @@ public PostProposerSlashing(final NodeDataProvider provider) { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final ProposerSlashing proposerSlashing = request.getRequestBody(); final SafeFuture future = nodeDataProvider.postProposerSlashing(proposerSlashing); diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/PostStateValidatorBalances.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/PostStateValidatorBalances.java index 1cbbc78650f..addd20d71da 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/PostStateValidatorBalances.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/PostStateValidatorBalances.java @@ -56,7 +56,7 @@ public PostStateValidatorBalances(final DataProvider dataProvider) { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final Optional> validators = request.getOptionalRequestBody(); final SafeFuture>>> future = diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/PostStateValidators.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/PostStateValidators.java index 6474651f4ef..af6274e8372 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/PostStateValidators.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/PostStateValidators.java @@ -64,7 +64,7 @@ public PostStateValidators(final DataProvider dataProvider) { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final Optional requestBody; try { diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/PostSyncCommittees.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/PostSyncCommittees.java index f82c3bf23c2..68fb6a35feb 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/PostSyncCommittees.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/PostSyncCommittees.java @@ -72,7 +72,7 @@ public PostSyncCommittees(final ValidatorDataProvider provider) { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final List messages = request.getRequestBody(); final SafeFuture> future = provider.submitCommitteeSignatures(messages); diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/PostVoluntaryExit.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/PostVoluntaryExit.java index 3016aab587a..1cf7567af0e 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/PostVoluntaryExit.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/PostVoluntaryExit.java @@ -57,7 +57,7 @@ public PostVoluntaryExit(final NodeDataProvider provider) { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final SignedVoluntaryExit exit = request.getRequestBody(); final SafeFuture future = nodeDataProvider.postVoluntaryExit(exit); diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/lightclient/GetLightClientBootstrap.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/lightclient/GetLightClientBootstrap.java index 7ee0fb67c6f..f1e8d84bfc1 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/lightclient/GetLightClientBootstrap.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/lightclient/GetLightClientBootstrap.java @@ -72,7 +72,7 @@ public GetLightClientBootstrap( } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final Bytes32 blockRoot = request.getPathParameter(BLOCK_ROOT_PARAMETER); final SafeFuture>> future = chainDataProvider.getLightClientBoostrap(blockRoot); @@ -92,7 +92,7 @@ public void handleRequest(RestApiRequest request) throws JsonProcessingException } private static SerializableTypeDefinition> - getResponseType(SchemaDefinitionCache schemaDefinitionCache) { + getResponseType(final SchemaDefinitionCache schemaDefinitionCache) { final SerializableTypeDefinition lightClientBootstrapType = SchemaDefinitionsAltair.required( schemaDefinitionCache.getSchemaDefinition(SpecMilestone.ALTAIR)) diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/lightclient/GetLightClientUpdatesByRange.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/lightclient/GetLightClientUpdatesByRange.java index 944fc7517e4..e64ee211da7 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/lightclient/GetLightClientUpdatesByRange.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/lightclient/GetLightClientUpdatesByRange.java @@ -60,12 +60,12 @@ public GetLightClientUpdatesByRange(final SchemaDefinitionCache schemaDefinition } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { request.respondError(501, "Not implemented"); } private static ResponseContentTypeDefinition>> - getJsonResponseType(SchemaDefinitionCache schemaDefinitionCache) { + getJsonResponseType(final SchemaDefinitionCache schemaDefinitionCache) { final SerializableTypeDefinition lightClientUpdateType = SchemaDefinitionsAltair.required( schemaDefinitionCache.getSchemaDefinition(SpecMilestone.ALTAIR)) diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/builder/GetExpectedWithdrawals.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/builder/GetExpectedWithdrawals.java index 11f5833c7e4..b43ed1f218c 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/builder/GetExpectedWithdrawals.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/builder/GetExpectedWithdrawals.java @@ -79,7 +79,7 @@ protected GetExpectedWithdrawals( } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final SafeFuture>>> future = chainDataProvider.getExpectedWithdrawals( request.getPathParameter(PARAMETER_STATE_ID), diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/config/GetDepositContract.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/config/GetDepositContract.java index 60c3a358399..fdfd1bd84a2 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/config/GetDepositContract.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/config/GetDepositContract.java @@ -64,7 +64,7 @@ public GetDepositContract( } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final long depositChainId = configProvider.getGenesisSpecConfig().getDepositChainId(); request.respondOk(new DepositContractData(depositChainId, depositContractAddress)); } @@ -73,7 +73,7 @@ static class DepositContractData { final UInt64 chainId; final Eth1Address address; - DepositContractData(long chainId, Eth1Address address) { + DepositContractData(final long chainId, final Eth1Address address) { this.chainId = UInt64.valueOf(chainId); this.address = address; } diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/config/GetForkSchedule.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/config/GetForkSchedule.java index c10498c4474..d6343ff88ab 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/config/GetForkSchedule.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/config/GetForkSchedule.java @@ -56,7 +56,7 @@ public GetForkSchedule(final DataProvider dataProvider) { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { request.respondOk(configProvider.getStateForkSchedule()); } } diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/config/GetSpec.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/config/GetSpec.java index 1694f283da0..4dbc4ce083c 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/config/GetSpec.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/config/GetSpec.java @@ -51,7 +51,7 @@ public GetSpec(final DataProvider dataProvider) { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { try { final SpecConfigData responseContext = new SpecConfigData(configProvider.getGenesisSpec()); request.respondOk(responseContext.getConfigMap()); diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/debug/GetForkChoice.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/debug/GetForkChoice.java index 09c6b96af9b..a1208813243 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/debug/GetForkChoice.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/debug/GetForkChoice.java @@ -154,7 +154,7 @@ public GetForkChoice(final ChainDataProvider chainDataProvider) { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { request.header(Header.CACHE_CONTROL, CACHE_NONE); request.respondOk(chainDataProvider.getForkChoiceData()); } diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/debug/GetState.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/debug/GetState.java index 2170c1ece37..69fce29776a 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/debug/GetState.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/debug/GetState.java @@ -85,7 +85,7 @@ public GetState( } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final SafeFuture> future = chainDataProvider.getBeaconStateAndMetadata(request.getPathParameter(PARAMETER_STATE_ID)); diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/events/AttestationEvent.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/events/AttestationEvent.java index b58be4856bb..565d4c12e3e 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/events/AttestationEvent.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/events/AttestationEvent.java @@ -17,7 +17,7 @@ public class AttestationEvent extends Event { - AttestationEvent(Attestation attestation) { + AttestationEvent(final Attestation attestation) { super(attestation.getSchema().getJsonTypeDefinition(), attestation); } } diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/events/ContributionAndProofEvent.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/events/ContributionAndProofEvent.java index 03ec197a23f..9dfc8e99570 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/events/ContributionAndProofEvent.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/events/ContributionAndProofEvent.java @@ -17,7 +17,7 @@ public class ContributionAndProofEvent extends Event { - ContributionAndProofEvent(SignedContributionAndProof signedContributionAndProof) { + ContributionAndProofEvent(final SignedContributionAndProof signedContributionAndProof) { super( signedContributionAndProof.getSchema().getJsonTypeDefinition(), signedContributionAndProof); } diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/events/Event.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/events/Event.java index 20a1b6589db..efe1920c831 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/events/Event.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/events/Event.java @@ -20,7 +20,7 @@ public abstract class Event { final SerializableTypeDefinition type; final T data; - Event(SerializableTypeDefinition type, T data) { + Event(final SerializableTypeDefinition type, final T data) { this.type = type; this.data = data; } diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/events/GetEvents.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/events/GetEvents.java index eab07771370..c075742dcda 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/events/GetEvents.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/events/GetEvents.java @@ -94,7 +94,7 @@ public GetEvents( } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { request.startEventStream(eventSubscriptionManager::registerClient); } } diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/events/SyncStateChangeEvent.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/events/SyncStateChangeEvent.java index 2865ef2cfdc..9545b6abdfd 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/events/SyncStateChangeEvent.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/events/SyncStateChangeEvent.java @@ -26,7 +26,7 @@ public class SyncStateChangeEvent extends Event { .withField("sync_state", STRING_TYPE, Function.identity()) .build(); - SyncStateChangeEvent(String syncState) { + SyncStateChangeEvent(final String syncState) { super(SYNC_STATE_CHANGE_EVENT_TYPE, syncState); } } diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/node/GetHealth.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/node/GetHealth.java index 8a0540a0ca2..cd29dbcdb4a 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/node/GetHealth.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/node/GetHealth.java @@ -62,7 +62,7 @@ public GetHealth(final DataProvider provider) { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { request.header(Header.CACHE_CONTROL, CACHE_NONE); if (!chainDataProvider.isStoreAvailable() || syncProvider.getRejectedExecutionCount() > 0) { request.respondWithCode(SC_SERVICE_UNAVAILABLE); diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/node/GetPeerById.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/node/GetPeerById.java index 680b721fa30..f19596df57e 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/node/GetPeerById.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/node/GetPeerById.java @@ -62,7 +62,7 @@ public GetPeerById(final DataProvider provider) { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { request.header(Header.CACHE_CONTROL, CACHE_NONE); Optional peer = network.getEth2PeerById(request.getPathParameter(PEER_ID_PARAMETER)); if (peer.isEmpty()) { diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/node/GetPeerCount.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/node/GetPeerCount.java index 21225652539..c97a732c789 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/node/GetPeerCount.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/node/GetPeerCount.java @@ -68,7 +68,7 @@ public GetPeerCount(final DataProvider provider) { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { request.header(Header.CACHE_CONTROL, CACHE_NONE); request.respondOk(new ResponseData(network.getEth2Peers())); } @@ -77,7 +77,7 @@ static class ResponseData { final UInt64 disconnected; final UInt64 connected; - ResponseData(List peers) { + ResponseData(final List peers) { long disconnected = 0; long connected = 0; diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/node/GetPeers.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/node/GetPeers.java index 1099366db4a..e4252e999cb 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/node/GetPeers.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/node/GetPeers.java @@ -118,7 +118,7 @@ public GetPeers(final DataProvider provider) { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { request.respondOk(new PeersData(network.getEth2Peers()), NO_CACHE); } diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/node/GetSyncing.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/node/GetSyncing.java index 6792868a46f..749346dd4de 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/node/GetSyncing.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/node/GetSyncing.java @@ -80,7 +80,7 @@ public GetSyncing(final DataProvider provider) { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { request.header(Header.CACHE_CONTROL, CACHE_NONE); request.respondOk(new SyncStatusData(syncProvider, executionClientDataProvider)); } diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/node/GetVersion.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/node/GetVersion.java index 5aa2c65ca20..256f57f655d 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/node/GetVersion.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/node/GetVersion.java @@ -54,7 +54,7 @@ public GetVersion() { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { request.header(Header.CACHE_CONTROL, CACHE_NONE); request.respondOk(VersionProvider.VERSION); } diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/rewards/GetAttestationRewards.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/rewards/GetAttestationRewards.java index b809f0d9128..ed3336545fe 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/rewards/GetAttestationRewards.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/rewards/GetAttestationRewards.java @@ -113,7 +113,7 @@ public GetAttestationRewards(final ChainDataProvider chainDataProvider) { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final UInt64 epoch = request.getPathParameter(EPOCH_PARAMETER); // Validator identifier might be the validator's public key or index. If empty we query all // validators. diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/rewards/GetBlockRewards.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/rewards/GetBlockRewards.java index 415a13c8223..231076c0266 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/rewards/GetBlockRewards.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/rewards/GetBlockRewards.java @@ -78,7 +78,7 @@ public GetBlockRewards(final ChainDataProvider chainDataProvider) { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { request.respondAsync( chainDataProvider .getBlockRewardsFromBlockId(request.getPathParameter(PARAMETER_BLOCK_ID)) diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/rewards/GetSyncCommitteeRewards.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/rewards/GetSyncCommitteeRewards.java index c6a5ac27577..78c350c8364 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/rewards/GetSyncCommitteeRewards.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/rewards/GetSyncCommitteeRewards.java @@ -91,7 +91,7 @@ public GetSyncCommitteeRewards(final ChainDataProvider chainDataProvider) { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { // Validator identifier might be the validator's public key or index. If empty we query all // validators. final Optional> maybeList = request.getOptionalRequestBody(); diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/GetAggregateAttestation.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/GetAggregateAttestation.java index 4c7c850f41e..9e6e5e9f5ca 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/GetAggregateAttestation.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/GetAggregateAttestation.java @@ -69,7 +69,7 @@ public GetAggregateAttestation(final ValidatorDataProvider provider, final Spec } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final Bytes32 beaconBlockRoot = request.getQueryParameter(ATTESTATION_DATA_ROOT_PARAMETER); final UInt64 slot = request.getQueryParameter(SLOT_PARAM); @@ -84,7 +84,8 @@ public void handleRequest(RestApiRequest request) throws JsonProcessingException .orElseGet(AsyncApiResponse::respondNotFound))); } - private static SerializableTypeDefinition getResponseType(SpecConfig specConfig) { + private static SerializableTypeDefinition getResponseType( + final SpecConfig specConfig) { Attestation.AttestationSchema dataSchema = new Attestation.AttestationSchema(specConfig); return SerializableTypeDefinition.object(Attestation.class) diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/GetAttestationData.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/GetAttestationData.java index 9ea02ad9c3e..0923b70a1ff 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/GetAttestationData.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/GetAttestationData.java @@ -74,7 +74,7 @@ public GetAttestationData(final ValidatorDataProvider provider) { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final UInt64 slot = request.getQueryParameter(SLOT_PARAM); final UInt64 committeeIndex = request.getQueryParameter(COMMITTEE_INDEX_PARAMETER); if (committeeIndex.isLessThan(0)) { diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/GetProposerDuties.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/GetProposerDuties.java index 4f2ffd2c7eb..f842c616afc 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/GetProposerDuties.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/GetProposerDuties.java @@ -71,7 +71,7 @@ public GetProposerDuties(final DataProvider dataProvider) { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { if (!validatorDataProvider.isStoreAvailable() || syncDataProvider.isSyncing()) { request.respondError(SC_SERVICE_UNAVAILABLE, SERVICE_UNAVAILABLE); return; diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/GetSyncCommitteeContribution.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/GetSyncCommitteeContribution.java index 86caf66cf8e..c52b54b29ba 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/GetSyncCommitteeContribution.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/GetSyncCommitteeContribution.java @@ -72,7 +72,7 @@ public GetSyncCommitteeContribution( } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final UInt64 slot = request.getQueryParameter(SLOT_PARAMETER.withDescription(SLOT_QUERY_DESCRIPTION)); final Bytes32 blockRoot = request.getQueryParameter(BEACON_BLOCK_ROOT_PARAMETER); diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/PostAggregateAndProofs.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/PostAggregateAndProofs.java index fa020b9c1bd..9e53e14465d 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/PostAggregateAndProofs.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/PostAggregateAndProofs.java @@ -60,7 +60,7 @@ public PostAggregateAndProofs( } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final List signedAggregateAndProofs = request.getRequestBody(); final SafeFuture> future = provider.sendAggregateAndProofs(signedAggregateAndProofs); diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/PostAttesterDuties.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/PostAttesterDuties.java index 57e0a084ed4..b4e85d24f8d 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/PostAttesterDuties.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/PostAttesterDuties.java @@ -78,7 +78,7 @@ public PostAttesterDuties(final DataProvider dataProvider) { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { if (!validatorDataProvider.isStoreAvailable() || syncDataProvider.isSyncing()) { request.respondError( SC_SERVICE_UNAVAILABLE, "Beacon node is currently syncing and not serving requests."); diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/PostContributionAndProofs.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/PostContributionAndProofs.java index a818f3ac1ab..34556b6a4da 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/PostContributionAndProofs.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/PostContributionAndProofs.java @@ -58,7 +58,7 @@ public PostContributionAndProofs( } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final SafeFuture future = provider.sendContributionAndProofs(request.getRequestBody()); request.respondAsync(future.thenApply(v -> AsyncApiResponse.respondWithCode(SC_OK))); } diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/PostSubscribeToBeaconCommitteeSubnet.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/PostSubscribeToBeaconCommitteeSubnet.java index 73e43a2bc7e..3ec7046a5ca 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/PostSubscribeToBeaconCommitteeSubnet.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/PostSubscribeToBeaconCommitteeSubnet.java @@ -94,7 +94,7 @@ public PostSubscribeToBeaconCommitteeSubnet(final ValidatorDataProvider provider } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final List requestBody = request.getRequestBody(); final List subscriptionRequests = requestBody.stream() @@ -116,11 +116,11 @@ static class CommitteeSubscriptionData { CommitteeSubscriptionData() {} CommitteeSubscriptionData( - int validatorIndex, - int committeeIndex, - UInt64 committeesAtSlot, - UInt64 slot, - boolean isAggregator) { + final int validatorIndex, + final int committeeIndex, + final UInt64 committeesAtSlot, + final UInt64 slot, + final boolean isAggregator) { this.validatorIndex = validatorIndex; this.committeeIndex = committeeIndex; this.committeesAtSlot = committeesAtSlot; @@ -137,7 +137,7 @@ public int getValidatorIndex() { return validatorIndex; } - public void setValidatorIndex(int validatorIndex) { + public void setValidatorIndex(final int validatorIndex) { this.validatorIndex = validatorIndex; } @@ -145,7 +145,7 @@ public int getCommitteeIndex() { return committeeIndex; } - public void setCommitteeIndex(int committeeIndex) { + public void setCommitteeIndex(final int committeeIndex) { this.committeeIndex = committeeIndex; } @@ -153,7 +153,7 @@ public UInt64 getCommitteesAtSlot() { return committeesAtSlot; } - public void setCommitteesAtSlot(UInt64 committeesAtSlot) { + public void setCommitteesAtSlot(final UInt64 committeesAtSlot) { this.committeesAtSlot = committeesAtSlot; } @@ -161,7 +161,7 @@ public UInt64 getSlot() { return slot; } - public void setSlot(UInt64 slot) { + public void setSlot(final UInt64 slot) { this.slot = slot; } @@ -169,12 +169,12 @@ public boolean isAggregator() { return isAggregator; } - public void setAggregator(boolean aggregator) { + public void setAggregator(final boolean aggregator) { isAggregator = aggregator; } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/PostSyncCommitteeSubscriptions.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/PostSyncCommitteeSubscriptions.java index b5444f99504..53e57d786d4 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/PostSyncCommitteeSubscriptions.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/PostSyncCommitteeSubscriptions.java @@ -81,7 +81,7 @@ public PostSyncCommitteeSubscriptions(final ValidatorDataProvider validatorDataP } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final List requestData = request.getRequestBody(); final List subscriptions = requestData.stream().map(PostSyncCommitteeData::toSyncCommitteeSubnetSubscription).toList(); @@ -113,7 +113,7 @@ public int getValidatorIndex() { return validatorIndex; } - public void setValidatorIndex(int validatorIndex) { + public void setValidatorIndex(final int validatorIndex) { this.validatorIndex = validatorIndex; } @@ -121,7 +121,7 @@ public List getSyncCommitteeIndices() { return new IntArrayList(syncCommitteeIndices); } - public void setSyncCommitteeIndices(List syncCommitteeIndices) { + public void setSyncCommitteeIndices(final List syncCommitteeIndices) { this.syncCommitteeIndices = new IntOpenHashSet(syncCommitteeIndices); } @@ -129,12 +129,12 @@ public UInt64 getUntilEpoch() { return untilEpoch; } - public void setUntilEpoch(UInt64 untilEpoch) { + public void setUntilEpoch(final UInt64 untilEpoch) { this.untilEpoch = untilEpoch; } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/PostSyncDuties.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/PostSyncDuties.java index f4359020ca9..3f90079ab2e 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/PostSyncDuties.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/PostSyncDuties.java @@ -66,7 +66,7 @@ public PostSyncDuties(final DataProvider dataProvider) { } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { if (!validatorDataProvider.isStoreAvailable() || syncDataProvider.isSyncing()) { request.respondError(SC_SERVICE_UNAVAILABLE, SERVICE_UNAVAILABLE); return; diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/PostValidatorLiveness.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/PostValidatorLiveness.java index d23b315d1c8..2aa42346952 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/PostValidatorLiveness.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/PostValidatorLiveness.java @@ -86,7 +86,7 @@ public PostValidatorLiveness( } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { if (!chainDataProvider.isStoreAvailable() || syncDataProvider.isSyncing()) { throw new ServiceUnavailableException(); } diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v2/beacon/GetBlock.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v2/beacon/GetBlock.java index 793b2084b94..677ee89e734 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v2/beacon/GetBlock.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v2/beacon/GetBlock.java @@ -70,7 +70,7 @@ public GetBlock( } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final SafeFuture>> future = chainDataProvider.getBlock(request.getPathParameter(PARAMETER_BLOCK_ID)); @@ -89,7 +89,7 @@ public void handleRequest(RestApiRequest request) throws JsonProcessingException } private static SerializableTypeDefinition> getResponseType( - SchemaDefinitionCache schemaDefinitionCache) { + final SchemaDefinitionCache schemaDefinitionCache) { final SerializableTypeDefinition signedBeaconBlockType = getSchemaDefinitionForAllSupportedMilestones( schemaDefinitionCache, diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v2/debug/GetState.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v2/debug/GetState.java index 3f12a5b6a67..08e8295ae3d 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v2/debug/GetState.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v2/debug/GetState.java @@ -72,7 +72,7 @@ public GetState( } @Override - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final SafeFuture> future = chainDataProvider.getBeaconStateAndMetadata(request.getPathParameter(PARAMETER_STATE_ID)); @@ -91,7 +91,7 @@ public void handleRequest(RestApiRequest request) throws JsonProcessingException } private static SerializableTypeDefinition getResponseType( - SchemaDefinitionCache schemaDefinitionCache) { + final SchemaDefinitionCache schemaDefinitionCache) { return SerializableTypeDefinition.object() .name("GetStateV2Response") .withField("version", MILESTONE_TYPE, ObjectAndMetaData::getMilestone) diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v2/validator/GetNewBlock.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v2/validator/GetNewBlock.java index c737a93eca2..217b145a1ec 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v2/validator/GetNewBlock.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v2/validator/GetNewBlock.java @@ -108,7 +108,7 @@ private static EndpointMetadata getEndpointMetaData( @Override @SuppressWarnings("deprecation") - public void handleRequest(RestApiRequest request) throws JsonProcessingException { + public void handleRequest(final RestApiRequest request) throws JsonProcessingException { final UInt64 slot = request.getPathParameter(SLOT_PARAMETER.withDescription(SLOT_PATH_DESCRIPTION)); final BLSSignature randao = request.getQueryParameter(RANDAO_PARAMETER); diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/schema/ErrorListBadRequest.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/schema/ErrorListBadRequest.java index 5866b8a809b..47519c93555 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/schema/ErrorListBadRequest.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/schema/ErrorListBadRequest.java @@ -51,7 +51,7 @@ public static ErrorListBadRequest convert( } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/schema/ErrorResponse.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/schema/ErrorResponse.java index 8b911fb5488..9884f739f65 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/schema/ErrorResponse.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/schema/ErrorResponse.java @@ -22,7 +22,7 @@ public class ErrorResponse { @JsonCreator public ErrorResponse( - @JsonProperty("status") Integer status, @JsonProperty("message") String message) { + final @JsonProperty("status") Integer status, final @JsonProperty("message") String message) { this.status = status; this.message = message; } diff --git a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/schema/ProposersData.java b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/schema/ProposersData.java index f1de7428e9d..54fc4000b12 100644 --- a/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/schema/ProposersData.java +++ b/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/schema/ProposersData.java @@ -96,7 +96,7 @@ public static SerializableTypeDefinition getJsonTypeDefinition() } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/dataexchange/src/main/java/tech/pegasys/teku/data/eraFileFormat/EraFile.java b/data/dataexchange/src/main/java/tech/pegasys/teku/data/eraFileFormat/EraFile.java index 32cb23d08e5..ee64be4a9bd 100644 --- a/data/dataexchange/src/main/java/tech/pegasys/teku/data/eraFileFormat/EraFile.java +++ b/data/dataexchange/src/main/java/tech/pegasys/teku/data/eraFileFormat/EraFile.java @@ -166,7 +166,7 @@ public SignedBeaconBlock getLastBlock() { } private void verifyBlocksWithReferenceState( - BeaconState verifiedState, final SignedBeaconBlock previousArchiveLastBlock) + final BeaconState verifiedState, final SignedBeaconBlock previousArchiveLastBlock) throws IOException { currentSlot = blockIndices.getStartSlot(); Bytes32 lastRoot = Bytes32.ZERO; diff --git a/data/provider/src/main/java/tech/pegasys/teku/api/AbstractSelectorFactory.java b/data/provider/src/main/java/tech/pegasys/teku/api/AbstractSelectorFactory.java index 90462b99cef..9e65b2509a8 100644 --- a/data/provider/src/main/java/tech/pegasys/teku/api/AbstractSelectorFactory.java +++ b/data/provider/src/main/java/tech/pegasys/teku/api/AbstractSelectorFactory.java @@ -60,11 +60,11 @@ public T createSelectorForBlockId(final String blockId) { } } - public T stateRootSelector(Bytes32 stateRoot) { + public T stateRootSelector(final Bytes32 stateRoot) { throw new UnsupportedOperationException(); } - public T blockRootSelector(Bytes32 blockRoot) { + public T blockRootSelector(final Bytes32 blockRoot) { throw new UnsupportedOperationException(); } @@ -84,7 +84,7 @@ public T justifiedSelector() { throw new UnsupportedOperationException(); } - public T slotSelector(UInt64 slot) { + public T slotSelector(final UInt64 slot) { throw new UnsupportedOperationException(); } diff --git a/data/provider/src/main/java/tech/pegasys/teku/api/ChainDataProvider.java b/data/provider/src/main/java/tech/pegasys/teku/api/ChainDataProvider.java index 5e7efcc2511..91429e64760 100644 --- a/data/provider/src/main/java/tech/pegasys/teku/api/ChainDataProvider.java +++ b/data/provider/src/main/java/tech/pegasys/teku/api/ChainDataProvider.java @@ -124,7 +124,7 @@ public ChainDataProvider( } public UInt64 getCurrentEpoch( - tech.pegasys.teku.spec.datastructures.state.beaconstate.BeaconState state) { + final tech.pegasys.teku.spec.datastructures.state.beaconstate.BeaconState state) { return spec.getCurrentEpoch(state); } @@ -676,7 +676,7 @@ private Optional findLatestAvailableEpochForRewardCalculation() { } public SafeFuture>>> getExpectedWithdrawals( - String stateIdParam, Optional optionalProposalSlot) { + final String stateIdParam, final Optional optionalProposalSlot) { return stateSelectorFactory .createSelectorForStateId(stateIdParam) .getState() @@ -697,8 +697,8 @@ public SafeFuture>>> getExpectedWith } List getExpectedWithdrawalsFromState( - tech.pegasys.teku.spec.datastructures.state.beaconstate.BeaconState data, - Optional optionalProposalSlot) { + final tech.pegasys.teku.spec.datastructures.state.beaconstate.BeaconState data, + final Optional optionalProposalSlot) { final UInt64 proposalSlot = optionalProposalSlot.orElse(data.getSlot().increment()); // Apply some sanity checks prior to computing pre-state if (!spec.atSlot(proposalSlot).getMilestone().isGreaterThanOrEqualTo(SpecMilestone.CAPELLA)) { diff --git a/data/provider/src/main/java/tech/pegasys/teku/api/RewardCalculator.java b/data/provider/src/main/java/tech/pegasys/teku/api/RewardCalculator.java index 86d02edfaab..e50964238f7 100644 --- a/data/provider/src/main/java/tech/pegasys/teku/api/RewardCalculator.java +++ b/data/provider/src/main/java/tech/pegasys/teku/api/RewardCalculator.java @@ -98,7 +98,9 @@ Map getCommitteeIndices( } public SyncCommitteeRewardData getSyncCommitteeRewardData( - Set validators, BlockAndMetaData blockAndMetadata, BeaconState state) { + final Set validators, + final BlockAndMetaData blockAndMetadata, + final BeaconState state) { final BeaconBlock block = blockAndMetadata.getData().getMessage(); if (!spec.atSlot(block.getSlot()).getMilestone().isGreaterThanOrEqualTo(SpecMilestone.ALTAIR)) { throw new BadRequestException( diff --git a/data/provider/src/main/java/tech/pegasys/teku/api/SpecConfigData.java b/data/provider/src/main/java/tech/pegasys/teku/api/SpecConfigData.java index 84b4eddfe1e..4e8f09433de 100644 --- a/data/provider/src/main/java/tech/pegasys/teku/api/SpecConfigData.java +++ b/data/provider/src/main/java/tech/pegasys/teku/api/SpecConfigData.java @@ -26,7 +26,7 @@ public class SpecConfigData { private final SpecConfig specConfig; - public SpecConfigData(SpecConfig specConfig) { + public SpecConfigData(final SpecConfig specConfig) { this.specConfig = specConfig; } @@ -129,7 +129,7 @@ private Optional getSyncCommitteeSubnetCount() { return getLegacyAltairConstant(Integer.toString(NetworkConstants.SYNC_COMMITTEE_SUBNET_COUNT)); } - private Optional getLegacyAltairConstant(T value) { + private Optional getLegacyAltairConstant(final T value) { return specConfig.toVersionAltair().isPresent() ? Optional.of(value) : Optional.empty(); } } diff --git a/data/provider/src/main/java/tech/pegasys/teku/api/SyncDataProvider.java b/data/provider/src/main/java/tech/pegasys/teku/api/SyncDataProvider.java index ea3c462e7dd..81b20925b74 100644 --- a/data/provider/src/main/java/tech/pegasys/teku/api/SyncDataProvider.java +++ b/data/provider/src/main/java/tech/pegasys/teku/api/SyncDataProvider.java @@ -24,7 +24,8 @@ public class SyncDataProvider { private final SyncService syncService; private final IntSupplier rejectedExecutionSupplier; - public SyncDataProvider(SyncService syncService, final IntSupplier rejectedExecutionSupplier) { + public SyncDataProvider( + final SyncService syncService, final IntSupplier rejectedExecutionSupplier) { this.syncService = syncService; this.rejectedExecutionSupplier = rejectedExecutionSupplier; } @@ -37,11 +38,11 @@ public int getRejectedExecutionCount() { return rejectedExecutionSupplier.getAsInt(); } - public long subscribeToSyncStateChanges(SyncStateProvider.SyncStateSubscriber subscriber) { + public long subscribeToSyncStateChanges(final SyncStateProvider.SyncStateSubscriber subscriber) { return syncService.subscribeToSyncStateChanges(subscriber); } - public boolean unsubscribeFromSyncStateChanges(long subscriberId) { + public boolean unsubscribeFromSyncStateChanges(final long subscriberId) { return syncService.unsubscribeFromSyncStateChanges(subscriberId); } diff --git a/data/provider/src/main/java/tech/pegasys/teku/api/ValidatorDataProvider.java b/data/provider/src/main/java/tech/pegasys/teku/api/ValidatorDataProvider.java index 7eff19ab000..a45c8c2c5e4 100644 --- a/data/provider/src/main/java/tech/pegasys/teku/api/ValidatorDataProvider.java +++ b/data/provider/src/main/java/tech/pegasys/teku/api/ValidatorDataProvider.java @@ -142,7 +142,7 @@ public SpecMilestone getMilestoneAtSlot(final UInt64 slot) { } public SafeFuture> createAttestationDataAtSlot( - UInt64 slot, int committeeIndex) { + final UInt64 slot, final int committeeIndex) { if (!isStoreAvailable()) { return SafeFuture.failedFuture(new ChainDataUnavailableException()); } @@ -159,7 +159,8 @@ public SafeFuture> createAttestationDataAtSlot( }); } - public SafeFuture> submitAttestations(List attestations) { + public SafeFuture> submitAttestations( + final List attestations) { return validatorApiChannel.sendSignedAttestations(attestations); } @@ -326,7 +327,7 @@ public boolean isPhase0Slot(final UInt64 slot) { } private static ValidatorBlockResult generateSubmitSignedBlockResponse( - SendSignedBlockResult result) { + final SendSignedBlockResult result) { int responseCode; Optional hashRoot = result.getBlockRoot(); if (result.getRejectionReason().isEmpty()) { diff --git a/data/publisher/src/main/java/tech/pegasys/teku/data/publisher/BaseMetricData.java b/data/publisher/src/main/java/tech/pegasys/teku/data/publisher/BaseMetricData.java index 6c5587b4c46..b70b23c87be 100644 --- a/data/publisher/src/main/java/tech/pegasys/teku/data/publisher/BaseMetricData.java +++ b/data/publisher/src/main/java/tech/pegasys/teku/data/publisher/BaseMetricData.java @@ -25,7 +25,7 @@ public class BaseMetricData { @JsonProperty("process") private final String process; - public BaseMetricData(long timestamp, String process) { + public BaseMetricData(final long timestamp, final String process) { this.timestamp = timestamp; this.process = process; } diff --git a/data/publisher/src/main/java/tech/pegasys/teku/data/publisher/SystemMetricData.java b/data/publisher/src/main/java/tech/pegasys/teku/data/publisher/SystemMetricData.java index 67e3d23e3c9..63717c91a00 100644 --- a/data/publisher/src/main/java/tech/pegasys/teku/data/publisher/SystemMetricData.java +++ b/data/publisher/src/main/java/tech/pegasys/teku/data/publisher/SystemMetricData.java @@ -83,7 +83,7 @@ public class SystemMetricData extends BaseMetricData { @JsonProperty("misc_os") private final String miscOs = getNormalizedOSVersion(); - public SystemMetricData(long timestamp, final File beaconNodeDirectory) { + public SystemMetricData(final long timestamp, final File beaconNodeDirectory) { super(timestamp, SYSTEM.getDisplayName()); SystemInfo systemInfo = new SystemInfo(); diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/exceptions/BadRequestException.java b/data/serializer/src/main/java/tech/pegasys/teku/api/exceptions/BadRequestException.java index ad4e700bcde..2cad2a94646 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/exceptions/BadRequestException.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/exceptions/BadRequestException.java @@ -14,11 +14,11 @@ package tech.pegasys.teku.api.exceptions; public class BadRequestException extends RuntimeException { - public BadRequestException(String message, Throwable cause) { + public BadRequestException(final String message, final Throwable cause) { super(message, cause); } - public BadRequestException(String message) { + public BadRequestException(final String message) { super(message); } } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/exceptions/RemoteServiceNotAvailableException.java b/data/serializer/src/main/java/tech/pegasys/teku/api/exceptions/RemoteServiceNotAvailableException.java index c4bdf033e8b..e8b3f901979 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/exceptions/RemoteServiceNotAvailableException.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/exceptions/RemoteServiceNotAvailableException.java @@ -14,11 +14,11 @@ package tech.pegasys.teku.api.exceptions; public class RemoteServiceNotAvailableException extends RuntimeException { - public RemoteServiceNotAvailableException(String message, Throwable cause) { + public RemoteServiceNotAvailableException(final String message, final Throwable cause) { super(message, cause); } - public RemoteServiceNotAvailableException(String message) { + public RemoteServiceNotAvailableException(final String message) { super(message); } } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/migrated/AllBlocksAtSlotData.java b/data/serializer/src/main/java/tech/pegasys/teku/api/migrated/AllBlocksAtSlotData.java index 57b501a86b8..7a66cbc4dba 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/migrated/AllBlocksAtSlotData.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/migrated/AllBlocksAtSlotData.java @@ -45,7 +45,7 @@ public List getBlocks() { } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/migrated/AttestationRewardsData.java b/data/serializer/src/main/java/tech/pegasys/teku/api/migrated/AttestationRewardsData.java index 4d5cf1a8e85..f9023e0bea5 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/migrated/AttestationRewardsData.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/migrated/AttestationRewardsData.java @@ -22,8 +22,8 @@ public class AttestationRewardsData { final List totalAttestationRewards; public AttestationRewardsData( - List idealAttestationRewards, - List totalAttestationRewards) { + final List idealAttestationRewards, + final List totalAttestationRewards) { this.idealAttestationRewards = idealAttestationRewards; this.totalAttestationRewards = totalAttestationRewards; } @@ -37,7 +37,7 @@ public List getTotalAttestationRewards() { } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/migrated/BlockHeadersResponse.java b/data/serializer/src/main/java/tech/pegasys/teku/api/migrated/BlockHeadersResponse.java index 621dfed6f1c..81c80a99bdd 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/migrated/BlockHeadersResponse.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/migrated/BlockHeadersResponse.java @@ -44,7 +44,7 @@ public List getData() { } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/migrated/GetAttestationRewardsResponse.java b/data/serializer/src/main/java/tech/pegasys/teku/api/migrated/GetAttestationRewardsResponse.java index 15558bea429..6079c151d6d 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/migrated/GetAttestationRewardsResponse.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/migrated/GetAttestationRewardsResponse.java @@ -22,9 +22,9 @@ public class GetAttestationRewardsResponse { private final AttestationRewardsData attestationRewardsData; public GetAttestationRewardsResponse( - boolean executionOptimistic, - boolean finalized, - AttestationRewardsData attestationRewardsData) { + final boolean executionOptimistic, + final boolean finalized, + final AttestationRewardsData attestationRewardsData) { this.executionOptimistic = executionOptimistic; this.finalized = finalized; this.attestationRewardsData = attestationRewardsData; @@ -43,7 +43,7 @@ public AttestationRewardsData getAttestationRewardsData() { } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/migrated/IdealAttestationReward.java b/data/serializer/src/main/java/tech/pegasys/teku/api/migrated/IdealAttestationReward.java index a880ed2cdc1..b3a76308347 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/migrated/IdealAttestationReward.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/migrated/IdealAttestationReward.java @@ -71,7 +71,7 @@ public void addInactivity(final long inactivity) { } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/migrated/StateSyncCommitteesData.java b/data/serializer/src/main/java/tech/pegasys/teku/api/migrated/StateSyncCommitteesData.java index 7b47b7b7cb8..8927d02b3c7 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/migrated/StateSyncCommitteesData.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/migrated/StateSyncCommitteesData.java @@ -37,7 +37,7 @@ public List> getValidatorAggregates() { } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/migrated/StateValidatorBalanceData.java b/data/serializer/src/main/java/tech/pegasys/teku/api/migrated/StateValidatorBalanceData.java index 030641ec626..4b1df8bdf2e 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/migrated/StateValidatorBalanceData.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/migrated/StateValidatorBalanceData.java @@ -59,7 +59,7 @@ public static SerializableTypeDefinition getJsonTypeD } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/migrated/SyncCommitteeRewardData.java b/data/serializer/src/main/java/tech/pegasys/teku/api/migrated/SyncCommitteeRewardData.java index ea33c230e75..13bc1ea5d22 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/migrated/SyncCommitteeRewardData.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/migrated/SyncCommitteeRewardData.java @@ -53,7 +53,7 @@ public List> getRewardData() { } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/migrated/TotalAttestationReward.java b/data/serializer/src/main/java/tech/pegasys/teku/api/migrated/TotalAttestationReward.java index 744ea6ca4ad..8acaa255bb3 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/migrated/TotalAttestationReward.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/migrated/TotalAttestationReward.java @@ -30,12 +30,12 @@ public class TotalAttestationReward { private final long inactivity; public TotalAttestationReward( - long validatorIndex, - long head, - long target, - long source, - Optional inclusionDelay, - long inactivity) { + final long validatorIndex, + final long head, + final long target, + final long source, + final Optional inclusionDelay, + final long inactivity) { this.validatorIndex = validatorIndex; this.head = head; this.target = target; @@ -44,7 +44,8 @@ public TotalAttestationReward( this.inactivity = inactivity; } - public TotalAttestationReward(long validatorIndex, final RewardAndPenalty rewardAndPenalty) { + public TotalAttestationReward( + final long validatorIndex, final RewardAndPenalty rewardAndPenalty) { this.validatorIndex = validatorIndex; final DetailedRewardAndPenalty detailedRewardAndPenalty = @@ -97,7 +98,7 @@ public long getInactivity() { } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/EventType.java b/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/EventType.java index d32ffbc279d..95e42fff52f 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/EventType.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/EventType.java @@ -32,7 +32,7 @@ public enum EventType { payload_attributes, block_gossip; - public static List getTopics(List topics) { + public static List getTopics(final List topics) { return topics.stream().map(EventType::valueOf).toList(); } } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/SyncStateChangeEvent.java b/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/SyncStateChangeEvent.java index 07c2d9ec5b9..8459695fc66 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/SyncStateChangeEvent.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/SyncStateChangeEvent.java @@ -28,7 +28,7 @@ public SyncStateChangeEvent(@JsonProperty("sync_state") final String sync_state) } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/beacon/EpochCommitteeResponse.java b/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/beacon/EpochCommitteeResponse.java index da7f88608b6..86cc0617ec4 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/beacon/EpochCommitteeResponse.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/beacon/EpochCommitteeResponse.java @@ -41,7 +41,7 @@ public class EpochCommitteeResponse { @ArraySchema(schema = @Schema(type = "string", example = EXAMPLE_UINT64)) public final List validators; - public EpochCommitteeResponse(CommitteeAssignment committeeAssignment) { + public EpochCommitteeResponse(final CommitteeAssignment committeeAssignment) { this.slot = committeeAssignment.getSlot(); this.index = committeeAssignment.getCommitteeIndex(); this.validators = UInt64Util.intToUInt64List(committeeAssignment.getCommittee()); @@ -58,7 +58,7 @@ public EpochCommitteeResponse( } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/beacon/FinalityCheckpointsResponse.java b/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/beacon/FinalityCheckpointsResponse.java index 9d053c5653c..5bcc7f6e168 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/beacon/FinalityCheckpointsResponse.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/beacon/FinalityCheckpointsResponse.java @@ -34,15 +34,15 @@ public class FinalityCheckpointsResponse { @JsonCreator public FinalityCheckpointsResponse( - @JsonProperty("previous_justified") Checkpoint previous_justified, - @JsonProperty("current_justified") Checkpoint current_justified, - @JsonProperty("finalized") Checkpoint finalized) { + final @JsonProperty("previous_justified") Checkpoint previous_justified, + final @JsonProperty("current_justified") Checkpoint current_justified, + final @JsonProperty("finalized") Checkpoint finalized) { this.previous_justified = previous_justified; this.current_justified = current_justified; this.finalized = finalized; } - public static FinalityCheckpointsResponse fromState(BeaconState state) { + public static FinalityCheckpointsResponse fromState(final BeaconState state) { if (state.getFinalizedCheckpoint().getEpoch().equals(UInt64.ZERO)) { return new FinalityCheckpointsResponse(Checkpoint.EMPTY, Checkpoint.EMPTY, Checkpoint.EMPTY); } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/beacon/ValidatorBalanceResponse.java b/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/beacon/ValidatorBalanceResponse.java index b0e517b3916..b34114fee6a 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/beacon/ValidatorBalanceResponse.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/beacon/ValidatorBalanceResponse.java @@ -56,7 +56,7 @@ public static Optional fromState( } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/node/Meta.java b/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/node/Meta.java index 85aca0cf67c..387f5e61cbd 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/node/Meta.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/node/Meta.java @@ -36,7 +36,7 @@ public String toString() { } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/node/PeersResponse.java b/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/node/PeersResponse.java index 4f22fd47360..b2986458097 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/node/PeersResponse.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/node/PeersResponse.java @@ -30,7 +30,7 @@ public PeersResponse( } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/teku/Eth1VotingSummarySchema.java b/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/teku/Eth1VotingSummarySchema.java index 07c11825c91..9427e7c245b 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/teku/Eth1VotingSummarySchema.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/teku/Eth1VotingSummarySchema.java @@ -41,11 +41,11 @@ public class Eth1VotingSummarySchema { @JsonCreator public Eth1VotingSummarySchema( - @JsonProperty("state_eth1_data") Eth1Data stateEth1Data, - @JsonProperty("eth1_data_votes") List eth1DataVotes, - @JsonProperty("votes_required") UInt64 votesRequired, - @JsonProperty("voting_period_slots") UInt64 votingPeriodSlots, - @JsonProperty("voting_period_slots_left") UInt64 votingPeriodSlotsLeft) { + final @JsonProperty("state_eth1_data") Eth1Data stateEth1Data, + final @JsonProperty("eth1_data_votes") List eth1DataVotes, + final @JsonProperty("votes_required") UInt64 votesRequired, + final @JsonProperty("voting_period_slots") UInt64 votingPeriodSlots, + final @JsonProperty("voting_period_slots_left") UInt64 votingPeriodSlotsLeft) { this.stateEth1Data = stateEth1Data; this.eth1DataVotes = eth1DataVotes; this.votesRequired = votesRequired; diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/teku/GetDepositsResponse.java b/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/teku/GetDepositsResponse.java index fc5004758b5..24ecfd73609 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/teku/GetDepositsResponse.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/teku/GetDepositsResponse.java @@ -27,7 +27,7 @@ public GetDepositsResponse(@JsonProperty("data") final List da } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/teku/PeerScore.java b/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/teku/PeerScore.java index c48be8c29c2..934f15b3bfb 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/teku/PeerScore.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/response/v1/teku/PeerScore.java @@ -48,7 +48,7 @@ public PeerScore( } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/AggregateAndProof.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/AggregateAndProof.java index 62c89634952..a1478a52b44 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/AggregateAndProof.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/AggregateAndProof.java @@ -44,7 +44,7 @@ public AggregateAndProof( } public AggregateAndProof( - tech.pegasys.teku.spec.datastructures.operations.AggregateAndProof aggregateAndProof) { + final tech.pegasys.teku.spec.datastructures.operations.AggregateAndProof aggregateAndProof) { aggregator_index = aggregateAndProof.getIndex(); aggregate = new Attestation(aggregateAndProof.getAggregate()); selection_proof = new BLSSignature(aggregateAndProof.getSelectionProof()); diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/Attestation.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/Attestation.java index f5f85d1666d..a53b4225035 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/Attestation.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/Attestation.java @@ -35,7 +35,8 @@ public class Attestation { @Schema(type = "string", format = "byte", description = DESCRIPTION_BYTES96) public final BLSSignature signature; - public Attestation(tech.pegasys.teku.spec.datastructures.operations.Attestation attestation) { + public Attestation( + final tech.pegasys.teku.spec.datastructures.operations.Attestation attestation) { this.aggregation_bits = attestation.getAggregationBits().sszSerialize(); this.data = new AttestationData(attestation.getData()); this.signature = new BLSSignature(attestation.getAggregateSignature()); @@ -67,7 +68,7 @@ public tech.pegasys.teku.spec.datastructures.operations.Attestation asInternalAt } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/AttestationData.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/AttestationData.java index e5e79a382fe..2bf78f192e5 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/AttestationData.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/AttestationData.java @@ -50,7 +50,8 @@ public AttestationData( this.target = target; } - public AttestationData(tech.pegasys.teku.spec.datastructures.operations.AttestationData data) { + public AttestationData( + final tech.pegasys.teku.spec.datastructures.operations.AttestationData data) { this.slot = data.getSlot(); this.index = data.getIndex(); this.beacon_block_root = data.getBeaconBlockRoot(); @@ -68,7 +69,7 @@ public AttestationData(tech.pegasys.teku.spec.datastructures.operations.Attestat } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/AttesterSlashing.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/AttesterSlashing.java index 69e7a9cb208..cf768cdd840 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/AttesterSlashing.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/AttesterSlashing.java @@ -26,7 +26,7 @@ public class AttesterSlashing { public final IndexedAttestation attestation_2; public AttesterSlashing( - tech.pegasys.teku.spec.datastructures.operations.AttesterSlashing attesterSlashing) { + final tech.pegasys.teku.spec.datastructures.operations.AttesterSlashing attesterSlashing) { this.attestation_1 = new IndexedAttestation(attesterSlashing.getAttestation1()); this.attestation_2 = new IndexedAttestation(attesterSlashing.getAttestation2()); } @@ -54,7 +54,7 @@ public AttesterSlashing( } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/BLSPubKey.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/BLSPubKey.java index 081cf0fd049..e054d7b0f5a 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/BLSPubKey.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/BLSPubKey.java @@ -27,7 +27,7 @@ public class BLSPubKey { private final Bytes bytes; - public BLSPubKey(Bytes bytes) { + public BLSPubKey(final Bytes bytes) { checkArgument( bytes.size() == SIZE, "Bytes%s should be %s bytes, but was %s bytes.", @@ -37,7 +37,7 @@ public BLSPubKey(Bytes bytes) { this.bytes = bytes; } - public BLSPubKey(BLSPublicKey publicKey) { + public BLSPubKey(final BLSPublicKey publicKey) { this(publicKey.toSSZBytes()); } @@ -63,7 +63,7 @@ public String toString() { return bytes.toString(); } - public static BLSPubKey fromHexString(String value) { + public static BLSPubKey fromHexString(final String value) { try { return new BLSPubKey(BLSPublicKey.fromBytesCompressedValidate(Bytes48.fromHexString(value))); } catch (IllegalArgumentException e) { diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/BLSSignature.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/BLSSignature.java index 0f70a1fe1b6..43c73d4c897 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/BLSSignature.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/BLSSignature.java @@ -25,7 +25,7 @@ public class BLSSignature { private final Bytes bytes; - public BLSSignature(Bytes bytes) { + public BLSSignature(final Bytes bytes) { checkArgument( bytes.size() == SIZE, "Bytes%s should be %s bytes, but was %s bytes.", @@ -35,7 +35,7 @@ public BLSSignature(Bytes bytes) { this.bytes = bytes; } - public BLSSignature(tech.pegasys.teku.bls.BLSSignature signature) { + public BLSSignature(final tech.pegasys.teku.bls.BLSSignature signature) { this(signature.toBytesCompressed()); } @@ -61,7 +61,7 @@ public String toString() { return bytes.toString(); } - public static BLSSignature fromHexString(String value) { + public static BLSSignature fromHexString(final String value) { return new BLSSignature(Bytes.fromHexString(value)); } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/BeaconBlock.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/BeaconBlock.java index 863d59d0a4d..0d81b1ed0f4 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/BeaconBlock.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/BeaconBlock.java @@ -47,7 +47,7 @@ public BeaconBlockBody getBody() { return body; } - protected BeaconBlock(tech.pegasys.teku.spec.datastructures.blocks.BeaconBlock message) { + protected BeaconBlock(final tech.pegasys.teku.spec.datastructures.blocks.BeaconBlock message) { this.slot = message.getSlot(); this.proposer_index = message.getProposerIndex(); this.parent_root = message.getParentRoot(); @@ -86,7 +86,7 @@ public tech.pegasys.teku.spec.datastructures.blocks.BeaconBlock asInternalBeacon } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/BeaconBlockBody.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/BeaconBlockBody.java index 47c37027290..b5272c33d49 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/BeaconBlockBody.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/BeaconBlockBody.java @@ -66,7 +66,7 @@ public BeaconBlockBody( } public BeaconBlockBody( - tech.pegasys.teku.spec.datastructures.blocks.blockbody.BeaconBlockBody body) { + final tech.pegasys.teku.spec.datastructures.blocks.blockbody.BeaconBlockBody body) { this.randao_reveal = new BLSSignature(body.getRandaoReveal().toSSZBytes()); this.eth1_data = new Eth1Data(body.getEth1Data()); this.graffiti = body.getGraffiti(); @@ -137,7 +137,7 @@ public BeaconBlockBodySchema getBeaconBlockBodySchema(final SpecVersion spec) } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/Checkpoint.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/Checkpoint.java index 96e663d3fc6..3b5a2fbcb0e 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/Checkpoint.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/Checkpoint.java @@ -32,7 +32,7 @@ public class Checkpoint { @Schema(type = "string", format = "byte", description = DESCRIPTION_BYTES32) public final Bytes32 root; - public Checkpoint(tech.pegasys.teku.spec.datastructures.state.Checkpoint checkpoint) { + public Checkpoint(final tech.pegasys.teku.spec.datastructures.state.Checkpoint checkpoint) { this.epoch = checkpoint.getEpoch(); this.root = checkpoint.getRoot(); } @@ -49,7 +49,7 @@ public tech.pegasys.teku.spec.datastructures.state.Checkpoint asInternalCheckpoi } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/Committee.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/Committee.java index a2584258ff5..edf21696b2f 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/Committee.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/Committee.java @@ -29,7 +29,7 @@ public class Committee { public final List committee; - public Committee(CommitteeAssignment committeeAssignment) { + public Committee(final CommitteeAssignment committeeAssignment) { this.slot = committeeAssignment.getSlot(); this.index = committeeAssignment.getCommitteeIndex(); this.committee = committeeAssignment.getCommittee(); diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/Deposit.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/Deposit.java index fa90311f884..8dc0d6cf26b 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/Deposit.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/Deposit.java @@ -30,7 +30,7 @@ public class Deposit { public final DepositData data; - public Deposit(tech.pegasys.teku.spec.datastructures.operations.Deposit deposit) { + public Deposit(final tech.pegasys.teku.spec.datastructures.operations.Deposit deposit) { this.proof = deposit.getProof().streamUnboxed().toList(); this.data = new DepositData(deposit.getData()); } @@ -52,7 +52,7 @@ public tech.pegasys.teku.spec.datastructures.operations.Deposit asInternalDeposi } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/DepositData.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/DepositData.java index b2157099834..5cf7027215b 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/DepositData.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/DepositData.java @@ -38,7 +38,8 @@ public class DepositData { @Schema(type = "string", format = "byte", description = DESCRIPTION_BYTES96) public final BLSSignature signature; - public DepositData(tech.pegasys.teku.spec.datastructures.operations.DepositData depositData) { + public DepositData( + final tech.pegasys.teku.spec.datastructures.operations.DepositData depositData) { this.pubkey = new BLSPubKey(depositData.getPubkey().toSSZBytes()); this.withdrawal_credentials = depositData.getWithdrawalCredentials(); this.amount = depositData.getAmount(); @@ -65,7 +66,7 @@ public tech.pegasys.teku.spec.datastructures.operations.DepositData asInternalDe } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/Eth1Data.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/Eth1Data.java index 0fbe6198bf4..5e4536b83a3 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/Eth1Data.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/Eth1Data.java @@ -55,7 +55,7 @@ public tech.pegasys.teku.spec.datastructures.blocks.Eth1Data asInternalEth1Data( } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/IndexedAttestation.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/IndexedAttestation.java index 575ede2072b..249fdf04083 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/IndexedAttestation.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/IndexedAttestation.java @@ -37,7 +37,8 @@ public class IndexedAttestation { public final BLSSignature signature; public IndexedAttestation( - tech.pegasys.teku.spec.datastructures.operations.IndexedAttestation indexedAttestation) { + final tech.pegasys.teku.spec.datastructures.operations.IndexedAttestation + indexedAttestation) { this.attesting_indices = indexedAttestation.getAttestingIndices().streamUnboxed().toList(); this.data = new AttestationData(indexedAttestation.getData()); this.signature = new BLSSignature(indexedAttestation.getSignature()); @@ -69,7 +70,7 @@ public IndexedAttestation( } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/PendingAttestation.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/PendingAttestation.java index fb7aa7e1f2e..e96a1c45c7f 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/PendingAttestation.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/PendingAttestation.java @@ -66,7 +66,7 @@ public PendingAttestation( } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/ProposerSlashing.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/ProposerSlashing.java index a490e0aa0ef..7ee8dc06c23 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/ProposerSlashing.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/ProposerSlashing.java @@ -23,7 +23,7 @@ public class ProposerSlashing { public final SignedBeaconBlockHeader signed_header_2; public ProposerSlashing( - tech.pegasys.teku.spec.datastructures.operations.ProposerSlashing proposerSlashing) { + final tech.pegasys.teku.spec.datastructures.operations.ProposerSlashing proposerSlashing) { signed_header_1 = new SignedBeaconBlockHeader(proposerSlashing.getHeader1()); signed_header_2 = new SignedBeaconBlockHeader(proposerSlashing.getHeader2()); } @@ -44,7 +44,7 @@ public ProposerSlashing( } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/PublicKeyException.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/PublicKeyException.java index d8c46566152..e6fc1ee6da4 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/PublicKeyException.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/PublicKeyException.java @@ -15,11 +15,11 @@ public class PublicKeyException extends RuntimeException { - public PublicKeyException(String message, Throwable cause) { + public PublicKeyException(final String message, final Throwable cause) { super(message, cause); } - public PublicKeyException(String err) { + public PublicKeyException(final String err) { super(err); } } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/Root.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/Root.java index b2c14d91784..e66f00027a8 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/Root.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/Root.java @@ -31,7 +31,7 @@ public Root(@JsonProperty("root") final Bytes32 root) { } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/SignedBeaconBlock.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/SignedBeaconBlock.java index dcd5ac7c59f..d88ff3a8b2b 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/SignedBeaconBlock.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/SignedBeaconBlock.java @@ -46,7 +46,7 @@ public BeaconBlock getMessage() { } protected SignedBeaconBlock( - tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock internalBlock) { + final tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock internalBlock) { this.signature = new BLSSignature(internalBlock.getSignature()); this.message = new BeaconBlock(internalBlock.getMessage()); } @@ -60,7 +60,7 @@ public SignedBeaconBlock( } public static SignedBeaconBlock create( - tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock internalBlock) { + final tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock internalBlock) { tech.pegasys.teku.spec.datastructures.blocks.blockbody.BeaconBlockBody beaconBlock = internalBlock.getMessage().getBody(); @@ -113,7 +113,7 @@ public tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock asInternal } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/SignedBeaconBlockHeader.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/SignedBeaconBlockHeader.java index e49ba7c58e5..a29572e2e16 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/SignedBeaconBlockHeader.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/SignedBeaconBlockHeader.java @@ -28,7 +28,7 @@ public class SignedBeaconBlockHeader { public final BLSSignature signature; public SignedBeaconBlockHeader( - tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlockHeader signedHeader) { + final tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlockHeader signedHeader) { this.message = new BeaconBlockHeader(signedHeader.getMessage()); this.signature = new BLSSignature(signedHeader.getSignature()); } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/SignedVoluntaryExit.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/SignedVoluntaryExit.java index 8844950222b..89f1ab3757b 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/SignedVoluntaryExit.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/SignedVoluntaryExit.java @@ -26,7 +26,8 @@ public class SignedVoluntaryExit { public final BLSSignature signature; public SignedVoluntaryExit( - tech.pegasys.teku.spec.datastructures.operations.SignedVoluntaryExit signedVoluntaryExit) { + final tech.pegasys.teku.spec.datastructures.operations.SignedVoluntaryExit + signedVoluntaryExit) { this.signature = new BLSSignature(signedVoluntaryExit.getSignature()); this.message = new VoluntaryExit(signedVoluntaryExit.getMessage()); } @@ -52,7 +53,7 @@ public SignedVoluntaryExit( } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/VoluntaryExit.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/VoluntaryExit.java index 1f0d9ff61e1..c3835fad2d5 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/VoluntaryExit.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/VoluntaryExit.java @@ -28,7 +28,7 @@ public class VoluntaryExit { public final UInt64 validator_index; public VoluntaryExit( - tech.pegasys.teku.spec.datastructures.operations.VoluntaryExit voluntaryExit) { + final tech.pegasys.teku.spec.datastructures.operations.VoluntaryExit voluntaryExit) { this.epoch = voluntaryExit.getEpoch(); this.validator_index = voluntaryExit.getValidatorIndex(); } @@ -47,7 +47,7 @@ public tech.pegasys.teku.spec.datastructures.operations.VoluntaryExit asInternal } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/altair/BeaconBlockAltair.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/altair/BeaconBlockAltair.java index 575a6f17dc4..f7b5c30fa5f 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/altair/BeaconBlockAltair.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/altair/BeaconBlockAltair.java @@ -26,7 +26,7 @@ @SuppressWarnings("JavaCase") public class BeaconBlockAltair extends BeaconBlock implements UnsignedBlock { - public BeaconBlockAltair(tech.pegasys.teku.spec.datastructures.blocks.BeaconBlock message) { + public BeaconBlockAltair(final tech.pegasys.teku.spec.datastructures.blocks.BeaconBlock message) { super( message.getSlot(), message.getProposerIndex(), diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/altair/BeaconStateAltair.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/altair/BeaconStateAltair.java index 9bee03ac534..dc4081977fd 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/altair/BeaconStateAltair.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/altair/BeaconStateAltair.java @@ -137,9 +137,9 @@ protected void applyAdditionalFields( } public static void applyAltairFields( - MutableBeaconStateAltair state, - SyncCommitteeSchema syncCommitteeSchema, - BeaconStateAltair instance) { + final MutableBeaconStateAltair state, + final SyncCommitteeSchema syncCommitteeSchema, + final BeaconStateAltair instance) { final SszList previousEpochParticipation = state .getPreviousEpochParticipation() diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/altair/ContributionAndProof.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/altair/ContributionAndProof.java index 74d4281b248..befcfba67e3 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/altair/ContributionAndProof.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/altair/ContributionAndProof.java @@ -45,7 +45,7 @@ public ContributionAndProof( } public ContributionAndProof( - tech.pegasys.teku.spec.datastructures.operations.versions.altair.ContributionAndProof + final tech.pegasys.teku.spec.datastructures.operations.versions.altair.ContributionAndProof contributionAndProof) { this( contributionAndProof.getAggregatorIndex(), diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/altair/SignedBeaconBlockAltair.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/altair/SignedBeaconBlockAltair.java index c6d44574220..2a942b55a18 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/altair/SignedBeaconBlockAltair.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/altair/SignedBeaconBlockAltair.java @@ -23,7 +23,7 @@ public class SignedBeaconBlockAltair extends SignedBeaconBlock implements Signed private final BeaconBlockAltair message; public SignedBeaconBlockAltair( - tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock internalBlock) { + final tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock internalBlock) { super(internalBlock); this.message = new BeaconBlockAltair(internalBlock.getMessage()); } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/altair/SyncCommittee.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/altair/SyncCommittee.java index c0cd0e4603c..848f44e3861 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/altair/SyncCommittee.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/altair/SyncCommittee.java @@ -60,7 +60,7 @@ public tech.pegasys.teku.spec.datastructures.state.SyncCommittee asInternalSyncC } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/BeaconBlockBellatrix.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/BeaconBlockBellatrix.java index 95878930d23..9c0a27165a3 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/BeaconBlockBellatrix.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/BeaconBlockBellatrix.java @@ -25,7 +25,7 @@ public class BeaconBlockBellatrix extends BeaconBlockAltair { - public BeaconBlockBellatrix(BeaconBlock message) { + public BeaconBlockBellatrix(final BeaconBlock message) { super( message.getSlot(), message.getProposerIndex(), @@ -35,7 +35,7 @@ public BeaconBlockBellatrix(BeaconBlock message) { } @Override - public BeaconBlock asInternalBeaconBlock(Spec spec) { + public BeaconBlock asInternalBeaconBlock(final Spec spec) { final SpecVersion specVersion = spec.atSlot(slot); return SchemaDefinitionsBellatrix.required(specVersion.getSchemaDefinitions()) .getBeaconBlockSchema() diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/BeaconBlockBodyBellatrix.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/BeaconBlockBodyBellatrix.java index 51ce5da3c95..376850fd7bb 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/BeaconBlockBodyBellatrix.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/BeaconBlockBodyBellatrix.java @@ -66,7 +66,7 @@ public BeaconBlockBodyBellatrix( } public BeaconBlockBodyBellatrix( - tech.pegasys.teku.spec.datastructures.blocks.blockbody.versions.bellatrix + final tech.pegasys.teku.spec.datastructures.blocks.blockbody.versions.bellatrix .BeaconBlockBodyBellatrix message) { super(message); diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/BeaconPreparableProposer.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/BeaconPreparableProposer.java index becf4aecc0c..087ca3fd09e 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/BeaconPreparableProposer.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/BeaconPreparableProposer.java @@ -40,8 +40,8 @@ public class BeaconPreparableProposer { @JsonCreator public BeaconPreparableProposer( - @JsonProperty("validator_index") UInt64 validator_index, - @JsonProperty("fee_recipient") Eth1Address fee_recipient) { + final @JsonProperty("validator_index") UInt64 validator_index, + final @JsonProperty("fee_recipient") Eth1Address fee_recipient) { this.validator_index = validator_index; this.fee_recipient = fee_recipient; } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/BeaconStateBellatrix.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/BeaconStateBellatrix.java index c38c9d5017e..eb09c3df862 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/BeaconStateBellatrix.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/BeaconStateBellatrix.java @@ -97,7 +97,8 @@ public BeaconStateBellatrix( } @Override - protected void applyAdditionalFields(MutableBeaconState state, final SpecVersion specVersion) { + protected void applyAdditionalFields( + final MutableBeaconState state, final SpecVersion specVersion) { state .toMutableVersionBellatrix() .ifPresent( @@ -112,10 +113,10 @@ protected void applyAdditionalFields(MutableBeaconState state, final SpecVersion } public static void applyBellatrixFields( - MutableBeaconStateBellatrix state, - SyncCommitteeSchema syncCommitteeSchema, - ExecutionPayloadHeaderSchemaBellatrix executionPayloadHeaderSchema, - BeaconStateBellatrix instance) { + final MutableBeaconStateBellatrix state, + final SyncCommitteeSchema syncCommitteeSchema, + final ExecutionPayloadHeaderSchemaBellatrix executionPayloadHeaderSchema, + final BeaconStateBellatrix instance) { BeaconStateAltair.applyAltairFields(state, syncCommitteeSchema, instance); state.setLatestExecutionPayloadHeader( @@ -123,7 +124,7 @@ public static void applyBellatrixFields( executionPayloadHeaderSchema)); } - public BeaconStateBellatrix(BeaconState beaconState) { + public BeaconStateBellatrix(final BeaconState beaconState) { super(beaconState); final tech.pegasys.teku.spec.datastructures.state.beaconstate.versions.bellatrix .BeaconStateBellatrix @@ -133,7 +134,7 @@ public BeaconStateBellatrix(BeaconState beaconState) { } @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (this == o) { return true; } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/BlindedBlockBellatrix.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/BlindedBlockBellatrix.java index 62ff9050160..dbe25c9e573 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/BlindedBlockBellatrix.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/BlindedBlockBellatrix.java @@ -25,7 +25,7 @@ public class BlindedBlockBellatrix extends BeaconBlockAltair { - public BlindedBlockBellatrix(BeaconBlock message) { + public BlindedBlockBellatrix(final BeaconBlock message) { super( message.getSlot(), message.getProposerIndex(), @@ -41,7 +41,7 @@ public BeaconBlockSchema getBeaconBlockSchema(final SpecVersion spec) { } @Override - public BeaconBlock asInternalBeaconBlock(Spec spec) { + public BeaconBlock asInternalBeaconBlock(final Spec spec) { final SpecVersion specVersion = spec.atSlot(slot); return getBeaconBlockSchema(specVersion) .create( diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/ExecutionPayloadBellatrix.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/ExecutionPayloadBellatrix.java index c1ede836076..c28e1bf3279 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/ExecutionPayloadBellatrix.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/ExecutionPayloadBellatrix.java @@ -42,20 +42,20 @@ public class ExecutionPayloadBellatrix extends ExecutionPayloadCommon implements @JsonCreator public ExecutionPayloadBellatrix( - @JsonProperty("parent_hash") Bytes32 parentHash, - @JsonProperty("fee_recipient") Bytes20 feeRecipient, - @JsonProperty("state_root") Bytes32 stateRoot, - @JsonProperty("receipts_root") Bytes32 receiptsRoot, - @JsonProperty("logs_bloom") Bytes logsBloom, - @JsonProperty("prev_randao") Bytes32 prevRandao, - @JsonProperty("block_number") UInt64 blockNumber, - @JsonProperty("gas_limit") UInt64 gasLimit, - @JsonProperty("gas_used") UInt64 gasUsed, - @JsonProperty("timestamp") UInt64 timestamp, - @JsonProperty("extra_data") Bytes extraData, - @JsonProperty("base_fee_per_gas") UInt256 baseFeePerGas, - @JsonProperty("block_hash") Bytes32 blockHash, - @JsonProperty("transactions") List transactions) { + final @JsonProperty("parent_hash") Bytes32 parentHash, + final @JsonProperty("fee_recipient") Bytes20 feeRecipient, + final @JsonProperty("state_root") Bytes32 stateRoot, + final @JsonProperty("receipts_root") Bytes32 receiptsRoot, + final @JsonProperty("logs_bloom") Bytes logsBloom, + final @JsonProperty("prev_randao") Bytes32 prevRandao, + final @JsonProperty("block_number") UInt64 blockNumber, + final @JsonProperty("gas_limit") UInt64 gasLimit, + final @JsonProperty("gas_used") UInt64 gasUsed, + final @JsonProperty("timestamp") UInt64 timestamp, + final @JsonProperty("extra_data") Bytes extraData, + final @JsonProperty("base_fee_per_gas") UInt256 baseFeePerGas, + final @JsonProperty("block_hash") Bytes32 blockHash, + final @JsonProperty("transactions") List transactions) { super( parentHash, feeRecipient, @@ -74,7 +74,7 @@ public ExecutionPayloadBellatrix( } public ExecutionPayloadBellatrix( - tech.pegasys.teku.spec.datastructures.execution.ExecutionPayload executionPayload) { + final tech.pegasys.teku.spec.datastructures.execution.ExecutionPayload executionPayload) { super( executionPayload.getParentHash(), executionPayload.getFeeRecipient(), diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/ExecutionPayloadCommon.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/ExecutionPayloadCommon.java index 809434f8aa5..8ba86de11b9 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/ExecutionPayloadCommon.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/ExecutionPayloadCommon.java @@ -106,19 +106,19 @@ public abstract class ExecutionPayloadCommon { public final Bytes32 blockHash; public ExecutionPayloadCommon( - @JsonProperty("parent_hash") Bytes32 parentHash, - @JsonProperty("fee_recipient") Bytes20 feeRecipient, - @JsonProperty("state_root") Bytes32 stateRoot, - @JsonProperty("receipts_root") Bytes32 receiptsRoot, - @JsonProperty("logs_bloom") Bytes logsBloom, - @JsonProperty("prev_randao") Bytes32 prevRandao, - @JsonProperty("block_number") UInt64 blockNumber, - @JsonProperty("gas_limit") UInt64 gasLimit, - @JsonProperty("gas_used") UInt64 gasUsed, - @JsonProperty("timestamp") UInt64 timestamp, - @JsonProperty("extra_data") Bytes extraData, - @JsonProperty("base_fee_per_gas") UInt256 baseFeePerGas, - @JsonProperty("block_hash") Bytes32 blockHash) { + final @JsonProperty("parent_hash") Bytes32 parentHash, + final @JsonProperty("fee_recipient") Bytes20 feeRecipient, + final @JsonProperty("state_root") Bytes32 stateRoot, + final @JsonProperty("receipts_root") Bytes32 receiptsRoot, + final @JsonProperty("logs_bloom") Bytes logsBloom, + final @JsonProperty("prev_randao") Bytes32 prevRandao, + final @JsonProperty("block_number") UInt64 blockNumber, + final @JsonProperty("gas_limit") UInt64 gasLimit, + final @JsonProperty("gas_used") UInt64 gasUsed, + final @JsonProperty("timestamp") UInt64 timestamp, + final @JsonProperty("extra_data") Bytes extraData, + final @JsonProperty("base_fee_per_gas") UInt256 baseFeePerGas, + final @JsonProperty("block_hash") Bytes32 blockHash) { this.parentHash = parentHash; this.feeRecipient = feeRecipient; this.stateRoot = stateRoot; diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/ExecutionPayloadHeaderBellatrix.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/ExecutionPayloadHeaderBellatrix.java index 28e2539cd4d..57d3a134b5c 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/ExecutionPayloadHeaderBellatrix.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/ExecutionPayloadHeaderBellatrix.java @@ -39,20 +39,20 @@ public class ExecutionPayloadHeaderBellatrix extends ExecutionPayloadCommon @JsonCreator public ExecutionPayloadHeaderBellatrix( - @JsonProperty("parent_hash") Bytes32 parentHash, - @JsonProperty("fee_recipient") Bytes20 feeRecipient, - @JsonProperty("state_root") Bytes32 stateRoot, - @JsonProperty("receipts_root") Bytes32 receiptsRoot, - @JsonProperty("logs_bloom") Bytes logsBloom, - @JsonProperty("prev_randao") Bytes32 prevRandao, - @JsonProperty("block_number") UInt64 blockNumber, - @JsonProperty("gas_limit") UInt64 gasLimit, - @JsonProperty("gas_used") UInt64 gasUsed, - @JsonProperty("timestamp") UInt64 timestamp, - @JsonProperty("extra_data") Bytes extraData, - @JsonProperty("base_fee_per_gas") UInt256 baseFeePerGas, - @JsonProperty("block_hash") Bytes32 blockHash, - @JsonProperty("transactions_root") Bytes32 transactionsRoot) { + final @JsonProperty("parent_hash") Bytes32 parentHash, + final @JsonProperty("fee_recipient") Bytes20 feeRecipient, + final @JsonProperty("state_root") Bytes32 stateRoot, + final @JsonProperty("receipts_root") Bytes32 receiptsRoot, + final @JsonProperty("logs_bloom") Bytes logsBloom, + final @JsonProperty("prev_randao") Bytes32 prevRandao, + final @JsonProperty("block_number") UInt64 blockNumber, + final @JsonProperty("gas_limit") UInt64 gasLimit, + final @JsonProperty("gas_used") UInt64 gasUsed, + final @JsonProperty("timestamp") UInt64 timestamp, + final @JsonProperty("extra_data") Bytes extraData, + final @JsonProperty("base_fee_per_gas") UInt256 baseFeePerGas, + final @JsonProperty("block_hash") Bytes32 blockHash, + final @JsonProperty("transactions_root") Bytes32 transactionsRoot) { super( parentHash, feeRecipient, @@ -71,7 +71,7 @@ public ExecutionPayloadHeaderBellatrix( } public ExecutionPayloadHeaderBellatrix( - tech.pegasys.teku.spec.datastructures.execution.ExecutionPayloadHeader + final tech.pegasys.teku.spec.datastructures.execution.ExecutionPayloadHeader executionPayloadHeader) { super( executionPayloadHeader.getParentHash(), @@ -90,7 +90,7 @@ public ExecutionPayloadHeaderBellatrix( this.transactionsRoot = executionPayloadHeader.getTransactionsRoot(); } - public ExecutionPayloadHeaderBellatrix(ExecutionPayload executionPayload) { + public ExecutionPayloadHeaderBellatrix(final ExecutionPayload executionPayload) { super( executionPayload.getParentHash(), executionPayload.getFeeRecipient(), diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/SignedBeaconBlockBellatrix.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/SignedBeaconBlockBellatrix.java index dc7565cf4ac..aa9e62cf0e6 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/SignedBeaconBlockBellatrix.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/SignedBeaconBlockBellatrix.java @@ -23,7 +23,7 @@ public class SignedBeaconBlockBellatrix extends SignedBeaconBlock implements Sig private final BeaconBlockBellatrix message; public SignedBeaconBlockBellatrix( - tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock internalBlock) { + final tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock internalBlock) { super(internalBlock); this.message = new BeaconBlockBellatrix(internalBlock.getMessage()); } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/SignedBlindedBeaconBlockBellatrix.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/SignedBlindedBeaconBlockBellatrix.java index 31ca0521407..7e73b03930a 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/SignedBlindedBeaconBlockBellatrix.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/bellatrix/SignedBlindedBeaconBlockBellatrix.java @@ -25,7 +25,7 @@ public class SignedBlindedBeaconBlockBellatrix extends SignedBeaconBlock impleme private final BlindedBlockBellatrix message; public SignedBlindedBeaconBlockBellatrix( - tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock internalBlock) { + final tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock internalBlock) { super(internalBlock); checkArgument( internalBlock.getMessage().getBody().isBlinded(), "requires a signed blinded beacon block"); diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/capella/BeaconBlockBodyCapella.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/capella/BeaconBlockBodyCapella.java index 0345a797e14..810d97ea93f 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/capella/BeaconBlockBodyCapella.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/capella/BeaconBlockBodyCapella.java @@ -73,7 +73,8 @@ public BeaconBlockBodyCapella( } public BeaconBlockBodyCapella( - tech.pegasys.teku.spec.datastructures.blocks.blockbody.versions.capella.BeaconBlockBodyCapella + final tech.pegasys.teku.spec.datastructures.blocks.blockbody.versions.capella + .BeaconBlockBodyCapella message) { super(message); checkNotNull(message.getExecutionPayload(), "Execution Payload is required for capella blocks"); diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/capella/BeaconBlockCapella.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/capella/BeaconBlockCapella.java index 93cd9655d17..e8c87a7d2d3 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/capella/BeaconBlockCapella.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/capella/BeaconBlockCapella.java @@ -25,7 +25,7 @@ public class BeaconBlockCapella extends BeaconBlockAltair { - public BeaconBlockCapella(BeaconBlock message) { + public BeaconBlockCapella(final BeaconBlock message) { super( message.getSlot(), message.getProposerIndex(), @@ -35,7 +35,7 @@ public BeaconBlockCapella(BeaconBlock message) { } @Override - public BeaconBlock asInternalBeaconBlock(Spec spec) { + public BeaconBlock asInternalBeaconBlock(final Spec spec) { final SpecVersion specVersion = spec.atSlot(slot); return SchemaDefinitionsCapella.required(specVersion.getSchemaDefinitions()) .getBeaconBlockSchema() diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/capella/BeaconStateCapella.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/capella/BeaconStateCapella.java index 4a659c338c1..7ac03d83486 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/capella/BeaconStateCapella.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/capella/BeaconStateCapella.java @@ -114,7 +114,7 @@ public BeaconStateCapella( this.historicalSummaries = historicalSummaries; } - public BeaconStateCapella(BeaconState beaconState) { + public BeaconStateCapella(final BeaconState beaconState) { super(beaconState); final tech.pegasys.teku.spec.datastructures.state.beaconstate.versions.capella .BeaconStateCapella @@ -151,13 +151,13 @@ protected void applyAdditionalFields( protected static void applyCapellaFields( final SpecVersion specVersion, - MutableBeaconStateCapella state, - SyncCommitteeSchema syncCommitteeSchema, - ExecutionPayloadHeaderSchemaCapella executionPayloadHeaderSchema, - SszListSchema< + final MutableBeaconStateCapella state, + final SyncCommitteeSchema syncCommitteeSchema, + final ExecutionPayloadHeaderSchemaCapella executionPayloadHeaderSchema, + final SszListSchema< tech.pegasys.teku.spec.datastructures.state.versions.capella.HistoricalSummary, ?> historicalSummariesSchema, - BeaconStateCapella instance) { + final BeaconStateCapella instance) { BeaconStateAltair.applyAltairFields(state, syncCommitteeSchema, instance); diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/capella/BlindedBlockCapella.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/capella/BlindedBlockCapella.java index 9ae1a890771..660a8fd3303 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/capella/BlindedBlockCapella.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/capella/BlindedBlockCapella.java @@ -25,7 +25,7 @@ public class BlindedBlockCapella extends BeaconBlockAltair { - public BlindedBlockCapella(BeaconBlock message) { + public BlindedBlockCapella(final BeaconBlock message) { super( message.getSlot(), message.getProposerIndex(), @@ -41,7 +41,7 @@ public BeaconBlockSchema getBeaconBlockSchema(final SpecVersion spec) { } @Override - public BeaconBlock asInternalBeaconBlock(Spec spec) { + public BeaconBlock asInternalBeaconBlock(final Spec spec) { final SpecVersion specVersion = spec.atSlot(slot); return getBeaconBlockSchema(specVersion) .create( diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/capella/ExecutionPayloadCapella.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/capella/ExecutionPayloadCapella.java index 02966a7b7a4..2eb3d75083c 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/capella/ExecutionPayloadCapella.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/capella/ExecutionPayloadCapella.java @@ -40,21 +40,21 @@ public class ExecutionPayloadCapella extends ExecutionPayloadBellatrix implement @JsonCreator public ExecutionPayloadCapella( - @JsonProperty("parent_hash") Bytes32 parentHash, - @JsonProperty("fee_recipient") Bytes20 feeRecipient, - @JsonProperty("state_root") Bytes32 stateRoot, - @JsonProperty("receipts_root") Bytes32 receiptsRoot, - @JsonProperty("logs_bloom") Bytes logsBloom, - @JsonProperty("prev_randao") Bytes32 prevRandao, - @JsonProperty("block_number") UInt64 blockNumber, - @JsonProperty("gas_limit") UInt64 gasLimit, - @JsonProperty("gas_used") UInt64 gasUsed, - @JsonProperty("timestamp") UInt64 timestamp, - @JsonProperty("extra_data") Bytes extraData, - @JsonProperty("base_fee_per_gas") UInt256 baseFeePerGas, - @JsonProperty("block_hash") Bytes32 blockHash, - @JsonProperty("transactions") List transactions, - @JsonProperty("withdrawals") List withdrawals) { + final @JsonProperty("parent_hash") Bytes32 parentHash, + final @JsonProperty("fee_recipient") Bytes20 feeRecipient, + final @JsonProperty("state_root") Bytes32 stateRoot, + final @JsonProperty("receipts_root") Bytes32 receiptsRoot, + final @JsonProperty("logs_bloom") Bytes logsBloom, + final @JsonProperty("prev_randao") Bytes32 prevRandao, + final @JsonProperty("block_number") UInt64 blockNumber, + final @JsonProperty("gas_limit") UInt64 gasLimit, + final @JsonProperty("gas_used") UInt64 gasUsed, + final @JsonProperty("timestamp") UInt64 timestamp, + final @JsonProperty("extra_data") Bytes extraData, + final @JsonProperty("base_fee_per_gas") UInt256 baseFeePerGas, + final @JsonProperty("block_hash") Bytes32 blockHash, + final @JsonProperty("transactions") List transactions, + final @JsonProperty("withdrawals") List withdrawals) { super( parentHash, feeRecipient, @@ -74,7 +74,7 @@ public ExecutionPayloadCapella( } public ExecutionPayloadCapella( - tech.pegasys.teku.spec.datastructures.execution.ExecutionPayload executionPayload) { + final tech.pegasys.teku.spec.datastructures.execution.ExecutionPayload executionPayload) { super(executionPayload); this.withdrawals = executionPayload.getOptionalWithdrawals().orElseThrow().stream() diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/capella/ExecutionPayloadHeaderCapella.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/capella/ExecutionPayloadHeaderCapella.java index 71ca7d7a628..1c527cfcdef 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/capella/ExecutionPayloadHeaderCapella.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/capella/ExecutionPayloadHeaderCapella.java @@ -37,21 +37,21 @@ public class ExecutionPayloadHeaderCapella extends ExecutionPayloadHeaderBellatr @JsonCreator public ExecutionPayloadHeaderCapella( - @JsonProperty("parent_hash") Bytes32 parentHash, - @JsonProperty("fee_recipient") Bytes20 feeRecipient, - @JsonProperty("state_root") Bytes32 stateRoot, - @JsonProperty("receipts_root") Bytes32 receiptsRoot, - @JsonProperty("logs_bloom") Bytes logsBloom, - @JsonProperty("prev_randao") Bytes32 prevRandao, - @JsonProperty("block_number") UInt64 blockNumber, - @JsonProperty("gas_limit") UInt64 gasLimit, - @JsonProperty("gas_used") UInt64 gasUsed, - @JsonProperty("timestamp") UInt64 timestamp, - @JsonProperty("extra_data") Bytes extraData, - @JsonProperty("base_fee_per_gas") UInt256 baseFeePerGas, - @JsonProperty("block_hash") Bytes32 blockHash, - @JsonProperty("transactions_root") Bytes32 transactionsRoot, - @JsonProperty("withdrawals_root") Bytes32 withdrawalsRoot) { + final @JsonProperty("parent_hash") Bytes32 parentHash, + final @JsonProperty("fee_recipient") Bytes20 feeRecipient, + final @JsonProperty("state_root") Bytes32 stateRoot, + final @JsonProperty("receipts_root") Bytes32 receiptsRoot, + final @JsonProperty("logs_bloom") Bytes logsBloom, + final @JsonProperty("prev_randao") Bytes32 prevRandao, + final @JsonProperty("block_number") UInt64 blockNumber, + final @JsonProperty("gas_limit") UInt64 gasLimit, + final @JsonProperty("gas_used") UInt64 gasUsed, + final @JsonProperty("timestamp") UInt64 timestamp, + final @JsonProperty("extra_data") Bytes extraData, + final @JsonProperty("base_fee_per_gas") UInt256 baseFeePerGas, + final @JsonProperty("block_hash") Bytes32 blockHash, + final @JsonProperty("transactions_root") Bytes32 transactionsRoot, + final @JsonProperty("withdrawals_root") Bytes32 withdrawalsRoot) { super( parentHash, feeRecipient, @@ -70,7 +70,7 @@ public ExecutionPayloadHeaderCapella( this.withdrawalsRoot = withdrawalsRoot; } - public ExecutionPayloadHeaderCapella(ExecutionPayloadHeader executionPayloadHeader) { + public ExecutionPayloadHeaderCapella(final ExecutionPayloadHeader executionPayloadHeader) { super( executionPayloadHeader.getParentHash(), executionPayloadHeader.getFeeRecipient(), diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/capella/SignedBeaconBlockCapella.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/capella/SignedBeaconBlockCapella.java index 561dd77f44b..3a55e9cd157 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/capella/SignedBeaconBlockCapella.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/capella/SignedBeaconBlockCapella.java @@ -23,7 +23,7 @@ public class SignedBeaconBlockCapella extends SignedBeaconBlock implements Signe private final BeaconBlockCapella message; public SignedBeaconBlockCapella( - tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock internalBlock) { + final tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock internalBlock) { super(internalBlock); this.message = new BeaconBlockCapella(internalBlock.getMessage()); } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/capella/SignedBlindedBeaconBlockCapella.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/capella/SignedBlindedBeaconBlockCapella.java index 78f38f447e6..64eb2742a10 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/capella/SignedBlindedBeaconBlockCapella.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/capella/SignedBlindedBeaconBlockCapella.java @@ -25,7 +25,7 @@ public class SignedBlindedBeaconBlockCapella extends SignedBeaconBlock implement private final BlindedBlockCapella message; public SignedBlindedBeaconBlockCapella( - tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock internalBlock) { + final tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock internalBlock) { super(internalBlock); checkArgument( internalBlock.getMessage().getBody().isBlinded(), "requires a signed blinded beacon block"); diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/deneb/BeaconBlockBodyDeneb.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/deneb/BeaconBlockBodyDeneb.java index 3266a849e3c..2e6076acb6f 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/deneb/BeaconBlockBodyDeneb.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/deneb/BeaconBlockBodyDeneb.java @@ -82,7 +82,8 @@ public BeaconBlockBodyDeneb( } public BeaconBlockBodyDeneb( - tech.pegasys.teku.spec.datastructures.blocks.blockbody.versions.deneb.BeaconBlockBodyDeneb + final tech.pegasys.teku.spec.datastructures.blocks.blockbody.versions.deneb + .BeaconBlockBodyDeneb message) { super(message); checkNotNull(message.getExecutionPayload(), "Execution Payload is required for Deneb blocks"); diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/deneb/BeaconStateDeneb.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/deneb/BeaconStateDeneb.java index 35b7629d566..07ec4e04c3f 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/deneb/BeaconStateDeneb.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/deneb/BeaconStateDeneb.java @@ -151,7 +151,7 @@ protected static void applyDenebFields( final MutableBeaconStateDeneb state, final SyncCommitteeSchema syncCommitteeSchema, final ExecutionPayloadHeaderSchemaDeneb executionPayloadHeaderSchema, - SszListSchema< + final SszListSchema< tech.pegasys.teku.spec.datastructures.state.versions.capella.HistoricalSummary, ?> historicalSummariesSchema, final BeaconStateDeneb instance) { diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/electra/BeaconBlockBodyElectra.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/electra/BeaconBlockBodyElectra.java index d0dcadeba81..9926c2b0c98 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/electra/BeaconBlockBodyElectra.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/electra/BeaconBlockBodyElectra.java @@ -82,7 +82,8 @@ public BeaconBlockBodyElectra( } public BeaconBlockBodyElectra( - tech.pegasys.teku.spec.datastructures.blocks.blockbody.versions.electra.BeaconBlockBodyElectra + final tech.pegasys.teku.spec.datastructures.blocks.blockbody.versions.electra + .BeaconBlockBodyElectra message) { super(message); checkNotNull(message.getExecutionPayload(), "Execution Payload is required for Electra blocks"); diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/electra/PendingBalanceDeposit.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/electra/PendingBalanceDeposit.java index b3105b77fe3..4f6a1b4b3bd 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/electra/PendingBalanceDeposit.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/electra/PendingBalanceDeposit.java @@ -29,7 +29,7 @@ public class PendingBalanceDeposit { public final UInt64 amount; public PendingBalanceDeposit( - @JsonProperty("index") int index, @JsonProperty("amount") UInt64 amount) { + final @JsonProperty("index") int index, final @JsonProperty("amount") UInt64 amount) { this.index = index; this.amount = amount; } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/electra/PendingConsolidation.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/electra/PendingConsolidation.java index 820a07c435d..16c0ac39e71 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/electra/PendingConsolidation.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/electra/PendingConsolidation.java @@ -28,8 +28,8 @@ public class PendingConsolidation { public final int targetIndex; PendingConsolidation( - @JsonProperty("source_index") int sourceIndex, - @JsonProperty("target_index") int targetIndex) { + final @JsonProperty("source_index") int sourceIndex, + final @JsonProperty("target_index") int targetIndex) { this.sourceIndex = sourceIndex; this.targetIndex = targetIndex; } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/electra/PendingPartialWithdrawal.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/electra/PendingPartialWithdrawal.java index 716b5c43c7d..ca18e709f9f 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/electra/PendingPartialWithdrawal.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/electra/PendingPartialWithdrawal.java @@ -31,9 +31,9 @@ public class PendingPartialWithdrawal { public final UInt64 withdrawableEpoch; public PendingPartialWithdrawal( - @JsonProperty("index") int index, - @JsonProperty("amount") UInt64 amount, - @JsonProperty("withdrawable_epoch") UInt64 withdrawableEpoch) { + final @JsonProperty("index") int index, + final @JsonProperty("amount") UInt64 amount, + final @JsonProperty("withdrawable_epoch") UInt64 withdrawableEpoch) { this.index = index; this.amount = amount; this.withdrawableEpoch = withdrawableEpoch; diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/phase0/BeaconBlockPhase0.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/phase0/BeaconBlockPhase0.java index 75a93e4a6e4..ccd72331396 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/phase0/BeaconBlockPhase0.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/phase0/BeaconBlockPhase0.java @@ -23,7 +23,7 @@ @SuppressWarnings("JavaCase") public class BeaconBlockPhase0 extends BeaconBlock implements UnsignedBlock { - public BeaconBlockPhase0(tech.pegasys.teku.spec.datastructures.blocks.BeaconBlock message) { + public BeaconBlockPhase0(final tech.pegasys.teku.spec.datastructures.blocks.BeaconBlock message) { super( message.getSlot(), message.getProposerIndex(), diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/phase0/SignedBeaconBlockPhase0.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/phase0/SignedBeaconBlockPhase0.java index a8dcda150ca..8de51e43ef6 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/phase0/SignedBeaconBlockPhase0.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/phase0/SignedBeaconBlockPhase0.java @@ -23,7 +23,7 @@ public class SignedBeaconBlockPhase0 extends SignedBeaconBlock implements SignedBlock { public SignedBeaconBlockPhase0( - tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock internalBlock) { + final tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock internalBlock) { super(internalBlock); } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/provider/BLSPubKeyDeserializer.java b/data/serializer/src/main/java/tech/pegasys/teku/provider/BLSPubKeyDeserializer.java index 06f3216d697..21cddc4ac6a 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/provider/BLSPubKeyDeserializer.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/provider/BLSPubKeyDeserializer.java @@ -22,7 +22,8 @@ public class BLSPubKeyDeserializer extends JsonDeserializer { @Override - public BLSPubKey deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + public BLSPubKey deserialize(final JsonParser p, final DeserializationContext ctxt) + throws IOException { return new BLSPubKey(Bytes.fromHexString(p.getValueAsString())); } } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/provider/BLSPubKeySerializer.java b/data/serializer/src/main/java/tech/pegasys/teku/provider/BLSPubKeySerializer.java index abd2f3b2557..d6329260a65 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/provider/BLSPubKeySerializer.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/provider/BLSPubKeySerializer.java @@ -22,7 +22,8 @@ public class BLSPubKeySerializer extends JsonSerializer { @Override - public void serialize(BLSPubKey value, JsonGenerator gen, SerializerProvider serializers) + public void serialize( + final BLSPubKey value, final JsonGenerator gen, final SerializerProvider serializers) throws IOException { gen.writeString(value.toHexString().toLowerCase(Locale.ROOT)); } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/provider/BLSPublicKeyDeserializer.java b/data/serializer/src/main/java/tech/pegasys/teku/provider/BLSPublicKeyDeserializer.java index d660e907127..f99c5cfc50c 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/provider/BLSPublicKeyDeserializer.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/provider/BLSPublicKeyDeserializer.java @@ -21,7 +21,8 @@ public class BLSPublicKeyDeserializer extends JsonDeserializer { @Override - public BLSPublicKey deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + public BLSPublicKey deserialize(final JsonParser p, final DeserializationContext ctxt) + throws IOException { return BLSPublicKey.fromHexString(p.getValueAsString()); } } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/provider/BLSPublicKeySerializer.java b/data/serializer/src/main/java/tech/pegasys/teku/provider/BLSPublicKeySerializer.java index 8e4e9059fb4..a133ee4fe28 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/provider/BLSPublicKeySerializer.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/provider/BLSPublicKeySerializer.java @@ -22,7 +22,8 @@ public class BLSPublicKeySerializer extends JsonSerializer { @Override - public void serialize(BLSPublicKey value, JsonGenerator gen, SerializerProvider serializers) + public void serialize( + final BLSPublicKey value, final JsonGenerator gen, final SerializerProvider serializers) throws IOException { gen.writeString(value.toHexString().toLowerCase(Locale.ROOT)); } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/provider/BLSSignatureDeserializer.java b/data/serializer/src/main/java/tech/pegasys/teku/provider/BLSSignatureDeserializer.java index 87e97fb0214..1b258b18a9e 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/provider/BLSSignatureDeserializer.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/provider/BLSSignatureDeserializer.java @@ -21,7 +21,8 @@ public class BLSSignatureDeserializer extends JsonDeserializer { @Override - public BLSSignature deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + public BLSSignature deserialize(final JsonParser p, final DeserializationContext ctxt) + throws IOException { return BLSSignature.fromHexString(p.getValueAsString()); } } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/provider/BLSSignatureSerializer.java b/data/serializer/src/main/java/tech/pegasys/teku/provider/BLSSignatureSerializer.java index 478a95eb760..abd376ec189 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/provider/BLSSignatureSerializer.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/provider/BLSSignatureSerializer.java @@ -22,7 +22,8 @@ public class BLSSignatureSerializer extends JsonSerializer { @Override - public void serialize(BLSSignature value, JsonGenerator gen, SerializerProvider serializers) + public void serialize( + final BLSSignature value, final JsonGenerator gen, final SerializerProvider serializers) throws IOException { gen.writeString(value.toHexString().toLowerCase(Locale.ROOT)); } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/provider/JsonProvider.java b/data/serializer/src/main/java/tech/pegasys/teku/provider/JsonProvider.java index 1e320d991dc..6a450aa6ad1 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/provider/JsonProvider.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/provider/JsonProvider.java @@ -117,15 +117,16 @@ public JsonProvider() { addTekuMappers(); } - public String objectToJSON(T object) throws JsonProcessingException { + public String objectToJSON(final T object) throws JsonProcessingException { return objectMapper.writeValueAsString(object); } - public String objectToPrettyJSON(T object) throws JsonProcessingException { + public String objectToPrettyJSON(final T object) throws JsonProcessingException { return objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(object); } - public T jsonToObject(String json, Class clazz) throws JsonProcessingException { + public T jsonToObject(final String json, final Class clazz) + throws JsonProcessingException { return objectMapper.readValue(json, clazz); } diff --git a/data/serializer/src/main/java/tech/pegasys/teku/provider/SszBitvectorSerializer.java b/data/serializer/src/main/java/tech/pegasys/teku/provider/SszBitvectorSerializer.java index 5d948b6e5bb..af7c94eb838 100644 --- a/data/serializer/src/main/java/tech/pegasys/teku/provider/SszBitvectorSerializer.java +++ b/data/serializer/src/main/java/tech/pegasys/teku/provider/SszBitvectorSerializer.java @@ -22,7 +22,8 @@ public class SszBitvectorSerializer extends JsonSerializer { @Override - public void serialize(SszBitvector value, JsonGenerator gen, SerializerProvider serializers) + public void serialize( + final SszBitvector value, final JsonGenerator gen, final SerializerProvider serializers) throws IOException { gen.writeString(value.sszSerialize().toHexString().toLowerCase(Locale.ROOT)); }