Remove comment on log sorting stability

Removed comment about sorting logs by TxIndex.
This commit is contained in:
rjl493456442 2025-11-04 20:12:47 +08:00 committed by GitHub
parent 207f434ca2
commit c69412548f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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
}) })