From ff6aa0fd45341638ac39b5a49809e2810618ea29 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Tue, 29 Sep 2020 16:38:59 +0300 Subject: [PATCH] core: allow empty callingScriptHash during CheckWitness CallingScriptHash can be empty in the entry transaction script. --- pkg/core/interop/runtime/witness.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/core/interop/runtime/witness.go b/pkg/core/interop/runtime/witness.go index d721990c5..ae9e18b31 100644 --- a/pkg/core/interop/runtime/witness.go +++ b/pkg/core/interop/runtime/witness.go @@ -36,7 +36,7 @@ func checkScope(d dao.DAO, tx *transaction.Transaction, v *vm.VM, hash util.Uint if c.Scopes&transaction.CalledByEntry != 0 { callingScriptHash := v.GetCallingScriptHash() entryScriptHash := v.GetEntryScriptHash() - if callingScriptHash == entryScriptHash { + if callingScriptHash.Equals(util.Uint160{}) || callingScriptHash == entryScriptHash { return true, nil } }