Skip to content

Commit d570cec

Browse files
change interrupt time
1 parent e083acd commit d570cec

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

crates/blockchain-tree/src/chain.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)