Skip to content

Commit ed1fc6b

Browse files
committed
refactor: change from parking_lot to tokio
1 parent 28d3232 commit ed1fc6b

5 files changed

Lines changed: 4 additions & 7 deletions

File tree

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ tracing-subscriber = { version = "0.3.9", features = ["env-filter"] }
6464
tracing-loki = "0.2.6"
6565
vise = "0.3.2"
6666
vise-exporter = "0.3.2"
67-
parking_lot = "0.12.2"
6867
criterion = "0.8.0"
6968
reqwest = "0.13"
7069
http = "1.4"

crates/peerinfo/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,18 @@ chrono.workspace = true
1717
vise.workspace = true
1818
charon-core.workspace = true
1919
charon-p2p.workspace = true
20-
parking_lot.workspace = true
2120
futures.workspace = true
2221
futures-timer.workspace = true
2322
unsigned-varint.workspace = true
2423
hex.workspace = true
24+
tokio.workspace = true
2525

2626
[build-dependencies]
2727
charon-build-proto.workspace = true
2828

2929
[dev-dependencies]
3030
anyhow.workspace = true
3131
clap.workspace = true
32-
tokio.workspace = true
3332
tracing-subscriber.workspace = true
3433
vise-exporter.workspace = true
3534
hex-literal.workspace = true

crates/peerinfo/examples/peerinfo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ async fn main() -> anyhow::Result<()> {
175175
.init();
176176

177177
// Run the metrics exporter
178-
let bind_address = SocketAddr::from(([0, 0, 0, 0], 9465));
178+
let bind_address = SocketAddr::from(([0, 0, 0, 0], 9466));
179179

180180
let exporter = MetricsExporter::default()
181181
.bind(bind_address)

crates/peerinfo/src/protocol.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ use charon_core::version::{self, SemVer, SemVerError};
2020
use chrono::{DateTime, Utc};
2121
use futures::prelude::*;
2222
use libp2p::{PeerId, swarm::Stream};
23-
use parking_lot::Mutex;
2423
use prost::Message;
2524
use regex::Regex;
25+
use tokio::sync::Mutex;
2626
use tracing::{info, warn};
2727
use unsigned_varint::aio::read_usize;
2828

@@ -169,7 +169,7 @@ impl ProtocolState {
169169
};
170170

171171
let prev_nickname = {
172-
let mut nicknames = self.nicknames.lock();
172+
let mut nicknames = self.nicknames.lock().await;
173173
let prev_nickname = nicknames.insert(self.name.clone(), peer_info.nickname.clone());
174174

175175
if prev_nickname.as_ref() != Some(&peer_info.nickname) {

0 commit comments

Comments
 (0)