From 204d7f1c6aeae5436140eb58c4ad99238ad69271 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Thu, 22 Oct 2020 17:13:26 +0300 Subject: [PATCH] core: refactor runtime.CheckWitness interop Removed unreachable code, see https://github.com/nspcc-dev/neo-go/pull/1218/commits/8fed38352383d2d317004fca03664354ae229203 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. --- pkg/core/interop/runtime/witness.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkg/core/interop/runtime/witness.go b/pkg/core/interop/runtime/witness.go index 81786aff3..094f38cc0 100644 --- a/pkg/core/interop/runtime/witness.go +++ b/pkg/core/interop/runtime/witness.go @@ -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") }