Merge pull request #760 from nspcc-dev/fix-contract-storage-migration

core: fix contract's state migration and don't swallow errors
This commit is contained in:
Roman Khimov 2020-03-16 12:25:15 +03:00 committed by GitHub
commit cff6e226dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -579,7 +579,10 @@ func (ic *interopContext) contractMigrate(v *vm.VM) error {
}
for k, v := range siMap {
v.IsConst = false
_ = ic.dao.PutStorageItem(hash, []byte(k), v)
err = ic.dao.PutStorageItem(contract.ScriptHash(), []byte(k), v)
if err != nil {
return err
}
}
}
}