Skip to content

Commit 28fa3ad

Browse files
committed
core/txpool/legacypool: remove redundant check for floatingRatio ethereum#27477
1 parent 44771b7 commit 28fa3ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/txpool/legacypool/list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ func (l *pricedList) underpricedFor(h *priceHeap, tx *types.Transaction) bool {
618618
func (l *pricedList) Discard(slots int, force bool) (types.Transactions, bool) {
619619
drop := make(types.Transactions, 0, slots) // Remote underpriced transactions to drop
620620
for slots > 0 {
621-
if len(l.urgent.list)*floatingRatio > len(l.floating.list)*urgentRatio || floatingRatio == 0 {
621+
if len(l.urgent.list)*floatingRatio > len(l.floating.list)*urgentRatio {
622622
// Discard stale transactions if found during cleanup
623623
tx := heap.Pop(&l.urgent).(*types.Transaction)
624624
if l.all.GetRemote(tx.Hash()) == nil { // Removed or migrated

0 commit comments

Comments
 (0)