MCPcopy Create free account
hub / github.com/base/base / discovery_v5_builder

Method discovery_v5_builder

crates/execution/node/src/node.rs:1273–1290  ·  view source on GitHub ↗

Creates the Base discv5 config builder from reth network arguments.

(
        &self,
        args: &RethNetworkArgs,
        boot_nodes: impl IntoIterator<Item = NodeRecord>,
        external_addr: Option<IpAddr>,
    )

Source from the content-addressed store, hash-verified

1271
1272 /// Creates the Base discv5 config builder from reth network arguments.
1273 pub fn discovery_v5_builder(
1274 &self,
1275 args: &RethNetworkArgs,
1276 boot_nodes: impl IntoIterator<Item = NodeRecord>,
1277 external_addr: Option<IpAddr>,
1278 ) -> reth_discv5::ConfigBuilder {
1279 let rlpx_socket = Self::rlpx_socket(args);
1280 let mut builder = args
1281 .discovery
1282 .discovery_v5_builder(rlpx_socket, boot_nodes)
1283 .discv5_config(self.discv5_config(args));
1284
1285 if let Some((key, value)) = Self::enr_ip_kv_pair(external_addr) {
1286 builder = builder.add_enr_kv_pair(key, value);
1287 }
1288
1289 builder
1290 }
1291
1292 /// Creates the inner discv5 config with the Base protocol identity.
1293 pub fn discv5_config(&self, args: &RethNetworkArgs) -> reth_discv5::discv5::Config {

Calls 1

discv5_configMethod · 0.45

Tested by

no test coverage detected