mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-11 15:34:26 +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"
|
"fmt"
|
||||||
"maps"
|
"maps"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
"slices"
|
||||||
"sort"
|
"sort"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
|
@ -205,6 +206,9 @@ func (s *StateDB) Logs() []*types.Log {
|
||||||
for _, lgs := range s.logs {
|
for _, lgs := range s.logs {
|
||||||
logs = append(logs, lgs...)
|
logs = append(logs, lgs...)
|
||||||
}
|
}
|
||||||
|
slices.SortFunc(logs, func(a, b *types.Log) int {
|
||||||
|
return int(a.Index) - int(b.Index)
|
||||||
|
})
|
||||||
return logs
|
return logs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue