rpc: marshal getapplicationlog
stack as []stackitem.Item
Following https://github.com/neo-project/neo-modules/issues/318
This commit is contained in:
parent
95d86b67c3
commit
0834661cac
2 changed files with 64 additions and 14 deletions
|
@ -107,7 +107,7 @@ var rpcClientTestCases = map[string][]rpcClientTestCase{
|
|||
invoke: func(c *Client) (interface{}, error) {
|
||||
return c.GetApplicationLog(util.Uint256{})
|
||||
},
|
||||
serverResponse: `{"id":1,"jsonrpc":"2.0","result":{"txid":"0x17145a039fca704fcdbeb46e6b210af98a1a9e5b9768e46ffc38f71c79ac2521","trigger":"Application","vmstate":"HALT","gasconsumed":"1","stack":[{"type":"Integer","value":1}],"notifications":[]}}`,
|
||||
serverResponse: `{"id":1,"jsonrpc":"2.0","result":{"txid":"0x17145a039fca704fcdbeb46e6b210af98a1a9e5b9768e46ffc38f71c79ac2521","trigger":"Application","vmstate":"HALT","gasconsumed":"1","stack":[{"type":"Integer","value":"1"}],"notifications":[]}}`,
|
||||
result: func(c *Client) interface{} {
|
||||
txHash, err := util.Uint256DecodeStringLE("17145a039fca704fcdbeb46e6b210af98a1a9e5b9768e46ffc38f71c79ac2521")
|
||||
if err != nil {
|
||||
|
@ -118,7 +118,7 @@ var rpcClientTestCases = map[string][]rpcClientTestCase{
|
|||
Trigger: "Application",
|
||||
VMState: "HALT",
|
||||
GasConsumed: 1,
|
||||
Stack: []smartcontract.Parameter{{Type: smartcontract.IntegerType, Value: int64(1)}},
|
||||
Stack: []stackitem.Item{stackitem.NewBigInteger(big.NewInt(1))},
|
||||
Events: []result.NotificationEvent{},
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue