From 6e44499cec27f0e4ba501cc81b713529c5f3c312 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Wed, 22 Jul 2020 12:36:28 +0300 Subject: [PATCH] core: adjust Neo.Native.Deploy interop Part of #1055. It could be that context.Block is nill. --- pkg/core/native/interop.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/core/native/interop.go b/pkg/core/native/interop.go index c36200acf..f2e3e487a 100644 --- a/pkg/core/native/interop.go +++ b/pkg/core/native/interop.go @@ -12,7 +12,7 @@ import ( // Deploy deploys native contract. func Deploy(ic *interop.Context, _ *vm.VM) error { - if ic.Block.Index != 0 { + if ic.Block == nil || ic.Block.Index != 0 { return errors.New("native contracts can be deployed only at 0 block") }