@@ -43,22 +43,22 @@ fn blockifier(
4343 // convert to blockifier block context
4444 let block_context = block_context_from_envs ( chain_spec, block_envs, None ) ;
4545
46- // group.bench_function("Blockifier.Cold", |b| {
47- // // we need to set up the cached state for each iteration as it's not cloneable
48- // b.iter_batched(
49- // || {
50- // // setup state
51- // let state = provider.latest().expect("failed to get latest state");
52- // let state = CachedState::new(StateProviderDb::new(state));
46+ group. bench_function ( "Blockifier.Cold" , |b| {
47+ // we need to set up the cached state for each iteration as it's not cloneable
48+ b. iter_batched (
49+ || {
50+ // setup state
51+ let state = provider. latest ( ) . expect ( "failed to get latest state" ) ;
52+ let state = CachedState :: new ( StateProviderDb :: new ( state) ) ;
5353
54- // (state, &block_context, execution_flags, tx.clone())
55- // },
56- // |(mut state, block_context, flags, tx)| {
57- // transact(&mut state, block_context, flags, tx, None)
58- // },
59- // BatchSize::SmallInput,
60- // )
61- // });
54+ ( state, & block_context, execution_flags, tx. clone ( ) )
55+ } ,
56+ |( mut state, block_context, flags, tx) | {
57+ transact ( & mut state, block_context, flags, tx, None )
58+ } ,
59+ BatchSize :: SmallInput ,
60+ )
61+ } ) ;
6262}
6363
6464criterion_group ! {
0 commit comments