File tree Expand file tree Collapse file tree
crates/blockchain-tree/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -263,10 +263,6 @@ impl AppendableChain {
263263 vec ! [ snapshot. unwrap_or_default( ) ] ,
264264 ) ;
265265
266- // stop the prefetch task.
267- #[ cfg( feature = "prefetch" ) ]
268- let _ = interrupt_tx. send ( ( ) ) ;
269-
270266 // check state root if the block extends the canonical chain __and__ if state root
271267 // validation was requested.
272268 if block_validation_kind. is_exhaustive ( ) {
@@ -299,8 +295,17 @@ impl AppendableChain {
299295 "Validated state root"
300296 ) ;
301297
298+ // stop the prefetch task.
299+ #[ cfg( feature = "prefetch" ) ]
300+ let _ = interrupt_tx. send ( ( ) ) ;
301+
302302 Ok ( ( initial_execution_outcome, trie_updates) )
303303 } else {
304+
305+ // stop the prefetch task.
306+ #[ cfg( feature = "prefetch" ) ]
307+ let _ = interrupt_tx. send ( ( ) ) ;
308+
304309 Ok ( ( initial_execution_outcome, None ) )
305310 }
306311 }
You can’t perform that action at this time.
0 commit comments