From a2cd2264a8dba1ebd845a94af0f2ff34dd425fdd Mon Sep 17 00:00:00 2001
From: Roman Khimov <roman@nspcc.ru>
Date: Sat, 20 Jun 2020 00:04:28 +0300
Subject: [PATCH] core: fix HasStorage check in storageGetContext

It was returning nil which is wrong.
---
 pkg/core/interop_system.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkg/core/interop_system.go b/pkg/core/interop_system.go
index aaffb4ba0..f51d6fceb 100644
--- a/pkg/core/interop_system.go
+++ b/pkg/core/interop_system.go
@@ -301,7 +301,7 @@ func storageGetContext(ic *interop.Context, v *vm.VM) error {
 		return err
 	}
 	if !contract.HasStorage() {
-		return err
+		return errors.New("contract is not allowed to use storage")
 	}
 	sc := &StorageContext{
 		ID:       contract.ID,