@@ -108,7 +108,7 @@ where
108108 let rpc = ws_client ( & block_ws_uri) . await ?;
109109
110110 // If --from and --to is passed, they take precedence over LiveState --at.
111- if let ( Some ( from) , Some ( to) ) = ( command. from , command. to ) {
111+ if let ( Some ( from) , Some ( to) ) = ( command. from , command. to ) {
112112 if from > to {
113113 return Err ( sc_cli:: Error :: Application (
114114 format ! ( "--from ({from}) must be less than or equal to --to ({to})" ) . into ( ) ,
@@ -135,13 +135,14 @@ where
135135
136136 log:: info!( target: LOG_TARGET , "hash found, block number: {block_number}, hash: {hash}" ) ;
137137
138- let header = ChainApi :: < ( ) , Block :: Hash , Block :: Header , SignedBlock < Block > > :: header (
139- & rpc,
140- Some ( hash) ,
141- )
142- . await
143- . map_err ( rpc_err_handler) ?
144- . expect ( "hash exists, header should exist;" ) ;
138+ let header =
139+ ChainApi :: < ( ) , Block :: Hash , Block :: Header , SignedBlock < Block > > :: header (
140+ & rpc,
141+ Some ( hash) ,
142+ )
143+ . await
144+ . map_err ( rpc_err_handler) ?
145+ . expect ( "hash exists, header should exist;" ) ;
145146
146147 let live_state = LiveState {
147148 uri : vec ! [ block_ws_uri. clone( ) ] ,
@@ -151,13 +152,9 @@ where
151152 child_tree : Default :: default ( ) ,
152153 } ;
153154
154- let _ = execute_block :: < Block , HostFns > (
155- & shared,
156- & command,
157- & executor,
158- & rpc,
159- live_state,
160- ) . await ;
155+ let _ =
156+ execute_block :: < Block , HostFns > ( & shared, & command, & executor, & rpc, live_state)
157+ . await ;
161158 }
162159 }
163160
0 commit comments