core/state: add iterator check

This commit is contained in:
Gary Rong 2023-08-23 15:02:18 +08:00
parent e923d89d52
commit ea2fd607b0

View file

@ -1060,6 +1060,9 @@ func (s *StateDB) fastDeleteStorage(addrHash common.Hash, root common.Hash) (boo
return false, 0, nil, nil, err
}
}
if iter.Error() != nil {
return false, 0, nil, nil, err
}
if stack.Hash() != root {
return false, 0, nil, nil, fmt.Errorf("snapshot is not matched, exp %x, got %x", root, stack.Hash())
}