mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: add NetworkManager::eth (#13936)
This commit is contained in:
@ -14,9 +14,7 @@
|
||||
|
||||
use chainspec::{boot_nodes, bsc_chain_spec};
|
||||
use reth_discv4::Discv4ConfigBuilder;
|
||||
use reth_network::{
|
||||
EthNetworkPrimitives, NetworkConfig, NetworkEvent, NetworkEventListenerProvider, NetworkManager,
|
||||
};
|
||||
use reth_network::{NetworkConfig, NetworkEvent, NetworkEventListenerProvider, NetworkManager};
|
||||
use reth_network_api::{
|
||||
events::{PeerEvent, SessionInfo},
|
||||
PeersInfo,
|
||||
@ -69,7 +67,7 @@ async fn main() {
|
||||
// latest BSC forkId, we need to override this to allow connections from BSC nodes
|
||||
let fork_id = ForkId { hash: ForkHash([0x07, 0xb5, 0x43, 0x28]), next: 0 };
|
||||
net_cfg.fork_filter.set_current_fork_id(fork_id);
|
||||
let net_manager = NetworkManager::<EthNetworkPrimitives>::new(net_cfg).await.unwrap();
|
||||
let net_manager = NetworkManager::eth(net_cfg).await.unwrap();
|
||||
|
||||
// The network handle is our entrypoint into the network.
|
||||
let net_handle = net_manager.handle().clone();
|
||||
|
||||
Reference in New Issue
Block a user