mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-29 16:52:15 +00:00
Include 'value' and 'valueHex' fields in dummy query response
This commit is contained in:
parent
75ea378a6a
commit
ab211d2dbe
@ -49,12 +49,13 @@ func (app *DummyApplication) Commit() types.Result {
|
|||||||
|
|
||||||
func (app *DummyApplication) Query(query []byte) types.Result {
|
func (app *DummyApplication) Query(query []byte) types.Result {
|
||||||
index, value, exists := app.state.Get(query)
|
index, value, exists := app.state.Get(query)
|
||||||
queryResult := QueryResult{index, hex.EncodeToString(value), exists}
|
queryResult := QueryResult{index, string(value), hex.EncodeToString(value), exists}
|
||||||
return types.NewResultOK(wire.JSONBytes(queryResult), "")
|
return types.NewResultOK(wire.JSONBytes(queryResult), "")
|
||||||
}
|
}
|
||||||
|
|
||||||
type QueryResult struct {
|
type QueryResult struct {
|
||||||
Index int `json:"index"`
|
Index int `json:"index"`
|
||||||
Value string `json:"value"`
|
Value string `json:"value"`
|
||||||
|
ValueHex string `json:"valueHex"`
|
||||||
Exists bool `json:"exists"`
|
Exists bool `json:"exists"`
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user