fix: genesis param json tags

This commit is contained in:
Kevin Davis 2020-01-16 12:15:18 +01:00
parent 9b1bf55be7
commit 6bf1a4ce5b
2 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,7 @@ type GenesisAuctions []GenesisAuction
// GenesisState is auction state that must be provided at chain genesis. // GenesisState is auction state that must be provided at chain genesis.
type GenesisState struct { type GenesisState struct {
NextAuctionID uint64 `json:"next_auction_id" yaml:"next_auction_id"` NextAuctionID uint64 `json:"next_auction_id" yaml:"next_auction_id"`
Params Params `json:"auction_params" yaml:"auction_params"` Params Params `json:"params" yaml:"params"`
Auctions GenesisAuctions `json:"genesis_auctions" yaml:"genesis_auctions"` Auctions GenesisAuctions `json:"genesis_auctions" yaml:"genesis_auctions"`
} }
@ -50,7 +50,7 @@ func (gs GenesisState) IsEmpty() bool {
return gs.Equal(GenesisState{}) return gs.Equal(GenesisState{})
} }
// ValidateGenesis validates genesis inputs. It returns error if validation of any input fails. // Validate validates genesis inputs. It returns error if validation of any input fails.
func (gs GenesisState) Validate() error { func (gs GenesisState) Validate() error {
if err := gs.Params.Validate(); err != nil { if err := gs.Params.Validate(); err != nil {
return err return err

View File

@ -6,7 +6,7 @@ import (
// GenesisState - pricefeed state that must be provided at genesis // GenesisState - pricefeed state that must be provided at genesis
type GenesisState struct { type GenesisState struct {
Params Params `json:"asset_params" yaml:"asset_params"` Params Params `json:"params" yaml:"params"`
PostedPrices []PostedPrice `json:"posted_prices" yaml:"posted_prices"` PostedPrices []PostedPrice `json:"posted_prices" yaml:"posted_prices"`
} }