mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-06 16:17:11 +00:00
Pretty print JSON
This commit is contained in:
+1
-1
@@ -31,7 +31,7 @@ type GenesisDoc struct {
|
||||
|
||||
// Utility method for saving GenensisDoc as JSON file.
|
||||
func (genDoc *GenesisDoc) SaveAs(file string) error {
|
||||
genDocBytes := wire.JSONBytes(genDoc)
|
||||
genDocBytes := wire.JSONBytesPretty(genDoc)
|
||||
return WriteFile(file, genDocBytes, 0644)
|
||||
}
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ func (privVal *PrivValidator) save() {
|
||||
if privVal.filePath == "" {
|
||||
PanicSanity("Cannot save PrivValidator: filePath not set")
|
||||
}
|
||||
jsonBytes := wire.JSONBytes(privVal)
|
||||
jsonBytes := wire.JSONBytesPretty(privVal)
|
||||
err := WriteFileAtomic(privVal.filePath, jsonBytes, 0600)
|
||||
if err != nil {
|
||||
// `@; BOOM!!!
|
||||
|
||||
Reference in New Issue
Block a user