mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-25 23:02:16 +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 {
|
||||
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), "")
|
||||
}
|
||||
|
||||
type QueryResult struct {
|
||||
Index int `json:"index"`
|
||||
Value string `json:"value"`
|
||||
Exists bool `json:"exists"`
|
||||
Index int `json:"index"`
|
||||
Value string `json:"value"`
|
||||
ValueHex string `json:"valueHex"`
|
||||
Exists bool `json:"exists"`
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user