fix bug about the statedb test case

This commit is contained in:
maskpp 2025-11-02 22:41:46 +08:00
parent 18a902799e
commit 697e0335af

View file

@ -641,7 +641,9 @@ func (test *snapshotTest) checkEqual(state, checkstate *StateDB) error {
{
have := state.transientStorage
want := checkstate.transientStorage
if !maps.EqualFunc(have, want, maps.Equal) {
if !maps.EqualFunc(have, want, func(hasStorage Storage, wantStorage Storage) bool {
return maps.Equal(hasStorage, wantStorage)
}) {
return fmt.Errorf("transient storage differs ,have\n%v\nwant\n%v",
have.PrettyPrint(),
want.PrettyPrint())