protocols/gossipsub: Fix duplicate connection id (#2702)

This commit is contained in:
Akihito Nakano
2022-06-14 23:31:27 +09:00
committed by GitHub
parent 2fd4998928
commit c7c21b1023
3 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
# 0.38.1
- Fix duplicate connection id. See [PR 2702].
[PR 2702]: https://github.com/libp2p/rust-libp2p/pull/2702
# 0.38.0 # 0.38.0
- Update to `libp2p-core` `v0.33.0`. - Update to `libp2p-core` `v0.33.0`.

View File

@ -3,7 +3,7 @@ name = "libp2p-gossipsub"
edition = "2021" edition = "2021"
rust-version = "1.56.1" rust-version = "1.56.1"
description = "Gossipsub protocol for libp2p" description = "Gossipsub protocol for libp2p"
version = "0.38.0" version = "0.38.1"
authors = ["Age Manning <Age@AgeManning.com>"] authors = ["Age Manning <Age@AgeManning.com>"]
license = "MIT" license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p" repository = "https://github.com/libp2p/rust-libp2p"

View File

@ -3104,7 +3104,7 @@ where
.entry(*peer_id) .entry(*peer_id)
.or_insert(PeerConnections { .or_insert(PeerConnections {
kind: PeerKind::Floodsub, kind: PeerKind::Floodsub,
connections: vec![*connection_id], connections: vec![],
}) })
.connections .connections
.push(*connection_id); .push(*connection_id);