Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
driftluo committed Nov 19, 2024
1 parent be98c46 commit 0cd5d74
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 17 deletions.
12 changes: 4 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions network/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ ckb-spawn = { path = "../util/spawn", version = "= 0.119.0-pre" }
bitflags = "1.0"

[target.'cfg(not(target_family = "wasm"))'.dependencies]
p2p = { version = "0.6.2", package = "tentacle", default-features = false, features = [
p2p = { git = "https://github.com/nervosnetwork/tentacle.git", rev = "14fdd9ae6", package = "tentacle", default-features = false, features = [
"upnp",
"parking_lot",
"openssl-vendored",
Expand All @@ -47,7 +47,7 @@ p2p = { version = "0.6.2", package = "tentacle", default-features = false, featu
socket2 = "0.5"

[target.'cfg(target_family = "wasm")'.dependencies]
p2p = { version = "0.6.2", package = "tentacle", default-features = false, features = [
p2p = { git = "https://github.com/nervosnetwork/tentacle.git", rev = "14fdd9ae6", package = "tentacle", default-features = false, features = [
"wasm-timer",
] }

Expand Down
7 changes: 2 additions & 5 deletions network/src/services/dump_peer_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::{
task::{Context, Poll},
time::Duration,
};
use tokio::time::{Instant, Interval, MissedTickBehavior};
use tokio::time::{Interval, MissedTickBehavior};

const DEFAULT_DUMP_INTERVAL: Duration = Duration::from_secs(3600); // 1 hour

Expand Down Expand Up @@ -52,10 +52,7 @@ impl Future for DumpPeerStoreService {
fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
if self.interval.is_none() {
self.interval = {
let mut interval = tokio::time::interval_at(
Instant::now() + DEFAULT_DUMP_INTERVAL,
DEFAULT_DUMP_INTERVAL,
);
let mut interval = tokio::time::interval(DEFAULT_DUMP_INTERVAL);
// The dump peer store service does not need to urgently compensate for the missed wake,
// just delay behavior is enough
interval.set_missed_tick_behavior(MissedTickBehavior::Delay);
Expand Down
4 changes: 2 additions & 2 deletions util/app-config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ ckb-pow = { path = "../../pow", version = "= 0.119.0-pre" }
ckb-resource = { path = "../../resource", version = "= 0.119.0-pre" }
ckb-build-info = { path = "../build-info", version = "= 0.119.0-pre" }
ckb-types = { path = "../types", version = "= 0.119.0-pre" }
secio = { version = "0.6", package = "tentacle-secio" }
multiaddr = { version = "0.3.0", package = "tentacle-multiaddr" }
secio = { git = "https://github.com/nervosnetwork/tentacle.git", rev = "14fdd9ae6", package = "tentacle-secio" }
multiaddr = { git = "https://github.com/nervosnetwork/tentacle.git", rev = "14fdd9ae6", package = "tentacle-multiaddr" }
rand = "0.8"
sentry = { version = "0.34.0", optional = true }
ckb-systemtime = { path = "../systemtime", version = "= 0.119.0-pre" }
Expand Down

0 comments on commit 0cd5d74

Please sign in to comment.