core: allow empty callingScriptHash during CheckWitness

CallingScriptHash can be empty in the entry transaction script.
This commit is contained in:
Anna Shaleva 2020-09-29 16:38:59 +03:00
parent a2bfd16136
commit ff6aa0fd45

View file

@ -36,7 +36,7 @@ func checkScope(d dao.DAO, tx *transaction.Transaction, v *vm.VM, hash util.Uint
if c.Scopes&transaction.CalledByEntry != 0 { if c.Scopes&transaction.CalledByEntry != 0 {
callingScriptHash := v.GetCallingScriptHash() callingScriptHash := v.GetCallingScriptHash()
entryScriptHash := v.GetEntryScriptHash() entryScriptHash := v.GetEntryScriptHash()
if callingScriptHash == entryScriptHash { if callingScriptHash.Equals(util.Uint160{}) || callingScriptHash == entryScriptHash {
return true, nil return true, nil
} }
} }