diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-07-06 16:51:59 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2017-07-06 16:51:59 +0800 |
commit | 34ec9913f628180d0ace740abfe1362995879c93 (patch) | |
tree | ab65a577014ed72b7307b59e42fe9ded25c3420b /core/tx_list.go | |
parent | 88b4fe7d21bf03bbe01961dc49508bcf4edafb51 (diff) | |
download | dexon-34ec9913f628180d0ace740abfe1362995879c93.tar dexon-34ec9913f628180d0ace740abfe1362995879c93.tar.gz dexon-34ec9913f628180d0ace740abfe1362995879c93.tar.bz2 dexon-34ec9913f628180d0ace740abfe1362995879c93.tar.lz dexon-34ec9913f628180d0ace740abfe1362995879c93.tar.xz dexon-34ec9913f628180d0ace740abfe1362995879c93.tar.zst dexon-34ec9913f628180d0ace740abfe1362995879c93.zip |
core: test locals support in txpool queue limits, fix
The commit reworks the transaction pool queue limitation tests
to cater for testing local accounts, also testing the nolocal flag.
In addition, it also fixes a panic if local transactions exceeded
the global queue allowance (no accounts left to drop from) and also
fixes queue eviction to operate on all accounts, not just the one
being updated.
Diffstat (limited to 'core/tx_list.go')
-rw-r--r-- | core/tx_list.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/tx_list.go b/core/tx_list.go index 4593943be..0d87c20bc 100644 --- a/core/tx_list.go +++ b/core/tx_list.go @@ -477,7 +477,7 @@ func (l *txPricedList) Underpriced(tx *types.Transaction, local *accountSet) boo } // Discard finds a number of most underpriced transactions, removes them from the -// priced list and returs them for further removal from the entire pool. +// priced list and returns them for further removal from the entire pool. func (l *txPricedList) Discard(count int, local *accountSet) types.Transactions { drop := make(types.Transactions, 0, count) // Remote underpriced transactions to drop save := make(types.Transactions, 0, 64) // Local underpriced transactions to keep |