chore: move ratelimit type to tokio util (#9007)

This commit is contained in:
Matthias Seitz
2024-06-21 02:10:07 +02:00
committed by GitHub
parent d6072e79f3
commit 50c1a8e48a
8 changed files with 11 additions and 11 deletions

3
Cargo.lock generated
View File

@ -6739,8 +6739,8 @@ dependencies = [
"rand 0.8.5",
"reth-chainspec",
"reth-ethereum-forks",
"reth-net-common",
"reth-network-peers",
"reth-tokio-util",
"reth-tracing",
"schnellru",
"secp256k1",
@ -7225,7 +7225,6 @@ name = "reth-net-common"
version = "1.0.0-rc.2"
dependencies = [
"alloy-primitives",
"tokio",
]
[[package]]

View File

@ -13,7 +13,4 @@ workspace = true
[dependencies]
# ethereum
alloy-primitives.workspace = true
# async
tokio = { workspace = true, features = ["time"] }
alloy-primitives.workspace = true

View File

@ -9,5 +9,3 @@
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
pub mod ban_list;
pub mod ratelimit;

View File

@ -14,8 +14,8 @@ workspace = true
[dependencies]
# reth
reth-ethereum-forks.workspace = true
reth-net-common.workspace = true
reth-network-peers = { workspace = true, features = ["secp256k1"] }
reth-tokio-util = { workspace = true, features = ["time"] }
# ethereum
alloy-primitives.workspace = true

View File

@ -7,7 +7,7 @@ use crate::{
tree::{DnsEntry, LinkEntry, TreeRootEntry},
};
use enr::EnrKeyUnambiguous;
use reth_net_common::ratelimit::{Rate, RateLimit};
use reth_tokio_util::ratelimit::{Rate, RateLimit};
use std::{
collections::VecDeque,
future::Future,

View File

@ -19,4 +19,7 @@ tokio = { workspace = true, features = ["sync"] }
tokio-stream = { workspace = true, features = ["sync"] }
[dev-dependencies]
tokio = { workspace = true, features = ["full", "macros"] }
tokio = { workspace = true, features = ["full", "macros"] }
[features]
time = ["tokio/time"]

View File

@ -12,3 +12,6 @@ mod event_sender;
mod event_stream;
pub use event_sender::EventSender;
pub use event_stream::EventStream;
#[cfg(feature = "time")]
pub mod ratelimit;