interop/crypto: allow ECDsaVerify to verify ScriptContainer
When verifying transaction or block, verification script can be a simple PUSHNULL + SYSCALL, which means that script-encontaining entity should be verified.
This commit is contained in:
parent
8f08065a8e
commit
a92872931c
3 changed files with 13 additions and 1 deletions
|
@ -280,6 +280,14 @@ func TestECDSAVerify(t *testing.T) {
|
|||
runCase(t, false, true, sign, priv.PublicKey().Bytes(), vm.NewInteropItem(tx))
|
||||
})
|
||||
|
||||
t.Run("signed script container", func(t *testing.T) {
|
||||
tx := transaction.NewInvocationTX([]byte{0, 1, 2}, 1)
|
||||
msg := tx.GetSignedPart()
|
||||
sign := priv.Sign(msg)
|
||||
ic.Container = tx
|
||||
runCase(t, false, true, sign, priv.PublicKey().Bytes(), vm.NullItem{})
|
||||
})
|
||||
|
||||
t.Run("missing arguments", func(t *testing.T) {
|
||||
runCase(t, true, false)
|
||||
sign := priv.Sign(msg)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue