Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsensusParams ¶
type ConsensusParams struct {
BlockSize abcitypes.BlockParams `json:"block_size"`
Evidence EvidenceParams `json:"evidence"`
Validator tmproto.ValidatorParams `json:"validator"`
}
ConsensusParams contains consensus critical parameters that determine the validity of blocks.
func (ConsensusParams) Validate ¶
func (params ConsensusParams) Validate() error
Validate validates the ConsensusParams to ensure all values are within their allowed limits, and returns an error if they are not.
type EvidenceParams ¶
type EvidenceParams struct {
MaxAge int64 `json:"max_age"` // only accept new evidence more recent than this
}
EvidenceParams determine how we handle evidence of malfeasance
type GenesisAccount ¶
type GenesisDoc ¶
type GenesisDoc struct {
GenesisTime time.Time `json:"genesis_time"`
ChainID string `json:"chain_id"`
ConsensusParams ConsensusParams `json:"consensus_params,omitempty"`
Validators []tmtypes.GenesisValidator `json:"validators,omitempty"`
AppHash tmbytes.HexBytes `json:"app_hash"`
AppState json.RawMessage `json:"app_state,omitempty"`
}
GenesisDoc defines the initial conditions for a tendermint blockchain, in particular its validator set.
func GenesisDocFromFile ¶
func GenesisDocFromFile(genDocFile string) (*GenesisDoc, error)
GenesisDocFromFile reads JSON data from a file and unmarshalls it into a GenesisDoc.
func GenesisDocFromJSON ¶
func GenesisDocFromJSON(jsonBlob []byte) (*GenesisDoc, error)
func (*GenesisDoc) ValidateAndComplete ¶
func (genDoc *GenesisDoc) ValidateAndComplete() error
ValidateAndComplete checks that all necessary fields are present and fills in defaults for optional fields left empty
type GenesisFileAccount ¶
type GenesisFileAccount struct {
Address sdk.AccAddress `json:"address"`
Coins []string `json:"coins"`
Sequence uint64 `json:"sequence_number"`
AccountNumber uint64 `json:"account_number"`
}
type GenesisFileState ¶
type GenesisFileState struct {
Accounts []GenesisFileAccount `json:"accounts"`
AuthData auth.GenesisState `json:"auth"`
StakeData stake.GenesisState `json:"stake"`
MintData mint.GenesisState `json:"mint"`
DistrData distribution.GenesisState `json:"distr"`
GovData gov.GenesisState `json:"gov"`
UpgradeData upgrade.GenesisState `json:"upgrade"`
SlashingData slashing.GenesisState `json:"slashing"`
ServiceData service.GenesisState `json:"service"`
GuardianData guardian.GenesisState `json:"guardian"`
RandData rand.GenesisState `json:"rand"`
SwapData coinswap.GenesisState `json:"swap"`
HtlcData htlc.GenesisState `json:"htlc"`
GenTxs []json.RawMessage `json:"gentxs"`
}
Click to show internal directories.
Click to hide internal directories.