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

update topic_peers when peer_topics is updated #2325

Merged
merged 3 commits into from
Nov 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions protocols/gossipsub/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# 0.33.1 [unreleased]

- Fix bug in internal peer's topics tracking (see [PR 2325]).

- Use `instant` and `futures-timer` instead of `wasm-timer` (see [PR 2245]).

[PR 2245]: https://github.com/libp2p/rust-libp2p/pull/2245
[PR 2325]: https://github.com/libp2p/rust-libp2p/pull/2325

# 0.33.0 [2021-11-01]

Expand Down
4 changes: 4 additions & 0 deletions protocols/gossipsub/src/behaviour.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1252,6 +1252,10 @@ where
.entry(*peer_id)
.or_default()
.insert(topic.clone());
self.topic_peers
.entry(topic.clone())
.or_default()
.insert(*peer_id);
}

// we don't GRAFT to/from explicit peers; complain loudly if this happens
Expand Down