core: adjust Neo.Native.Deploy interop

Part of #1055.

It could be that context.Block is nill.
This commit is contained in:
Anna Shaleva 2020-07-22 12:36:28 +03:00
parent 2bbe218547
commit 6e44499cec

View file

@ -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")
}