mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-30 03:01:58 -04:00
chore: refactor boot_nodes usage to eliminate redundancy (#15258)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
@@ -51,8 +51,10 @@ async fn main() {
|
||||
|
||||
let secret_key = SecretKey::new(&mut rand::thread_rng());
|
||||
|
||||
let bsc_boot_nodes = boot_nodes();
|
||||
|
||||
let net_cfg = NetworkConfig::builder(secret_key)
|
||||
.boot_nodes(boot_nodes())
|
||||
.boot_nodes(bsc_boot_nodes.clone())
|
||||
.set_head(head())
|
||||
.with_pow()
|
||||
.listener_addr(local_addr)
|
||||
@@ -61,7 +63,7 @@ async fn main() {
|
||||
|
||||
let net_cfg = net_cfg.set_discovery_v4(
|
||||
Discv4ConfigBuilder::default()
|
||||
.add_boot_nodes(boot_nodes())
|
||||
.add_boot_nodes(bsc_boot_nodes)
|
||||
.lookup_interval(Duration::from_millis(500))
|
||||
.build(),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user