From 2d0780055baeba3922e4b00c173c85c43f843b7b Mon Sep 17 00:00:00 2001 From: Matilda Clerke Date: Wed, 25 Sep 2024 16:59:02 +1000 Subject: [PATCH] 7311: spotless Signed-off-by: Matilda Clerke --- .../eth/manager/peertask/PeerTaskExecutor.java | 2 +- .../manager/peertask/DefaultPeerSelectorTest.java | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/manager/peertask/PeerTaskExecutor.java b/ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/manager/peertask/PeerTaskExecutor.java index 894568b8b7..1583398926 100644 --- a/ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/manager/peertask/PeerTaskExecutor.java +++ b/ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/manager/peertask/PeerTaskExecutor.java @@ -134,7 +134,7 @@ public class PeerTaskExecutor { private boolean sleepBetweenRetries() { try { - //sleep for 1 second to match implemented wait between retries in AbstractRetryingPeerTask + // sleep for 1 second to match implemented wait between retries in AbstractRetryingPeerTask Thread.sleep(1000); return true; } catch (InterruptedException e) { diff --git a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/manager/peertask/DefaultPeerSelectorTest.java b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/manager/peertask/DefaultPeerSelectorTest.java index 16d53f474b..8913b80a45 100644 --- a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/manager/peertask/DefaultPeerSelectorTest.java +++ b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/manager/peertask/DefaultPeerSelectorTest.java @@ -60,19 +60,21 @@ public class DefaultPeerSelectorTest { @Test public void testGetPeerButNoPeerMatchesFilter() { EthPeer protocol1With5ReputationPeer = - createTestPeer(Set.of(Capability.create("capability1", 1)), "protocol1", 5); + createTestPeer(Set.of(Capability.create("capability1", 1)), "protocol1", 5); peerSelector.addPeer(protocol1With5ReputationPeer); EthPeer protocol1With4ReputationPeer = - createTestPeer(Set.of(Capability.create("capability1", 1)), "protocol1", 4); + createTestPeer(Set.of(Capability.create("capability1", 1)), "protocol1", 4); peerSelector.addPeer(protocol1With4ReputationPeer); EthPeer protocol2With50ReputationPeer = - createTestPeer(Set.of(Capability.create("capability1", 1)), "protocol2", 50); + createTestPeer(Set.of(Capability.create("capability1", 1)), "protocol2", 50); peerSelector.addPeer(protocol2With50ReputationPeer); EthPeer protocol2With4ReputationPeer = - createTestPeer(Set.of(Capability.create("capability1", 1)), "protocol2", 4); + createTestPeer(Set.of(Capability.create("capability1", 1)), "protocol2", 4); peerSelector.addPeer(protocol2With4ReputationPeer); - Assertions.assertThrows(NoAvailablePeerException.class, () -> peerSelector.getPeer((p) -> p.getProtocolName().equals("fake protocol"))); + Assertions.assertThrows( + NoAvailablePeerException.class, + () -> peerSelector.getPeer((p) -> p.getProtocolName().equals("fake protocol"))); } private EthPeer createTestPeer(