rpc: add GetStateHeight to client
This commit is contained in:
parent
a188d20fd1
commit
7366d45985
2 changed files with 27 additions and 0 deletions
|
@ -680,6 +680,21 @@ var rpcClientTestCases = map[string][]rpcClientTestCase{
|
|||
},
|
||||
},
|
||||
},
|
||||
"getstateheight": {
|
||||
{
|
||||
name: "positive",
|
||||
invoke: func(c *Client) (interface{}, error) {
|
||||
return c.GetStateHeight()
|
||||
},
|
||||
serverResponse: `{"jsonrpc":"2.0","id":1,"result":{"localrootindex":11646,"validatedrootindex":11645}}`,
|
||||
result: func(c *Client) interface{} {
|
||||
return &result.StateHeight{
|
||||
Local: 11646,
|
||||
Validated: 11645,
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
"getstorage": {
|
||||
{
|
||||
name: "by hash, positive",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue