aboutsummaryrefslogtreecommitdiffstats
path: root/core/tx_pool.go
diff options
context:
space:
mode:
authorWenbiao Zheng <delweng@gmail.com>2018-09-03 23:33:21 +0800
committerFelix Lange <fjl@users.noreply.github.com>2018-09-03 23:33:21 +0800
commit6a33954731658667056466bf7573ed1c397f4750 (patch)
treed61c7672f1b0f451587efce656b94db3e187c4cc /core/tx_pool.go
parent6fc84946203929143c51010e0a10d9fa61fb9b92 (diff)
downloadgo-tangerine-6a33954731658667056466bf7573ed1c397f4750.tar
go-tangerine-6a33954731658667056466bf7573ed1c397f4750.tar.gz
go-tangerine-6a33954731658667056466bf7573ed1c397f4750.tar.bz2
go-tangerine-6a33954731658667056466bf7573ed1c397f4750.tar.lz
go-tangerine-6a33954731658667056466bf7573ed1c397f4750.tar.xz
go-tangerine-6a33954731658667056466bf7573ed1c397f4750.tar.zst
go-tangerine-6a33954731658667056466bf7573ed1c397f4750.zip
core, eth, trie: use common/prque (#17508)
Diffstat (limited to 'core/tx_pool.go')
-rw-r--r--core/tx_pool.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/tx_pool.go b/core/tx_pool.go
index 46ae2759b..a0a6ff851 100644
--- a/core/tx_pool.go
+++ b/core/tx_pool.go
@@ -26,13 +26,13 @@ import (
"time"
"github.com/ethereum/go-ethereum/common"
+ "github.com/ethereum/go-ethereum/common/prque"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/event"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/metrics"
"github.com/ethereum/go-ethereum/params"
- "gopkg.in/karalabe/cookiejar.v2/collections/prque"
)
const (
@@ -987,11 +987,11 @@ func (pool *TxPool) promoteExecutables(accounts []common.Address) {
if pending > pool.config.GlobalSlots {
pendingBeforeCap := pending
// Assemble a spam order to penalize large transactors first
- spammers := prque.New()
+ spammers := prque.New(nil)
for addr, list := range pool.pending {
// Only evict transactions from high rollers
if !pool.locals.contains(addr) && uint64(list.Len()) > pool.config.AccountSlots {
- spammers.Push(addr, float32(list.Len()))
+ spammers.Push(addr, int64(list.Len()))
}
}
// Gradually drop transactions from offenders