Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions db/trie/mptrie/sortedlist.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package mptrie

import (
"slices"
"sort"
)

Expand Down Expand Up @@ -31,9 +32,7 @@ func (sl *SortedList) sort() {
if sl.sorted {
return
}
sort.Slice(sl.li, func(i, j int) bool {
return sl.li[i] < sl.li[j]
})
slices.Sort(sl.li)
sl.sorted = true
}

Expand Down
4 changes: 2 additions & 2 deletions state/factory/workingset.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package factory
import (
"context"
"math/big"
"sort"
"slices"
"time"

erigonstate "github.com/erigontech/erigon/core/state"
Expand Down Expand Up @@ -455,7 +455,7 @@ func (ws *workingSet) checkNonceContinuity(ctx context.Context, accountNonceMap
if err != nil {
return errors.Wrapf(err, "failed to get the confirmed nonce of address %s", srcAddr)
}
sort.Slice(receivedNonces, func(i, j int) bool { return receivedNonces[i] < receivedNonces[j] })
slices.Sort(receivedNonces)
if useZeroNonce {
pendingNonce = confirmedState.PendingNonceConsideringFreshAccount()
} else {
Expand Down