protocols/gossipsub: Update topic_peers (#2325)

Co-authored-by: Max Inden <mail@max-inden.de>
This commit is contained in:
Divma
2021-11-03 18:21:51 -05:00
committed by GitHub
parent 012287ad1e
commit 8b68026bb0
2 changed files with 7 additions and 0 deletions

View File

@ -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