Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SetTopicScoreParams after join a new pubsub topic #533

Closed
richard-ramos opened this issue Jun 7, 2023 · 1 comment · Fixed by #540
Closed

SetTopicScoreParams after join a new pubsub topic #533

richard-ramos opened this issue Jun 7, 2023 · 1 comment · Fixed by #540

Comments

@richard-ramos
Copy link
Contributor

richard-ramos commented Jun 7, 2023

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.

@vyzo
Copy link
Collaborator

vyzo commented Jun 7, 2023

Hrm, i think we can call it a bug; pr welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants