core: add contract hash into the error output for checkStorageContext()

Makes debugging things easier.
This commit is contained in:
Roman Khimov 2019-11-14 16:09:24 +03:00
parent 64e20508e0
commit 5e8122bfac

View file

@ -391,7 +391,7 @@ func (ic *interopContext) checkStorageContext(stc *StorageContext) error {
return errors.New("no contract found")
}
if !contract.HasStorage() {
return errors.New("contract can't have storage")
return fmt.Errorf("contract %s can't use storage", stc.ScriptHash)
}
return nil
}