Skip to content
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
14 commits
Select commit Hold shift + click to select a range
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
7 changes: 4 additions & 3 deletions cmd/ethrex/initializers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,7 @@ pub async fn init_network(
let discovery_config = DiscoveryConfig {
discv4_enabled: opts.discv4_enabled,
discv5_enabled: opts.discv5_enabled,
target_peers: opts.target_peers,
nat_extip_set: opts.nat_extip.is_some(),
};

Expand Down Expand Up @@ -926,8 +927,7 @@ pub async fn init_l1(
record: local_node_record,
}));

let peer_table =
PeerTableServer::spawn(local_p2p_node.node_id(), opts.target_peers, store.clone());
let peer_table = PeerTableServer::spawn(opts.target_peers);

// TODO: Check every module starts properly.
let tracker = TaskTracker::new();
Expand All @@ -951,7 +951,8 @@ pub async fn init_l1(

let initiator = RLPxInitiator::spawn(p2p_context.clone());

let peer_handler = PeerHandler::new(peer_table.clone(), initiator);
let peer_handler =
PeerHandler::new(peer_table.clone(), initiator, p2p_context.discovery.clone());

init_rpc_api(
&opts,
Expand Down
8 changes: 2 additions & 6 deletions cmd/ethrex/l2/initializers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,7 @@ pub async fn init_l2(
if !opts.sequencer_opts.based {
blockchain.set_synced();
}
let peer_table = PeerTableServer::spawn(
local_p2p_node.node_id(),
opts.node_opts.target_peers,
store.clone(),
);
let peer_table = PeerTableServer::spawn(opts.node_opts.target_peers);
let p2p_context = P2PContext::new(
local_p2p_node.clone(),
network_config,
Expand Down Expand Up @@ -335,7 +331,7 @@ pub async fn init_l2(
)
.expect("P2P context could not be created");
let initiator = RLPxInitiator::spawn(p2p_context.clone());
let peer_handler = PeerHandler::new(peer_table, initiator);
let peer_handler = PeerHandler::new(peer_table, initiator, p2p_context.discovery.clone());

// Create SyncManager
let syncer = SyncManager::new(
Expand Down
Loading
Loading