diff --git a/client/transaction-pool/src/graph/pool.rs b/client/transaction-pool/src/graph/pool.rs index 9c747ade1229a..c895fdf12f3b9 100644 --- a/client/transaction-pool/src/graph/pool.rs +++ b/client/transaction-pool/src/graph/pool.rs @@ -271,14 +271,23 @@ impl Pool { // if it's not found in the pool query the runtime at parent block // to get validity info and tags that the extrinsic provides. None => { - let validity = self - .validated_pool - .api() - .validate_transaction(parent, TransactionSource::InBlock, extrinsic.clone()) - .await; - - if let Ok(Ok(validity)) = validity { - future_tags.extend(validity.provides); + // Avoid validating block txs if the pool is empty + if !self.validated_pool.status().is_empty() { + let validity = self + .validated_pool + .api() + .validate_transaction( + parent, + TransactionSource::InBlock, + extrinsic.clone(), + ) + .await; + + if let Ok(Ok(validity)) = validity { + future_tags.extend(validity.provides); + } + } else { + log::trace!(target: "txpool", "txpool is empty, skipping validation for block {at:?}"); } }, }