Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: move ratelimit type to tokio util #9007

Merged
merged 1 commit into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Cargo.lock

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

5 changes: 1 addition & 4 deletions crates/net/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,4 @@ workspace = true

[dependencies]
# ethereum
alloy-primitives.workspace = true

# async
tokio = { workspace = true, features = ["time"] }
alloy-primitives.workspace = true
2 changes: 0 additions & 2 deletions crates/net/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,3 @@
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]

pub mod ban_list;

pub mod ratelimit;
2 changes: 1 addition & 1 deletion crates/net/dns/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion crates/net/dns/src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 4 additions & 1 deletion crates/tokio-util/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
3 changes: 3 additions & 0 deletions crates/tokio-util/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Loading