mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
This commit is contained in:
parent
0fe8742241
commit
a9db265d4e
1 changed files with 4 additions and 0 deletions
|
|
@ -21,6 +21,7 @@ import (
|
|||
"fmt"
|
||||
"maps"
|
||||
"math/big"
|
||||
"slices"
|
||||
"sort"
|
||||
"time"
|
||||
|
||||
|
|
@ -205,6 +206,9 @@ func (s *StateDB) Logs() []*types.Log {
|
|||
for _, lgs := range s.logs {
|
||||
logs = append(logs, lgs...)
|
||||
}
|
||||
slices.SortFunc(logs, func(a, b *types.Log) int {
|
||||
return int(a.Index) - int(b.Index)
|
||||
})
|
||||
return logs
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue