I noticed here that if a topic has not been setup before as part of the WithPeerScore option, then the exist variable will always be false, so it seems that it isn't it possible to set the TopicScoreParams with SetTopicScoreParams for new topics after GossipSub has been instantiated.
old, exist := ps.params.Topics[topic]
ps.params.Topics[topic] = p
if !exist {
return nil
}
Is this a bug or intended behavior? because if remove the if !exist { condition, the logic seems to work fine when joining any new pubsub topic.
I noticed here that if a topic has not been setup before as part of the
WithPeerScore
option, then theexist
variable will always be false, so it seems that it isn't it possible to set theTopicScoreParams
withSetTopicScoreParams
for new topics after GossipSub has been instantiated.Is this a bug or intended behavior? because if remove the
if !exist {
condition, the logic seems to work fine when joining any new pubsub topic.