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