mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-26 19:42:23 +00:00
rpc: allow to invoke getapplicationlog
with block hash
Support retrieving native contract persist results by block hash. All necessary support is already here, just add test.
This commit is contained in:
parent
a980cac0b3
commit
3a0be5ce28
1 changed files with 10 additions and 0 deletions
|
@ -823,6 +823,16 @@ func testRPCProtocol(t *testing.T, doRPCCall func(string, string, *testing.T) []
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
t.Run("getapplicationlog for block", func(t *testing.T) {
|
||||||
|
rpc := `{"jsonrpc": "2.0", "id": 1, "method": "getapplicationlog", "params": ["%s"]}`
|
||||||
|
body := doRPCCall(fmt.Sprintf(rpc, e.chain.GetHeaderHash(1).StringLE()), httpSrv.URL, t)
|
||||||
|
data := checkErrGetResult(t, body, false)
|
||||||
|
var res result.ApplicationLog
|
||||||
|
require.NoError(t, json.Unmarshal(data, &res))
|
||||||
|
require.Equal(t, "System", res.Trigger)
|
||||||
|
require.Equal(t, "HALT", res.VMState)
|
||||||
|
})
|
||||||
|
|
||||||
t.Run("submit", func(t *testing.T) {
|
t.Run("submit", func(t *testing.T) {
|
||||||
rpc := `{"jsonrpc": "2.0", "id": 1, "method": "submitblock", "params": ["%s"]}`
|
rpc := `{"jsonrpc": "2.0", "id": 1, "method": "submitblock", "params": ["%s"]}`
|
||||||
t.Run("invalid signature", func(t *testing.T) {
|
t.Run("invalid signature", func(t *testing.T) {
|
||||||
|
|
Loading…
Reference in a new issue