mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 20:56:42 +00:00
Remove comment on log sorting stability
Removed comment about sorting logs by TxIndex.
This commit is contained in:
parent
207f434ca2
commit
c69412548f
1 changed files with 0 additions and 1 deletions
|
|
@ -265,7 +265,6 @@ func (s *StateDB) Logs() []*types.Log {
|
||||||
for _, lgs := range s.logs {
|
for _, lgs := range s.logs {
|
||||||
logs = append(logs, lgs...)
|
logs = append(logs, lgs...)
|
||||||
}
|
}
|
||||||
// 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 {
|
sort.Slice(logs, func(i, j int) bool {
|
||||||
return logs[i].Index < logs[j].Index
|
return logs[i].Index < logs[j].Index
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue