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

Method discovery_v5_builder

crates/execution/node/src/node.rs:1145–1162  ·  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

1143
1144 /// Creates the Base discv5 config builder from reth network arguments.
1145 pub fn discovery_v5_builder(
1146 &self,
1147 args: &RethNetworkArgs,
1148 boot_nodes: impl IntoIterator<Item = NodeRecord>,
1149 external_addr: Option<IpAddr>,
1150 ) -> reth_discv5::ConfigBuilder {
1151 let rlpx_socket = Self::rlpx_socket(args);
1152 let mut builder = args
1153 .discovery
1154 .discovery_v5_builder(rlpx_socket, boot_nodes)
1155 .discv5_config(self.discv5_config(args));
1156
1157 if let Some((key, value)) = Self::enr_ip_kv_pair(external_addr) {
1158 builder = builder.add_enr_kv_pair(key, value);
1159 }
1160
1161 builder
1162 }
1163
1164 /// Creates the inner discv5 config with the Base protocol identity.
1165 pub fn discv5_config(&self, args: &RethNetworkArgs) -> reth_discv5::discv5::Config {

Calls 1

discv5_configMethod · 0.45

Tested by

no test coverage detected