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 fdc3a50 commit a1b8f7b
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 36 deletions.
87 changes: 59 additions & 28 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion 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.120.0-pre" }
socket2 = "0.5"
bitflags = "1.0"

p2p = { version = "0.6.1", package = "tentacle", features = [
p2p = { git = "https://github.com/nervosnetwork/tentacle.git", rev = "14fdd9ae6", package = "tentacle", features = [
"upnp",
"parking_lot",
"openssl-vendored",
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 @@ -7,7 +7,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 @@ -50,10 +50,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.120.0-pre" }
ckb-resource = { path = "../../resource", version = "= 0.120.0-pre" }
ckb-build-info = { path = "../build-info", version = "= 0.120.0-pre" }
ckb-types = { path = "../types", version = "= 0.120.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.120.0-pre" }
Expand Down

0 comments on commit a1b8f7b

Please sign in to comment.