Improve single-node testnet support and Arc NetworkConfig/ChainSpec (#6396)

* Arc ChainSpec and NetworkConfig

* Fix release tests

* Fix lint

* Merge remote-tracking branch 'origin/unstable' into single-node-testnet
This commit is contained in:
Michael Sproul
2024-09-24 10:16:18 +10:00
committed by GitHub
parent d84df5799c
commit 1447eeb40b
66 changed files with 340 additions and 250 deletions

View File

@@ -73,6 +73,7 @@ mod tests {
config.discv5_config.table_filter = |_| true; // Do not ignore local IPs
config.upnp_enabled = false;
config.boot_nodes_enr = enrs.clone();
let config = Arc::new(config);
runtime.block_on(async move {
// Create a new network service which implicitly gets dropped at the
// end of the block.
@@ -86,7 +87,7 @@ mod tests {
let _network_service = NetworkService::start(
beacon_chain.clone(),
&config,
config,
executor,
None,
beacon_processor_tx,
@@ -125,7 +126,7 @@ mod tests {
// Build beacon chain.
let beacon_chain = BeaconChainHarness::builder(MinimalEthSpec)
.spec(spec.clone())
.spec(spec.clone().into())
.deterministic_keypairs(8)
.fresh_ephemeral_store()
.mock_execution_layer()
@@ -149,12 +150,13 @@ mod tests {
config.set_ipv4_listening_address(std::net::Ipv4Addr::UNSPECIFIED, 21214, 21214, 21215);
config.discv5_config.table_filter = |_| true; // Do not ignore local IPs
config.upnp_enabled = false;
let config = Arc::new(config);
let beacon_processor_channels =
BeaconProcessorChannels::new(&BeaconProcessorConfig::default());
NetworkService::build(
beacon_chain.clone(),
&config,
config,
executor.clone(),
None,
beacon_processor_channels.beacon_processor_tx,