@@ -206,10 +206,7 @@ impl<E: EthSpec> LocalNetwork<E> {
206206 beacon_config. network . enr_tcp4_port = Some ( BOOTNODE_PORT . try_into ( ) . expect ( "non zero" ) ) ;
207207 beacon_config. network . discv5_config . table_filter = |_| true ;
208208
209- let execution_node = LocalExecutionNode :: new (
210- self . context . service_context ( "boot_node_el" . into ( ) ) ,
211- mock_execution_config,
212- ) ;
209+ let execution_node = LocalExecutionNode :: new ( self . context . clone ( ) , mock_execution_config) ;
213210
214211 beacon_config. execution_layer = Some ( execution_layer:: Config {
215212 execution_endpoint : Some ( SensitiveUrl :: parse ( & execution_node. server . url ( ) ) . unwrap ( ) ) ,
@@ -218,11 +215,7 @@ impl<E: EthSpec> LocalNetwork<E> {
218215 ..Default :: default ( )
219216 } ) ;
220217
221- let beacon_node = LocalBeaconNode :: production (
222- self . context . service_context ( "boot_node" . into ( ) ) ,
223- beacon_config,
224- )
225- . await ?;
218+ let beacon_node = LocalBeaconNode :: production ( self . context . clone ( ) , beacon_config) . await ?;
226219
227220 Ok ( ( beacon_node, execution_node) )
228221 }
@@ -252,10 +245,7 @@ impl<E: EthSpec> LocalNetwork<E> {
252245 mock_execution_config. server_config . listen_port = EXECUTION_PORT + count;
253246
254247 // Construct execution node.
255- let execution_node = LocalExecutionNode :: new (
256- self . context . service_context ( format ! ( "node_{}_el" , count) ) ,
257- mock_execution_config,
258- ) ;
248+ let execution_node = LocalExecutionNode :: new ( self . context . clone ( ) , mock_execution_config) ;
259249
260250 // Pair the beacon node and execution node.
261251 beacon_config. execution_layer = Some ( execution_layer:: Config {
@@ -266,11 +256,7 @@ impl<E: EthSpec> LocalNetwork<E> {
266256 } ) ;
267257
268258 // Construct beacon node using the config,
269- let beacon_node = LocalBeaconNode :: production (
270- self . context . service_context ( format ! ( "node_{}" , count) ) ,
271- beacon_config,
272- )
273- . await ?;
259+ let beacon_node = LocalBeaconNode :: production ( self . context . clone ( ) , beacon_config) . await ?;
274260
275261 Ok ( ( beacon_node, execution_node) )
276262 }
@@ -343,9 +329,7 @@ impl<E: EthSpec> LocalNetwork<E> {
343329 beacon_node : usize ,
344330 validator_files : ValidatorFiles ,
345331 ) -> Result < ( ) , String > {
346- let context = self
347- . context
348- . service_context ( format ! ( "validator_{}" , beacon_node) ) ;
332+ let context = self . context . clone ( ) ;
349333 let self_1 = self . clone ( ) ;
350334 let socket_addr = {
351335 let read_lock = self . beacon_nodes . read ( ) ;
@@ -401,13 +385,10 @@ impl<E: EthSpec> LocalNetwork<E> {
401385 pub async fn add_validator_client_with_fallbacks (
402386 & self ,
403387 mut validator_config : ValidatorConfig ,
404- validator_index : usize ,
405388 beacon_nodes : Vec < usize > ,
406389 validator_files : ValidatorFiles ,
407390 ) -> Result < ( ) , String > {
408- let context = self
409- . context
410- . service_context ( format ! ( "validator_{}" , validator_index) ) ;
391+ let context = self . context . clone ( ) ;
411392 let self_1 = self . clone ( ) ;
412393 let mut beacon_node_urls = vec ! [ ] ;
413394 for beacon_node in beacon_nodes {
0 commit comments