mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-09 09:27:24 +00:00
Fix quadratic iterations over transaction pool (#4736)
* transaction pool changes * service & network changes * address review * reduce future pool
This commit is contained in:
@@ -160,7 +160,7 @@ impl<Hash: hash::Hash + Eq + Clone, Ex> FutureTransactions<Hash, Ex> {
|
||||
}
|
||||
|
||||
/// Returns a list of known transactions
|
||||
pub fn by_hash(&self, hashes: &[Hash]) -> Vec<Option<Arc<Transaction<Hash, Ex>>>> {
|
||||
pub fn by_hashes(&self, hashes: &[Hash]) -> Vec<Option<Arc<Transaction<Hash, Ex>>>> {
|
||||
hashes.iter().map(|h| self.waiting.get(h).map(|x| x.transaction.clone())).collect()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user