From 26fbb4046ef9e6bf87b04df277daa67bc50a0941 Mon Sep 17 00:00:00 2001 From: maskpp Date: Sun, 2 Nov 2025 22:38:12 +0800 Subject: [PATCH] Update core/state/statedb.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- core/state/statedb.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/state/statedb.go b/core/state/statedb.go index 270b5f64ac..aeab91abf1 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -267,7 +267,7 @@ func (s *StateDB) Logs() []*types.Log { } // 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 + return logs[i].TxIndex < logs[j].TxIndex || (logs[i].TxIndex == logs[j].TxIndex && logs[i].Index < logs[j].Index) }) return logs }