@@ -142,7 +142,7 @@ where
142142 rlp_path : & Path ,
143143 ) -> Result < ( ) >
144144 where
145- N : NodeBuilderHelper ,
145+ N : NodeBuilderHelper < Payload = I > ,
146146 LocalPayloadAttributesBuilder < N :: ChainSpec > : PayloadAttributesBuilder <
147147 <<N as NodeTypes >:: Payload as PayloadTypes >:: PayloadAttributes ,
148148 > ,
@@ -158,7 +158,7 @@ where
158158 rlp_path : & Path ,
159159 ) -> Result < ( ) >
160160 where
161- N : NodeBuilderHelper ,
161+ N : NodeBuilderHelper < Payload = I > ,
162162 LocalPayloadAttributesBuilder < N :: ChainSpec > : PayloadAttributesBuilder <
163163 <<N as NodeTypes >:: Payload as PayloadTypes >:: PayloadAttributes ,
164164 > ,
@@ -175,6 +175,7 @@ where
175175 . ok_or_else ( || eyre ! ( "Failed to create HTTP RPC client for node" ) ) ?;
176176 let auth = node. auth_server_handle ( ) ;
177177 let url = node. rpc_url ( ) ;
178+ // TODO: Pass beacon_engine_handle once import system supports generic types
178179 node_clients. push ( crate :: testsuite:: NodeClient :: new ( rpc, auth, url) ) ;
179180 }
180181
@@ -189,7 +190,7 @@ where
189190 /// Apply the setup to the environment
190191 pub async fn apply < N > ( & mut self , env : & mut Environment < I > ) -> Result < ( ) >
191192 where
192- N : NodeBuilderHelper ,
193+ N : NodeBuilderHelper < Payload = I > ,
193194 LocalPayloadAttributesBuilder < N :: ChainSpec > : PayloadAttributesBuilder <
194195 <<N as NodeTypes >:: Payload as PayloadTypes >:: PayloadAttributes ,
195196 > ,
@@ -201,7 +202,7 @@ where
201202 /// Apply the setup to the environment
202203 async fn apply_ < N > ( & mut self , env : & mut Environment < I > ) -> Result < ( ) >
203204 where
204- N : NodeBuilderHelper ,
205+ N : NodeBuilderHelper < Payload = I > ,
205206 LocalPayloadAttributesBuilder < N :: ChainSpec > : PayloadAttributesBuilder <
206207 <<N as NodeTypes >:: Payload as PayloadTypes >:: PayloadAttributes ,
207208 > ,
@@ -236,13 +237,7 @@ where
236237 Ok ( ( nodes, executor, _wallet) ) => {
237238 // create HTTP clients for each node's RPC and Engine API endpoints
238239 for node in & nodes {
239- let rpc = node
240- . rpc_client ( )
241- . ok_or_else ( || eyre ! ( "Failed to create HTTP RPC client for node" ) ) ?;
242- let auth = node. auth_server_handle ( ) ;
243- let url = node. rpc_url ( ) ;
244-
245- node_clients. push ( crate :: testsuite:: NodeClient :: new ( rpc, auth, url) ) ;
240+ node_clients. push ( node. to_node_client ( ) ?) ;
246241 }
247242
248243 // spawn a separate task just to handle the shutdown
@@ -274,7 +269,7 @@ where
274269 rlp_path : & Path ,
275270 ) -> Result < crate :: setup_import:: ChainImportResult >
276271 where
277- N : NodeBuilderHelper ,
272+ N : NodeBuilderHelper < Payload = I > ,
278273 LocalPayloadAttributesBuilder < N :: ChainSpec > : PayloadAttributesBuilder <
279274 <<N as NodeTypes >:: Payload as PayloadTypes >:: PayloadAttributes ,
280275 > ,
@@ -309,7 +304,7 @@ where
309304 & self ,
310305 ) -> impl Fn ( u64 ) -> <<N as NodeTypes >:: Payload as PayloadTypes >:: PayloadBuilderAttributes + Copy
311306 where
312- N : NodeBuilderHelper ,
307+ N : NodeBuilderHelper < Payload = I > ,
313308 LocalPayloadAttributesBuilder < N :: ChainSpec > : PayloadAttributesBuilder <
314309 <<N as NodeTypes >:: Payload as PayloadTypes >:: PayloadAttributes ,
315310 > ,
@@ -332,7 +327,7 @@ where
332327 async fn finalize_setup (
333328 & self ,
334329 env : & mut Environment < I > ,
335- node_clients : Vec < crate :: testsuite:: NodeClient > ,
330+ node_clients : Vec < crate :: testsuite:: NodeClient < I > > ,
336331 use_latest_block : bool ,
337332 ) -> Result < ( ) > {
338333 if node_clients. is_empty ( ) {
@@ -394,10 +389,13 @@ where
394389 }
395390
396391 /// Wait for all nodes to be ready to accept RPC requests
397- async fn wait_for_nodes_ready (
392+ async fn wait_for_nodes_ready < P > (
398393 & self ,
399- node_clients : & [ crate :: testsuite:: NodeClient ] ,
400- ) -> Result < ( ) > {
394+ node_clients : & [ crate :: testsuite:: NodeClient < P > ] ,
395+ ) -> Result < ( ) >
396+ where
397+ P : PayloadTypes ,
398+ {
401399 for ( idx, client) in node_clients. iter ( ) . enumerate ( ) {
402400 let mut retry_count = 0 ;
403401 const MAX_RETRIES : usize = 10 ;
@@ -423,11 +421,14 @@ where
423421 }
424422
425423 /// Get block info for a given block number or tag
426- async fn get_block_info (
424+ async fn get_block_info < P > (
427425 & self ,
428- client : & crate :: testsuite:: NodeClient ,
426+ client : & crate :: testsuite:: NodeClient < P > ,
429427 block : BlockNumberOrTag ,
430- ) -> Result < crate :: testsuite:: BlockInfo > {
428+ ) -> Result < crate :: testsuite:: BlockInfo >
429+ where
430+ P : PayloadTypes ,
431+ {
431432 let block = client
432433 . get_block_by_number ( block)
433434 . await ?
0 commit comments