mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-08 14:21:14 +00:00
Add GenesisDoc.SaveAs utility method
This commit is contained in:
@@ -29,6 +29,12 @@ type GenesisDoc struct {
|
||||
AppHash []byte `json:"app_hash"`
|
||||
}
|
||||
|
||||
// Utility method for saving GenensisDoc as JSON file.
|
||||
func (genDoc *GenesisDoc) SaveAs(file string) error {
|
||||
genDocBytes := wire.JSONBytes(genDoc)
|
||||
return WriteFile(file, genDocBytes)
|
||||
}
|
||||
|
||||
//------------------------------------------------------------
|
||||
// Make genesis state from file
|
||||
|
||||
|
||||
Reference in New Issue
Block a user