mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore(sdk): enable referencing network type via FullNodeComponents::Network (#9921)
This commit is contained in:
@ -17,7 +17,6 @@ reth-config.workspace = true
|
||||
reth-evm.workspace = true
|
||||
reth-exex-types.workspace = true
|
||||
reth-metrics.workspace = true
|
||||
reth-network.workspace = true
|
||||
reth-node-api.workspace = true
|
||||
reth-node-core.workspace = true
|
||||
reth-payload-builder.workspace = true
|
||||
|
||||
@ -1,11 +1,13 @@
|
||||
use crate::{ExExEvent, ExExNotification};
|
||||
use std::fmt::Debug;
|
||||
|
||||
use reth_node_api::FullNodeComponents;
|
||||
use reth_node_core::node_config::NodeConfig;
|
||||
use reth_primitives::Head;
|
||||
use reth_tasks::TaskExecutor;
|
||||
use std::fmt::Debug;
|
||||
use tokio::sync::mpsc::{Receiver, UnboundedSender};
|
||||
|
||||
use crate::{ExExEvent, ExExNotification};
|
||||
|
||||
/// Captures the context that an `ExEx` has access to.
|
||||
pub struct ExExContext<Node: FullNodeComponents> {
|
||||
/// The current head of the blockchain at launch.
|
||||
@ -69,7 +71,7 @@ impl<Node: FullNodeComponents> ExExContext<Node> {
|
||||
}
|
||||
|
||||
/// Returns the handle to the network
|
||||
pub fn network(&self) -> &reth_network::NetworkHandle {
|
||||
pub fn network(&self) -> &Node::Network {
|
||||
self.components.network()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user