perf(tree): do not wait for the sparse trie to drop (#15092)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
Alexey Shekhirin
2025-03-17 21:56:24 +00:00
committed by GitHub
parent 9cdfcf57b9
commit 59ef9d9309

View File

@@ -49,7 +49,10 @@ where
/// This waits for new incoming [`SparseTrieUpdate`].
///
/// This concludes once the last trie update has been received.
pub(super) fn run(self) -> Result<StateRootComputeOutcome, ParallelStateRootError> {
///
/// NOTE: This function does not take `self` by value to prevent blocking on [`SparseStateTrie`]
/// drop.
pub(super) fn run(&self) -> Result<StateRootComputeOutcome, ParallelStateRootError> {
let now = Instant::now();
let provider_ro = self.config.consistent_view.provider_ro()?;
let in_memory_trie_cursor = InMemoryTrieCursorFactory::new(