|
|
@ -45,6 +45,7 @@ import org.hyperledger.besu.ethereum.core.BlockHeader; |
|
|
|
import org.hyperledger.besu.ethereum.core.Difficulty; |
|
|
|
import org.hyperledger.besu.ethereum.core.Difficulty; |
|
|
|
import org.hyperledger.besu.ethereum.core.MiningConfiguration; |
|
|
|
import org.hyperledger.besu.ethereum.core.MiningConfiguration; |
|
|
|
import org.hyperledger.besu.ethereum.core.PrivacyParameters; |
|
|
|
import org.hyperledger.besu.ethereum.core.PrivacyParameters; |
|
|
|
|
|
|
|
import org.hyperledger.besu.ethereum.core.Synchronizer; |
|
|
|
import org.hyperledger.besu.ethereum.eth.EthProtocol; |
|
|
|
import org.hyperledger.besu.ethereum.eth.EthProtocol; |
|
|
|
import org.hyperledger.besu.ethereum.eth.EthProtocolConfiguration; |
|
|
|
import org.hyperledger.besu.ethereum.eth.EthProtocolConfiguration; |
|
|
|
import org.hyperledger.besu.ethereum.eth.SnapProtocol; |
|
|
|
import org.hyperledger.besu.ethereum.eth.SnapProtocol; |
|
|
@ -732,11 +733,9 @@ public abstract class BesuControllerBuilder implements MiningParameterOverrides |
|
|
|
ethPeers.snapServerPeersNeeded(false); |
|
|
|
ethPeers.snapServerPeersNeeded(false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protocolContext.setSynchronizer(synchronizer); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
final Optional<SnapProtocolManager> maybeSnapProtocolManager = |
|
|
|
final Optional<SnapProtocolManager> maybeSnapProtocolManager = |
|
|
|
createSnapProtocolManager( |
|
|
|
createSnapProtocolManager( |
|
|
|
protocolContext, worldStateStorageCoordinator, ethPeers, snapMessages); |
|
|
|
protocolContext, worldStateStorageCoordinator, ethPeers, snapMessages, synchronizer); |
|
|
|
|
|
|
|
|
|
|
|
final MiningCoordinator miningCoordinator = |
|
|
|
final MiningCoordinator miningCoordinator = |
|
|
|
createMiningCoordinator( |
|
|
|
createMiningCoordinator( |
|
|
@ -1097,14 +1096,16 @@ public abstract class BesuControllerBuilder implements MiningParameterOverrides |
|
|
|
final ProtocolContext protocolContext, |
|
|
|
final ProtocolContext protocolContext, |
|
|
|
final WorldStateStorageCoordinator worldStateStorageCoordinator, |
|
|
|
final WorldStateStorageCoordinator worldStateStorageCoordinator, |
|
|
|
final EthPeers ethPeers, |
|
|
|
final EthPeers ethPeers, |
|
|
|
final EthMessages snapMessages) { |
|
|
|
final EthMessages snapMessages, |
|
|
|
|
|
|
|
final Synchronizer synchronizer) { |
|
|
|
return Optional.of( |
|
|
|
return Optional.of( |
|
|
|
new SnapProtocolManager( |
|
|
|
new SnapProtocolManager( |
|
|
|
worldStateStorageCoordinator, |
|
|
|
worldStateStorageCoordinator, |
|
|
|
syncConfig.getSnapSyncConfiguration(), |
|
|
|
syncConfig.getSnapSyncConfiguration(), |
|
|
|
ethPeers, |
|
|
|
ethPeers, |
|
|
|
snapMessages, |
|
|
|
snapMessages, |
|
|
|
protocolContext)); |
|
|
|
protocolContext, |
|
|
|
|
|
|
|
synchronizer)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
WorldStateArchive createWorldStateArchive( |
|
|
|
WorldStateArchive createWorldStateArchive( |
|
|
|