core: refactor runtime.CheckWitness interop

Removed unreachable code, see
8fed383523

runtime.CheckHashedWitness can only be used for transaction
verification, the other two options from reference implementation (block
and consensus payload) have separate methods for verification.
This commit is contained in:
Anna Shaleva 2020-10-22 17:13:26 +03:00
parent 5bba9c158a
commit 204d7f1c6a

View file

@ -25,9 +25,6 @@ func CheckHashedWitness(ic *interop.Context, hash util.Uint160) (bool, error) {
return checkScope(ic.DAO, tx, ic.VM, hash)
}
if !ic.VM.Context().GetCallFlags().Has(smartcontract.AllowStates) {
return false, errors.New("missing AllowStates call flag")
}
return false, errors.New("script container is not a transaction")
}