Skip to content

Commit 7396aea

Browse files
committed
chore(gossipsub): use crates.io libp2p deps
1 parent 79fc6f1 commit 7396aea

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

protocols/gossipsub/Cargo.toml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,25 @@ getrandom = { workspace = true }
2828
hashlink = { workspace = true }
2929
hex_fmt = "0.3.0"
3030
web-time = { workspace = true }
31-
libp2p-core = { workspace = true }
32-
libp2p-identity = { workspace = true, features = ["rand"] }
33-
libp2p-swarm = { workspace = true }
31+
# Libp2p crates, updated to use crates.io versions so that we can use this gossipsub fork with
32+
# crates.io libp2p
33+
libp2p-core = "0.43"
34+
libp2p-identity = { version = "0.2", features = ["rand"] }
35+
libp2p-swarm = "0.46"
3436
quick-protobuf = "0.8"
35-
quick-protobuf-codec = { workspace = true }
37+
quick-protobuf-codec = "0.3.1"
3638
rand = "0.8"
3739
regex = "1.10.5"
3840
serde = { version = "1", optional = true, features = ["derive"] }
3941
sha2 = "0.10.8"
4042
tracing = { workspace = true }
4143

4244
# Metrics dependencies
43-
prometheus-client = { workspace = true, optional = true }
45+
# TODO: update to 0.23 when libp2p-metrics 0.17 is released.
46+
prometheus-client = "0.22.2"
4447

4548
[dev-dependencies]
46-
libp2p-core = { workspace = true }
47-
libp2p-swarm-test = { path = "../../swarm-test" }
49+
libp2p-swarm-test = "0.5.0"
4850
quickcheck = { workspace = true }
4951
tracing-subscriber = { workspace = true, features = ["env-filter"] }
5052
tokio = { workspace = true, features = ["rt", "rt-multi-thread", "time", "macros"] }

protocols/gossipsub/src/metrics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,6 +731,6 @@ struct HistBuilder {
731731

732732
impl MetricConstructor<Histogram> for HistBuilder {
733733
fn new_metric(&self) -> Histogram {
734-
Histogram::new(self.buckets.clone())
734+
Histogram::new(self.buckets.clone().into_iter())
735735
}
736736
}

0 commit comments

Comments
 (0)