Fix quadratic iterations over transaction pool (#4736)

* transaction pool changes

* service & network changes

* address review

* reduce future pool
This commit is contained in:
Nikolay Volf authored and Gavin Wood committed 2020-01-27 18:26:42 +01:00
1 parent 76acc96f3a
commit ed3da9f903
12 files changed
+102 -37

No files matched your search

+5 -1
View File
@@ -180,7 +180,7 @@ impl<PoolApi, Block> TransactionPool for BasicPool<PoolApi, Block>
Box::new(self.pool.ready())
}
fn import_notification_stream(&self) -> ImportNotificationStream {
fn import_notification_stream(&self) -> ImportNotificationStream<TxHash<Self>> {
self.pool.import_notification_stream()
}
@@ -191,6 +191,10 @@ impl<PoolApi, Block> TransactionPool for BasicPool<PoolApi, Block>
fn on_broadcasted(&self, propagations: HashMap<TxHash<Self>, Vec<String>>) {
self.pool.on_broadcasted(propagations)
}
fn ready_transaction(&self, hash: &TxHash<Self>) -> Option<Arc<Self::InPoolTransaction>> {
self.pool.ready_transaction(hash)
}
}
#[cfg_attr(test, derive(Debug))]