-
Notifications
You must be signed in to change notification settings - Fork 294
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
Stream Removal if its Sanity Check Fails #4839
base: dev
Are you sure you want to change the base?
Conversation
@@ -693,6 +696,22 @@ func (host *HostV2) Connected(net libp2p_network.Network, conn libp2p_network.Co | |||
} | |||
} | |||
|
|||
// getPeerTopics returns the list of topics a peer is subscribed to | |||
func (host *HostV2) getPeerTopics(peerID libp2p_peer.ID) map[string]bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that function is currently not used anywhere. Is this required in this PR ? also please write the unit test for this function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function has been added for potential future use. If we later need to retrieve peer topics, we can use it. I included it preemptively because I believe it might be useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noted please the add unit test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@GheisMohammadi can you add unit test for getPeerTopics or maybe create a seperate PR for that function with its test ? what do you think ?
Issue
This PR removes stream from peer store if its sanity check fails.