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:
committed by
Marek Kotewicz
parent
4817b94d0b
commit
4938d5dde5
@@ -30,7 +30,7 @@ use test_helpers::{
|
||||
use types::filter::Filter;
|
||||
use ethereum_types::{U256, Address};
|
||||
use kvdb_rocksdb::{Database, DatabaseConfig};
|
||||
use miner::Miner;
|
||||
use miner::{Miner, PendingOrdering};
|
||||
use spec::Spec;
|
||||
use views::BlockView;
|
||||
use ethkey::KeyPair;
|
||||
@@ -343,12 +343,12 @@ fn does_not_propagate_delayed_transactions() {
|
||||
|
||||
client.miner().import_own_transaction(&*client, tx0).unwrap();
|
||||
client.miner().import_own_transaction(&*client, tx1).unwrap();
|
||||
assert_eq!(0, client.ready_transactions().len());
|
||||
assert_eq!(0, client.miner().ready_transactions(&*client).len());
|
||||
assert_eq!(0, client.ready_transactions(10).len());
|
||||
assert_eq!(0, client.miner().ready_transactions(&*client, 10, PendingOrdering::Priority).len());
|
||||
push_blocks_to_client(&client, 53, 2, 2);
|
||||
client.flush_queue();
|
||||
assert_eq!(2, client.ready_transactions().len());
|
||||
assert_eq!(2, client.miner().ready_transactions(&*client).len());
|
||||
assert_eq!(2, client.ready_transactions(10).len());
|
||||
assert_eq!(2, client.miner().ready_transactions(&*client, 10, PendingOrdering::Priority).len());
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user