types: []byte -> data.Bytes

This commit is contained in:
Ethan Buchman
2017-04-27 19:01:18 -04:00
parent 1310c72647
commit bdb34f9f4e
9 changed files with 60 additions and 49 deletions

View File

@@ -4,8 +4,9 @@ import (
"encoding/json"
"time"
. "github.com/tendermint/tmlibs/common"
"github.com/tendermint/go-crypto"
"github.com/tendermint/go-wire/data"
cmn "github.com/tendermint/tmlibs/common"
)
//------------------------------------------------------------
@@ -26,7 +27,7 @@ type GenesisDoc struct {
GenesisTime time.Time `json:"genesis_time"`
ChainID string `json:"chain_id"`
Validators []GenesisValidator `json:"validators"`
AppHash []byte `json:"app_hash"`
AppHash data.Bytes `json:"app_hash"`
}
// Utility method for saving GenensisDoc as JSON file.
@@ -35,7 +36,7 @@ func (genDoc *GenesisDoc) SaveAs(file string) error {
if err != nil {
return err
}
return WriteFile(file, genDocBytes, 0644)
return cmn.WriteFile(file, genDocBytes, 0644)
}
//------------------------------------------------------------