From 479b8031dc61ba01001d3cf086d04ea4d4980a17 Mon Sep 17 00:00:00 2001 From: GarmashAlex Date: Mon, 22 Sep 2025 05:30:29 +0300 Subject: [PATCH] core/state: fix committed-state expectations in StateDB tests (#32678) --- core/state/statedb_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/state/statedb_test.go b/core/state/statedb_test.go index 147546a3c7..661d17bb7b 100644 --- a/core/state/statedb_test.go +++ b/core/state/statedb_test.go @@ -772,7 +772,7 @@ func TestCopyCommitCopy(t *testing.T) { t.Fatalf("second copy non-committed storage slot mismatch: have %x, want %x", val, sval) } if val := copyTwo.GetCommittedState(addr, skey); val != (common.Hash{}) { - t.Fatalf("second copy committed storage slot mismatch: have %x, want %x", val, sval) + t.Fatalf("second copy committed storage slot mismatch: have %x, want %x", val, common.Hash{}) } // Commit state, ensure states can be loaded from disk root, _ := state.Commit(0, false, false) @@ -859,7 +859,7 @@ func TestCopyCopyCommitCopy(t *testing.T) { t.Fatalf("third copy non-committed storage slot mismatch: have %x, want %x", val, sval) } if val := copyThree.GetCommittedState(addr, skey); val != (common.Hash{}) { - t.Fatalf("third copy committed storage slot mismatch: have %x, want %x", val, sval) + t.Fatalf("third copy committed storage slot mismatch: have %x, want %x", val, common.Hash{}) } } @@ -912,10 +912,10 @@ func TestCommitCopy(t *testing.T) { } // Slots cached in the stateDB, available after commit if val := copied.GetState(addr, skey2); val != sval2 { - t.Fatalf("unexpected storage slot: have %x", sval1) + t.Fatalf("unexpected storage slot: have %x, want %x", val, sval2) } if val := copied.GetCommittedState(addr, skey2); val != sval2 { - t.Fatalf("unexpected storage slot: have %x", val) + t.Fatalf("unexpected storage slot: have %x, want %x", val, sval2) } }