use of org.hyperledger.besu.ethereum.eth.sync.DefaultSynchronizer in project besu by hyperledger.
the class TransitionBesuControllerBuilder method createSynchronizer.
@Override
protected DefaultSynchronizer createSynchronizer(final ProtocolSchedule protocolSchedule, final WorldStateStorage worldStateStorage, final ProtocolContext protocolContext, final Optional<Pruner> maybePruner, final EthContext ethContext, final SyncState syncState, final EthProtocolManager ethProtocolManager, final PivotBlockSelector pivotBlockSelector) {
DefaultSynchronizer sync = super.createSynchronizer(protocolSchedule, worldStateStorage, protocolContext, maybePruner, ethContext, syncState, ethProtocolManager, pivotBlockSelector);
ConsensusContext cc = protocolContext.getConsensusContext(ConsensusContext.class);
if (cc instanceof MergeContext) {
protocolContext.getConsensusContext(MergeContext.class).addNewForkchoiceMessageListener(sync);
}
return sync;
}
Aggregations