mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 07:01:05 +00:00
Quickly skip invalid transactions during block authorship. (#9789)
* Support skipping invalid transactions in the iterator. * Expose concrete iterator. * cargo +nightly fmt --all * More consistent placement. * Update Cargo.lock * Pass transaction to 'report_invalid'
This commit is contained in:
@@ -25,7 +25,7 @@ use std::{
|
||||
use futures::channel::mpsc::{channel, Sender};
|
||||
use parking_lot::{Mutex, RwLock};
|
||||
use retain_mut::RetainMut;
|
||||
use sc_transaction_pool_api::{error, PoolStatus};
|
||||
use sc_transaction_pool_api::{error, PoolStatus, ReadyTransactions};
|
||||
use serde::Serialize;
|
||||
use sp_runtime::{
|
||||
generic::BlockId,
|
||||
@@ -630,7 +630,7 @@ impl<B: ChainApi> ValidatedPool<B> {
|
||||
}
|
||||
|
||||
/// Get an iterator for ready transactions ordered by priority
|
||||
pub fn ready(&self) -> impl Iterator<Item = TransactionFor<B>> + Send {
|
||||
pub fn ready(&self) -> impl ReadyTransactions<Item = TransactionFor<B>> + Send {
|
||||
self.pool.read().ready()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user