use of tech.pegasys.teku.networking.eth2.gossip.GossipManager in project teku by ConsenSys.
the class GossipForkSubscriptionsPhase0 method startGossip.
@Override
public final void startGossip(final Bytes32 genesisValidatorsRoot, final boolean isOptimisticHead) {
if (gossipManagers.isEmpty()) {
final ForkInfo forkInfo = new ForkInfo(fork, genesisValidatorsRoot);
addGossipManagers(forkInfo);
}
gossipManagers.stream().filter(manager -> manager.isEnabledDuringOptimisticSync() || !isOptimisticHead).forEach(GossipManager::subscribe);
}
Aggregations