From 5c3a61ae77c6dd8c4acc3c91152df2218e7bd2f1 Mon Sep 17 00:00:00 2001 From: Matilda Clerke Date: Fri, 20 Sep 2024 15:34:03 +1000 Subject: [PATCH] 7311: Fix up compile errors after merge Signed-off-by: Matilda Clerke --- .../hyperledger/besu/controller/BesuControllerBuilder.java | 3 ++- .../besu/ethereum/eth/manager/EthProtocolManagerTest.java | 4 ++-- .../ethereum/eth/manager/EthProtocolManagerTestUtil.java | 6 +++--- .../besu/ethereum/eth/transactions/TestNode.java | 4 ++-- .../eth/transactions/TransactionPoolFactoryTest.java | 4 ++-- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/besu/src/main/java/org/hyperledger/besu/controller/BesuControllerBuilder.java b/besu/src/main/java/org/hyperledger/besu/controller/BesuControllerBuilder.java index cc9b3eeb18..7fff62db99 100644 --- a/besu/src/main/java/org/hyperledger/besu/controller/BesuControllerBuilder.java +++ b/besu/src/main/java/org/hyperledger/besu/controller/BesuControllerBuilder.java @@ -55,6 +55,7 @@ import org.hyperledger.besu.ethereum.eth.manager.EthProtocolManager; import org.hyperledger.besu.ethereum.eth.manager.EthScheduler; import org.hyperledger.besu.ethereum.eth.manager.MergePeerFilter; import org.hyperledger.besu.ethereum.eth.manager.MonitoredExecutors; +import org.hyperledger.besu.ethereum.eth.manager.peertask.DefaultPeerManager; import org.hyperledger.besu.ethereum.eth.manager.peertask.PeerManager; import org.hyperledger.besu.ethereum.eth.manager.peertask.PeerTaskExecutor; import org.hyperledger.besu.ethereum.eth.manager.peertask.PeerTaskRequestSender; @@ -655,7 +656,7 @@ public abstract class BesuControllerBuilder implements MiningParameterOverrides } final EthContext ethContext = new EthContext(ethPeers, ethMessages, snapMessages, scheduler); - final PeerManager peerManager = new PeerManager(); + final PeerManager peerManager = new DefaultPeerManager(); ethPeers.streamAllPeers().forEach(peerManager::addPeer); final PeerTaskExecutor peerTaskExecutor = new PeerTaskExecutor( diff --git a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/manager/EthProtocolManagerTest.java b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/manager/EthProtocolManagerTest.java index 762600bdd0..31f66e31d2 100644 --- a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/manager/EthProtocolManagerTest.java +++ b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/manager/EthProtocolManagerTest.java @@ -44,7 +44,7 @@ import org.hyperledger.besu.ethereum.eth.EthProtocol; import org.hyperledger.besu.ethereum.eth.EthProtocolConfiguration; import org.hyperledger.besu.ethereum.eth.EthProtocolVersion; import org.hyperledger.besu.ethereum.eth.manager.MockPeerConnection.PeerSendHandler; -import org.hyperledger.besu.ethereum.eth.manager.peertask.PeerManager; +import org.hyperledger.besu.ethereum.eth.manager.peertask.DefaultPeerManager; import org.hyperledger.besu.ethereum.eth.messages.BlockBodiesMessage; import org.hyperledger.besu.ethereum.eth.messages.BlockHeadersMessage; import org.hyperledger.besu.ethereum.eth.messages.EthPV62; @@ -1245,7 +1245,7 @@ public final class EthProtocolManagerTest { syncConfig, mock(EthScheduler.class), mock(ForkIdManager.class), - new PeerManager())) { + new DefaultPeerManager())) { return ethManager; } diff --git a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/manager/EthProtocolManagerTestUtil.java b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/manager/EthProtocolManagerTestUtil.java index d8b5029d95..b71ffa9133 100644 --- a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/manager/EthProtocolManagerTestUtil.java +++ b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/manager/EthProtocolManagerTestUtil.java @@ -30,7 +30,7 @@ import org.hyperledger.besu.ethereum.core.Difficulty; import org.hyperledger.besu.ethereum.core.ProtocolScheduleFixture; import org.hyperledger.besu.ethereum.eth.EthProtocol; import org.hyperledger.besu.ethereum.eth.EthProtocolConfiguration; -import org.hyperledger.besu.ethereum.eth.manager.peertask.PeerManager; +import org.hyperledger.besu.ethereum.eth.manager.peertask.DefaultPeerManager; import org.hyperledger.besu.ethereum.eth.manager.snap.SnapProtocolManager; import org.hyperledger.besu.ethereum.eth.peervalidation.PeerValidator; import org.hyperledger.besu.ethereum.eth.sync.ChainHeadTracker; @@ -119,7 +119,7 @@ public class EthProtocolManagerTestUtil { mock(SynchronizerConfiguration.class), ethScheduler, new ForkIdManager(blockchain, Collections.emptyList(), Collections.emptyList(), false), - new PeerManager()); + new DefaultPeerManager()); } public static EthProtocolManager create( @@ -171,7 +171,7 @@ public class EthProtocolManagerTestUtil { mock(SynchronizerConfiguration.class), ethScheduler, forkIdManager, - new PeerManager()); + new DefaultPeerManager()); } public static EthProtocolManager create(final Blockchain blockchain) { diff --git a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/TestNode.java b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/TestNode.java index 7f1a342311..f8671b675f 100644 --- a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/TestNode.java +++ b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/TestNode.java @@ -44,7 +44,7 @@ import org.hyperledger.besu.ethereum.eth.manager.EthMessages; import org.hyperledger.besu.ethereum.eth.manager.EthPeers; import org.hyperledger.besu.ethereum.eth.manager.EthProtocolManager; import org.hyperledger.besu.ethereum.eth.manager.EthScheduler; -import org.hyperledger.besu.ethereum.eth.manager.peertask.PeerManager; +import org.hyperledger.besu.ethereum.eth.manager.peertask.DefaultPeerManager; import org.hyperledger.besu.ethereum.eth.sync.ChainHeadTracker; import org.hyperledger.besu.ethereum.eth.sync.SyncMode; import org.hyperledger.besu.ethereum.eth.sync.SynchronizerConfiguration; @@ -198,7 +198,7 @@ public class TestNode implements Closeable { Optional.empty(), syncConfig, scheduler, - new PeerManager()); + new DefaultPeerManager()); final NetworkRunner networkRunner = NetworkRunner.builder() diff --git a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/TransactionPoolFactoryTest.java b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/TransactionPoolFactoryTest.java index c9ef635c0f..f85abc4e96 100644 --- a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/TransactionPoolFactoryTest.java +++ b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/TransactionPoolFactoryTest.java @@ -45,7 +45,7 @@ import org.hyperledger.besu.ethereum.eth.manager.EthMessages; import org.hyperledger.besu.ethereum.eth.manager.EthPeers; import org.hyperledger.besu.ethereum.eth.manager.EthProtocolManager; import org.hyperledger.besu.ethereum.eth.manager.EthScheduler; -import org.hyperledger.besu.ethereum.eth.manager.peertask.PeerManager; +import org.hyperledger.besu.ethereum.eth.manager.peertask.DefaultPeerManager; import org.hyperledger.besu.ethereum.eth.sync.SyncMode; import org.hyperledger.besu.ethereum.eth.sync.SynchronizerConfiguration; import org.hyperledger.besu.ethereum.eth.sync.state.SyncState; @@ -320,7 +320,7 @@ public class TransactionPoolFactoryTest { mock(SynchronizerConfiguration.class), mock(EthScheduler.class), mock(ForkIdManager.class), - new PeerManager()); + new DefaultPeerManager()); } @Test