mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Update core/txpool/legacypool/list.go
Co-authored-by: Martin HS <martin@swende.se>
This commit is contained in:
parent
7f5b1474eb
commit
26b8affead
1 changed files with 1 additions and 1 deletions
|
|
@ -160,7 +160,7 @@ func (m *sortedMap) Cap(threshold int) types.Transactions {
|
||||||
// Otherwise gather and drop the highest nonce'd transactions
|
// Otherwise gather and drop the highest nonce'd transactions
|
||||||
var drops types.Transactions
|
var drops types.Transactions
|
||||||
|
|
||||||
sort.Sort(*m.index) // the sorted array is a heap, so no need to reheap after deleting tail items
|
slices.Sort(*m.index) // the sorted array is a heap, so no need to reheap after deleting tail items
|
||||||
for size := len(m.items); size > threshold; size-- {
|
for size := len(m.items); size > threshold; size-- {
|
||||||
drops = append(drops, m.items[(*m.index)[size-1]])
|
drops = append(drops, m.items[(*m.index)[size-1]])
|
||||||
delete(m.items, (*m.index)[size-1])
|
delete(m.items, (*m.index)[size-1])
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue