use MarshalJSONIndent for init files. closes #1506

This commit is contained in:
Ethan Buchman
2018-04-26 21:32:14 -04:00
parent 97f3ada9c2
commit 94c016a04e
5 changed files with 14 additions and 9 deletions

View File

@@ -41,7 +41,7 @@ func (genDoc *GenesisDoc) AppState() json.RawMessage {
// SaveAs is a utility method for saving GenensisDoc as a JSON file.
func (genDoc *GenesisDoc) SaveAs(file string) error {
genDocBytes, err := cdc.MarshalJSON(genDoc)
genDocBytes, err := cdc.MarshalJSONIndent(genDoc, "", " ")
if err != nil {
return err
}