refactor(engine): use spawn_blocking_named for tx_iterator thread (#22522)

Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Georgios Konstantopoulos
2026-02-24 03:07:19 -08:00
committed by GitHub
parent 2827b0aca0
commit 7faca05344

View File

@@ -416,9 +416,7 @@ where
transaction_count,
"using sequential sig recovery for small block"
);
self.executor.spawn_blocking(move || {
let _enter =
debug_span!(target: "engine::tree::payload_processor", "tx_iterator").entered();
self.executor.spawn_blocking_named("tx-iterator", move || {
let (transactions, convert) = transactions.into_parts();
convert_serial(transactions.into_iter(), &convert, &prewarm_tx, &execute_tx);
});
@@ -430,9 +428,7 @@ where
// few transactions are recovered sequentially and sent immediately before
// entering the parallel iterator for the remainder.
let prefetch = Self::PARALLEL_PREFETCH_COUNT.min(transaction_count);
self.executor.spawn_blocking(move || {
let _enter =
debug_span!(target: "engine::tree::payload_processor", "tx_iterator").entered();
self.executor.spawn_blocking_named("tx-iterator", move || {
let (transactions, convert) = transactions.into_parts();
let mut all: Vec<_> = transactions.into_iter().collect();
let rest = all.split_off(prefetch.min(all.len()));