use of io.libp2p.pubsub.gossip.GossipTopicScoreParams in project teku by ConsenSys.
the class LibP2PParamsFactory method createTopicsScoreParams.
public static GossipTopicsScoreParams createTopicsScoreParams(final GossipScoringConfig config) {
final GossipTopicScoreParams defaultTopicParams = createTopicScoreParams(config.getDefaultTopicScoringConfig());
final Map<String, GossipTopicScoreParams> topicParams = config.getTopicScoringConfig().entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey, e -> createTopicScoreParams(e.getValue())));
return new GossipTopicsScoreParams(defaultTopicParams, topicParams);
}
Aggregations