diff --git a/pkg/core/blockchain.go b/pkg/core/blockchain.go index aceabd0a7..2d2c00fbb 100644 --- a/pkg/core/blockchain.go +++ b/pkg/core/blockchain.go @@ -1670,12 +1670,12 @@ func (bc *Blockchain) verifyHashAgainstScript(hash util.Uint160, witness *transa if err != nil { return 0, fmt.Errorf("%w: invalid return value", ErrVerificationFailed) } - if !res { - return 0, fmt.Errorf("%w: invalid signature", ErrVerificationFailed) - } if vm.Estack().Len() != 0 { return 0, fmt.Errorf("%w: expected exactly one returned value", ErrVerificationFailed) } + if !res { + return 0, fmt.Errorf("%w: invalid signature", ErrVerificationFailed) + } } else { return 0, fmt.Errorf("%w: no result returned from the script", ErrVerificationFailed) }