@@ -411,6 +411,7 @@ where
411
411
412
412
// execute extrinsics
413
413
let ( header, extrinsics) = block. deconstruct( ) ;
414
+
414
415
Self :: execute_extrinsics_with_book_keeping( extrinsics, * header. number( ) ) ;
415
416
416
417
if !signature_batching. verify( ) {
@@ -459,7 +460,7 @@ where
459
460
) . collect( ) ;
460
461
let shuffled_extrinsics = extrinsic_shuffler:: shuffle_using_seed( extrinsics_with_author, & header. seed( ) . seed) ;
461
462
462
- Self :: execute_extrinsics_with_book_keeping ( shuffled_extrinsics, * header. number( ) ) ;
463
+ Self :: execute_extrinsics_impl ( shuffled_extrinsics, * header. number( ) ) ;
463
464
464
465
if !signature_batching. verify( ) {
465
466
panic!( "Signature verification failed." ) ;
@@ -488,6 +489,38 @@ where
488
489
Self :: idle_and_finalize_hook ( block_number) ;
489
490
}
490
491
492
+ #[ cfg( not( feature = "disable-execution" ) ) ]
493
+ /// regular impl execute inherents & extrinsics
494
+ fn execute_extrinsics_impl (
495
+ extrinsics : Vec < Block :: Extrinsic > ,
496
+ block_number : NumberFor < Block > ,
497
+ ) {
498
+ Self :: execute_extrinsics_with_book_keeping ( extrinsics, block_number)
499
+ }
500
+
501
+ #[ cfg( feature = "disable-execution" ) ]
502
+ /// impl for benchmark - execute inherents only
503
+ fn execute_extrinsics_impl (
504
+ extrinsics : Vec < Block :: Extrinsic > ,
505
+ block_number : NumberFor < Block > ,
506
+ ) {
507
+ extrinsics. into_iter ( )
508
+ . filter ( |e| !e. is_signed ( ) . unwrap ( ) )
509
+ . for_each ( |e| {
510
+ if let Err ( e) = Self :: apply_extrinsic ( e) {
511
+ let err: & ' static str = e. into ( ) ;
512
+ panic ! ( "{}" , err)
513
+ }
514
+ } ) ;
515
+
516
+ // post-extrinsics book-keeping
517
+ <frame_system:: Pallet < System > >:: note_finished_extrinsics ( ) ;
518
+
519
+ Self :: idle_and_finalize_hook ( block_number) ;
520
+ }
521
+
522
+
523
+
491
524
/// Finalize the block - it is up the caller to ensure that all header fields are valid
492
525
/// except state-root.
493
526
pub fn finalize_block ( ) -> System :: Header {
0 commit comments