Merge branch 'develop' into jae/aminoify

This commit is contained in:
Ethan Buchman
2018-04-07 16:16:53 +03:00
95 changed files with 2317 additions and 770 deletions

View File

@ -26,7 +26,17 @@ type GenesisDoc struct {
ConsensusParams *ConsensusParams `json:"consensus_params,omitempty"`
Validators []GenesisValidator `json:"validators"`
AppHash cmn.HexBytes `json:"app_hash"`
AppState json.RawMessage `json:"app_state,omitempty"`
AppStateJSON json.RawMessage `json:"app_state,omitempty"`
AppOptions json.RawMessage `json:"app_options,omitempty"` // DEPRECATED
}
// AppState returns raw application state.
// TODO: replace with AppState field during next breaking release (0.18)
func (genDoc *GenesisDoc) AppState() json.RawMessage {
if len(genDoc.AppOptions) > 0 {
return genDoc.AppOptions
}
return genDoc.AppStateJSON
}
// SaveAs is a utility method for saving GenensisDoc as a JSON file.