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

+2 -2
View File
@@ -906,9 +906,9 @@ ServiceBuilder<
let network = Arc::downgrade(&network);
let transaction_pool_ = transaction_pool.clone();
let events = transaction_pool.import_notification_stream()
.for_each(move |_| {
.for_each(move |hash| {
if let Some(network) = network.upgrade() {
network.trigger_repropagate();
network.propagate_extrinsic(hash);
}
let status = transaction_pool_.status();
telemetry!(SUBSTRATE_INFO; "txpool.import";