Encode dummy query values as hex strings

This commit is contained in:
Matt Bell
2017-01-02 18:10:12 -08:00
parent c9b6b6e591
commit 75ea378a6a

View File

@@ -1,6 +1,7 @@
package dummy
import (
"encoding/hex"
"strings"
. "github.com/tendermint/go-common"
@@ -48,8 +49,7 @@ func (app *DummyApplication) Commit() types.Result {
func (app *DummyApplication) Query(query []byte) types.Result {
index, value, exists := app.state.Get(query)
queryResult := QueryResult{index, string(value), exists}
queryResult := QueryResult{index, hex.EncodeToString(value), exists}
return types.NewResultOK(wire.JSONBytes(queryResult), "")
}