mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-08 01:58:00 +00:00
Add performance tracing to validate_transaction (#5671)
* Validate transaction timeouts * Add timing * Add tracing to transaction validation. * Fix docs. Co-authored-by: NikVolf <nikvolf@gmail.com>
This commit is contained in:
@@ -89,12 +89,17 @@ impl<Client, Block> sc_transaction_graph::ChainApi for FullChainApi<Client, Bloc
|
||||
let at = at.clone();
|
||||
|
||||
self.pool.spawn_ok(futures_diagnose::diagnose("validate-transaction", async move {
|
||||
let span = tracing::span!(tracing::Level::DEBUG, "validate_transaction::check_version");
|
||||
let guard = span.enter();
|
||||
let runtime_api = client.runtime_api();
|
||||
let has_v2 = runtime_api
|
||||
.has_api_with::<dyn TaggedTransactionQueue<Self::Block, Error=()>, _>(
|
||||
&at, |v| v >= 2,
|
||||
)
|
||||
.unwrap_or_default();
|
||||
std::mem::drop(guard);
|
||||
let span = tracing::span!(tracing::Level::DEBUG, "validate_transaction");
|
||||
let _guard = span.enter();
|
||||
let res = if has_v2 {
|
||||
runtime_api.validate_transaction(&at, source, uxt)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user