mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-05 23:55:11 +00:00
core: verification script must return exactly one value
C# node is quite picky as it expects there to be exactly one value returned, but our testchain actually adds 4 signatures for multisig cases instead of 3 which makes it technically incompatible with C# node.
This commit is contained in:
parent
58af143f25
commit
d0c29f52c9
5 changed files with 16 additions and 4 deletions
|
@ -354,6 +354,15 @@ func TestVerifyHashAgainstScript(t *testing.T) {
|
|||
err := bc.verifyHashAgainstScript(hash.Hash160(verif), w, ic, false, gas)
|
||||
require.True(t, errors.Is(err, ErrVerificationFailed))
|
||||
})
|
||||
t.Run("TooManyResults", func(t *testing.T) {
|
||||
verif := []byte{byte(opcode.NOP)}
|
||||
w := &transaction.Witness{
|
||||
InvocationScript: []byte{byte(opcode.PUSH1), byte(opcode.PUSH1)},
|
||||
VerificationScript: verif,
|
||||
}
|
||||
err := bc.verifyHashAgainstScript(hash.Hash160(verif), w, ic, false, gas)
|
||||
require.True(t, errors.Is(err, ErrVerificationFailed))
|
||||
})
|
||||
}
|
||||
|
||||
func TestHasBlock(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue