Skip to content

Commit 0b71a05

Browse files
committed
mpved eth-wire inside network mod
1 parent 3f4e11b commit 0b71a05

File tree

8 files changed

+14
-22
lines changed

8 files changed

+14
-22
lines changed

Diff for: crates/ethereum/reth/Cargo.toml

+2-4
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ arbitrary = [
6565
"reth-db?/arbitrary",
6666
"alloy-rpc-types-eth?/arbitrary",
6767
"reth-transaction-pool?/arbitrary",
68-
"reth-eth-wire?/arbitrary",
6968
]
7069

7170
test-utils = [
@@ -83,7 +82,7 @@ test-utils = [
8382
"reth-transaction-pool?/test-utils",
8483
]
8584

86-
full = ["consensus", "evm", "node", "provider", "rpc", "exex", "trie", "pool", "network", "eth-wire"]
85+
full = ["consensus", "evm", "node", "provider", "rpc", "exex", "trie", "pool", "network"]
8786

8887
alloy-compat = ["reth-ethereum-primitives/alloy-compat"]
8988
cli = ["dep:reth-ethereum-cli"]
@@ -105,7 +104,6 @@ node = [
105104
"trie",
106105
]
107106
pool = ["dep:reth-transaction-pool"]
108-
eth-wire = ["dep:reth-eth-wire"]
109107
rpc = [
110108
"dep:reth-rpc",
111109
"dep:reth-rpc-builder",
@@ -114,7 +112,7 @@ rpc = [
114112
"dep:alloy-rpc-types-eth",
115113
]
116114
js-tracer = ["rpc", "reth-rpc/js-tracer"]
117-
network = ["dep:reth-network", "dep:reth-network-api"]
115+
network = ["dep:reth-network", "dep:reth-network-api", "dep:reth-eth-wire"]
118116
provider = ["storage-api", "dep:reth-provider", "dep:reth-db"]
119117
storage-api = ["dep:reth-storage-api"]
120118
trie = ["dep:reth-trie"]

Diff for: crates/ethereum/reth/src/lib.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,13 @@ pub use reth_exex as exex;
6262
/// Re-exported reth network types
6363
#[cfg(feature = "network")]
6464
pub mod network {
65+
#[doc(inline)]
66+
pub use reth_eth_wire as eth_wire;
6567
#[doc(inline)]
6668
pub use reth_network::*;
6769
#[doc(inline)]
6870
pub use reth_network_api as api;
6971
}
70-
/// Re-exported eth wire types
71-
#[cfg(feature = "eth-wire")]
72-
pub use reth_eth_wire as eth_wire;
7372

7473
/// Re-exported reth provider types
7574
#[cfg(feature = "provider")]

Diff for: crates/optimism/reth/Cargo.toml

+2-4
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ arbitrary = [
6464
"reth-primitives-traits/arbitrary",
6565
"reth-db?/arbitrary",
6666
"reth-transaction-pool?/arbitrary",
67-
"reth-eth-wire?/arbitrary",
6867
]
6968

7069
test-utils = [
@@ -81,7 +80,7 @@ test-utils = [
8180
"reth-transaction-pool?/test-utils",
8281
]
8382

84-
full = ["consensus", "evm", "node", "provider", "rpc", "trie", "pool", "network", "eth-wire"]
83+
full = ["consensus", "evm", "node", "provider", "rpc", "trie", "pool", "network"]
8584

8685
alloy-compat = ["reth-optimism-primitives/alloy-compat"]
8786
cli = ["dep:reth-optimism-cli"]
@@ -109,9 +108,8 @@ rpc = [
109108
"dep:reth-optimism-rpc",
110109
]
111110
js-tracer = ["rpc", "reth-rpc/js-tracer"]
112-
network = ["dep:reth-network", "dep:reth-network-api"]
111+
network = ["dep:reth-network", "dep:reth-network-api", "dep:reth-eth-wire"]
113112
provider = ["storage-api", "dep:reth-provider", "dep:reth-db"]
114113
pool = ["dep:reth-transaction-pool"]
115-
eth-wire = ["dep:reth-eth-wire"]
116114
storage-api = ["dep:reth-storage-api"]
117115
trie = ["dep:reth-trie"]

Diff for: crates/optimism/reth/src/lib.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,12 @@ pub mod evm {
6262
#[doc(inline)]
6363
pub use reth_revm as revm;
6464
}
65-
/// Re-exported eth wire types
66-
#[cfg(feature = "eth-wire")]
67-
pub use reth_eth_wire as eth_wire;
6865

6966
/// Re-exported reth network types
7067
#[cfg(feature = "network")]
7168
pub mod network {
69+
#[doc(inline)]
70+
pub use reth_eth_wire as eth_wire;
7271
#[doc(inline)]
7372
pub use reth_network::*;
7473
#[doc(inline)]

Diff for: examples/custom-rlpx-subprotocol/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ license.workspace = true
88
[dependencies]
99
tokio = { workspace = true, features = ["full"] }
1010
futures.workspace = true
11-
reth-ethereum = { workspace = true, features = ["node", "network", "eth-wire"] }
11+
reth-ethereum = { workspace = true, features = ["node", "network"] }
1212
reth.workspace = true
1313
tokio-stream.workspace = true
1414
eyre.workspace = true

Diff for: examples/custom-rlpx-subprotocol/src/subprotocol/connection/handler.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@ use super::CustomRlpxConnection;
22
use crate::subprotocol::protocol::{
33
event::ProtocolEvent, handler::ProtocolState, proto::CustomRlpxProtoMessage,
44
};
5-
use reth_ethereum::{
5+
use reth_ethereum::network::{
6+
api::{Direction, PeerId},
67
eth_wire::{capability::SharedCapabilities, multiplex::ProtocolConnection, protocol::Protocol},
7-
network::{
8-
api::{Direction, PeerId},
9-
protocol::{ConnectionHandler, OnNotSupported},
10-
},
8+
protocol::{ConnectionHandler, OnNotSupported},
119
};
1210
use tokio::sync::mpsc;
1311
use tokio_stream::wrappers::UnboundedReceiverStream;

Diff for: examples/custom-rlpx-subprotocol/src/subprotocol/connection/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use super::protocol::proto::{CustomRlpxProtoMessage, CustomRlpxProtoMessageKind};
22
use alloy_primitives::bytes::BytesMut;
33
use futures::{Stream, StreamExt};
4-
use reth_ethereum::eth_wire::multiplex::ProtocolConnection;
4+
use reth_ethereum::network::eth_wire::multiplex::ProtocolConnection;
55
use std::{
66
pin::Pin,
77
task::{ready, Context, Poll},

Diff for: examples/custom-rlpx-subprotocol/src/subprotocol/protocol/proto.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//! following [RLPx specs](https://github.com/ethereum/devp2p/blob/master/rlpx.md)
33
44
use alloy_primitives::bytes::{Buf, BufMut, BytesMut};
5-
use reth_ethereum::eth_wire::{protocol::Protocol, Capability};
5+
use reth_ethereum::network::eth_wire::{protocol::Protocol, Capability};
66

77
#[repr(u8)]
88
#[derive(Clone, Copy, Debug, PartialEq, Eq)]

0 commit comments

Comments
 (0)