mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 20:56:42 +00:00
Update core/state/statedb.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
e8731404d0
commit
9b9c13880d
1 changed files with 1 additions and 1 deletions
|
|
@ -265,7 +265,7 @@ func (s *StateDB) Logs() []*types.Log {
|
|||
for _, lgs := range s.logs {
|
||||
logs = append(logs, lgs...)
|
||||
}
|
||||
// Due to the map iteration is not stable, we need to sort the logs by TxIndex, then the LogsHash result is stable.
|
||||
// Because map iteration is not stable, we need to sort the logs by TxIndex, then the LogsHash result is stable.
|
||||
sort.Slice(logs, func(i, j int) bool {
|
||||
return logs[i].TxIndex < logs[j].TxIndex
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue