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