mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-04 19:19:44 +00:00
rpc: use lowercase JSON field names for StateHeight
Follow neo-project/neo#1808. Note that this is an incompatible change, but this feature is still considered to be experimental upstream.
This commit is contained in:
parent
a702423c4a
commit
ab5eff620b
2 changed files with 3 additions and 3 deletions
|
@ -626,7 +626,7 @@ var rpcClientTestCases = map[string][]rpcClientTestCase{
|
||||||
invoke: func(c *Client) (interface{}, error) {
|
invoke: func(c *Client) (interface{}, error) {
|
||||||
return c.GetStateHeight()
|
return c.GetStateHeight()
|
||||||
},
|
},
|
||||||
serverResponse: `{"id":1,"jsonrpc":"2.0","result":{"blockHeight":208,"stateHeight":200}}`,
|
serverResponse: `{"id":1,"jsonrpc":"2.0","result":{"blockheight":208,"stateheight":200}}`,
|
||||||
result: func(c *Client) interface{} {
|
result: func(c *Client) interface{} {
|
||||||
return &result.StateHeight{
|
return &result.StateHeight{
|
||||||
BlockHeight: 208,
|
BlockHeight: 208,
|
||||||
|
|
|
@ -11,8 +11,8 @@ import (
|
||||||
|
|
||||||
// StateHeight is a result of getstateheight RPC.
|
// StateHeight is a result of getstateheight RPC.
|
||||||
type StateHeight struct {
|
type StateHeight struct {
|
||||||
BlockHeight uint32 `json:"blockHeight"`
|
BlockHeight uint32 `json:"blockheight"`
|
||||||
StateHeight uint32 `json:"stateHeight"`
|
StateHeight uint32 `json:"stateheight"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ProofWithKey represens key-proof pair.
|
// ProofWithKey represens key-proof pair.
|
||||||
|
|
Loading…
Reference in a new issue