Skip to content

Commit 479b803

Browse files
authored
core/state: fix committed-state expectations in StateDB tests (#32678)
1 parent 4414e28 commit 479b803

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

core/state/statedb_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ func TestCopyCommitCopy(t *testing.T) {
772772
t.Fatalf("second copy non-committed storage slot mismatch: have %x, want %x", val, sval)
773773
}
774774
if val := copyTwo.GetCommittedState(addr, skey); val != (common.Hash{}) {
775-
t.Fatalf("second copy committed storage slot mismatch: have %x, want %x", val, sval)
775+
t.Fatalf("second copy committed storage slot mismatch: have %x, want %x", val, common.Hash{})
776776
}
777777
// Commit state, ensure states can be loaded from disk
778778
root, _ := state.Commit(0, false, false)
@@ -859,7 +859,7 @@ func TestCopyCopyCommitCopy(t *testing.T) {
859859
t.Fatalf("third copy non-committed storage slot mismatch: have %x, want %x", val, sval)
860860
}
861861
if val := copyThree.GetCommittedState(addr, skey); val != (common.Hash{}) {
862-
t.Fatalf("third copy committed storage slot mismatch: have %x, want %x", val, sval)
862+
t.Fatalf("third copy committed storage slot mismatch: have %x, want %x", val, common.Hash{})
863863
}
864864
}
865865

@@ -912,10 +912,10 @@ func TestCommitCopy(t *testing.T) {
912912
}
913913
// Slots cached in the stateDB, available after commit
914914
if val := copied.GetState(addr, skey2); val != sval2 {
915-
t.Fatalf("unexpected storage slot: have %x", sval1)
915+
t.Fatalf("unexpected storage slot: have %x, want %x", val, sval2)
916916
}
917917
if val := copied.GetCommittedState(addr, skey2); val != sval2 {
918-
t.Fatalf("unexpected storage slot: have %x", val)
918+
t.Fatalf("unexpected storage slot: have %x, want %x", val, sval2)
919919
}
920920
}
921921

0 commit comments

Comments
 (0)