mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-05 23:55:11 +00:00
state: allow to encode AppExecResult with recursive items
1. Encode them to a special type, decode to `nil`. 2. `Interop` can be encoded in JSON, this info should also be preserved.
This commit is contained in:
parent
c13d6ecc55
commit
8c22d27acc
6 changed files with 164 additions and 52 deletions
|
@ -1539,3 +1539,17 @@ func TestRemoveUntraceable(t *testing.T) {
|
|||
require.NoError(t, err)
|
||||
require.Len(t, b.Transactions, 0)
|
||||
}
|
||||
|
||||
func TestInvalidNotification(t *testing.T) {
|
||||
bc := newTestChain(t)
|
||||
defer bc.Close()
|
||||
|
||||
cs, _ := getTestContractState(bc)
|
||||
require.NoError(t, bc.contracts.Management.PutContractState(bc.dao, cs))
|
||||
|
||||
aer, err := invokeContractMethod(bc, 1_00000000, cs.Hash, "invalidStack")
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, 2, len(aer.Stack))
|
||||
require.Nil(t, aer.Stack[0])
|
||||
require.Equal(t, stackitem.InteropT, aer.Stack[1].Type())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue