Limit the number of transactions in pending set (#8777)

* Unordered iterator.

* Use unordered and limited set if full not required.

* Split timeout work into smaller timers.

* Avoid collecting all pending transactions when mining

* Remove println.

* Use priority ordering in eth-filter.

* Fix ethcore-miner tests and tx propagation.

* Review grumbles addressed.

* Add test for unordered not populating the cache.

* Fix ethcore tests.

* Fix light tests.

* Fix ethcore-sync tests.

* Fix RPC tests.
This commit is contained in:
Tomasz Drwięga
2018-06-12 08:22:54 +02:00
committed by Tomasz Drwięga
parent 485acc5229
commit 54af59de02
25 changed files with 405 additions and 108 deletions

View File

@@ -306,7 +306,7 @@ impl FullDependencies {
let client = EthPubSubClient::new(self.client.clone(), self.remote.clone());
let h = client.handler();
self.miner.add_transactions_listener(Box::new(move |hashes| if let Some(h) = h.upgrade() {
h.new_transactions(hashes);
h.notify_new_transactions(hashes);
}));
if let Some(h) = client.handler().upgrade() {
@@ -527,7 +527,7 @@ impl<C: LightChainClient + 'static> LightDependencies<C> {
let h = client.handler();
self.transaction_queue.write().add_listener(Box::new(move |transactions| {
if let Some(h) = h.upgrade() {
h.new_transactions(transactions);
h.notify_new_transactions(transactions);
}
}));
handler.extend_with(EthPubSub::to_delegate(client));