@@ -196,11 +196,9 @@ impl EthereumNetworkAdapters {
196196 required_capabilities : & NodeCapabilities ,
197197 retest_percent : f64 ,
198198 ) -> Result < Arc < EthereumAdapter > , Error > {
199- let retest_rng: f64 = ( & mut rand:: thread_rng ( ) ) . gen ( ) ;
199+ let retest_rng: f64 = ( & mut rand:: rng ( ) ) . random ( ) ;
200200
201- let cheapest = input
202- . into_iter ( )
203- . choose_multiple ( & mut rand:: thread_rng ( ) , 3 ) ;
201+ let cheapest = input. into_iter ( ) . choose_multiple ( & mut rand:: rng ( ) , 3 ) ;
204202 let cheapest = cheapest. iter ( ) ;
205203
206204 // If request falls below the retest threshold, use this request to try and
@@ -231,7 +229,7 @@ impl EthereumNetworkAdapters {
231229 let cheapest = self . all_unverified_cheapest_with ( required_capabilities) ;
232230
233231 Self :: cheapest_from (
234- cheapest. choose_multiple ( & mut rand:: thread_rng ( ) , 3 ) ,
232+ cheapest. choose_multiple ( & mut rand:: rng ( ) , 3 ) ,
235233 required_capabilities,
236234 self . retest_percent ,
237235 )
@@ -245,7 +243,7 @@ impl EthereumNetworkAdapters {
245243 let cheapest = self
246244 . all_cheapest_with ( required_capabilities)
247245 . await
248- . choose_multiple ( & mut rand:: thread_rng ( ) , 3 ) ;
246+ . choose_multiple ( & mut rand:: rng ( ) , 3 ) ;
249247
250248 Self :: cheapest_from ( cheapest, required_capabilities, self . retest_percent )
251249 }
0 commit comments