mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-28 14:47:16 +00:00
Revert change to (*PendingPool) EnforceBestInvariants() (#537)
This commit is contained in:
parent
114da7eca3
commit
046e4165b5
@ -25,6 +25,7 @@ import (
|
||||
"fmt"
|
||||
"math"
|
||||
"runtime"
|
||||
"sort"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
@ -48,7 +49,6 @@ import (
|
||||
"github.com/ledgerwatch/erigon-lib/types"
|
||||
"github.com/ledgerwatch/log/v3"
|
||||
"go.uber.org/atomic"
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -2041,7 +2041,7 @@ func (p *PendingPool) EnforceWorstInvariants() {
|
||||
heap.Init(p.worst)
|
||||
}
|
||||
func (p *PendingPool) EnforceBestInvariants() {
|
||||
slices.SortFunc(p.best.ms, func(i, j *metaTx) bool { return i.better(j, p.best.pendingBaseFee) })
|
||||
sort.Sort(p.best)
|
||||
}
|
||||
|
||||
func (p *PendingPool) Best() *metaTx { //nolint
|
||||
|
Loading…
Reference in New Issue
Block a user