mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-03 11:41:48 +00:00
rpc/server: implement getstateheight RPC
This commit is contained in:
parent
4de22247d5
commit
6b42e9306a
3 changed files with 34 additions and 0 deletions
|
@ -285,6 +285,20 @@ var rpcTestCases = map[string][]rpcTestCase{
|
|||
check: checkNep5Transfers,
|
||||
},
|
||||
},
|
||||
"getstateheight": {
|
||||
{
|
||||
name: "positive",
|
||||
params: `[]`,
|
||||
result: func(_ *executor) interface{} { return new(result.StateHeight) },
|
||||
check: func(t *testing.T, e *executor, res interface{}) {
|
||||
sh, ok := res.(*result.StateHeight)
|
||||
require.True(t, ok)
|
||||
|
||||
require.Equal(t, e.chain.BlockHeight(), sh.BlockHeight)
|
||||
require.Equal(t, uint32(0), sh.StateHeight)
|
||||
},
|
||||
},
|
||||
},
|
||||
"getstateroot": {
|
||||
{
|
||||
name: "no params",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue