Documentation ¶
Index ¶
- type Genesis
- func (gen *Genesis) Accounts() []*account.Account
- func (gen *Genesis) ChainID() string
- func (gen *Genesis) ChainName() string
- func (gen *Genesis) Decode(bs []byte) error
- func (gen Genesis) Encode() ([]byte, error)
- func (gen *Genesis) GenesisTime() time.Time
- func (gen *Genesis) GlobalAccount() *account.Account
- func (gen *Genesis) Hash() []byte
- func (gen *Genesis) Marshal() ([]byte, error)
- func (gen Genesis) MarshalJSON() ([]byte, error)
- func (gen *Genesis) MarshalTo(data []byte) (int, error)
- func (gen *Genesis) MaximumPower() int
- func (gen *Genesis) SaveToFile(file string) error
- func (gen *Genesis) ShortHash() []byte
- func (gen *Genesis) Size() int
- func (gen *Genesis) Unmarshal(bs []byte) error
- func (gen *Genesis) UnmarshalJSON(bs []byte) error
- func (gen *Genesis) Validators() []*validator.Validator
- func (gen *Genesis) ValidatorsAddress() []crypto.Address
- type Proposal
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Genesis ¶
type Genesis struct {
// contains filtered or unexported fields
}
Genesis is stored in the state database
func LoadFromFile ¶
LoadFromFile loads genesis object from a JSON file
func MakeGenesis ¶
func MakeGenesis(chainName string, genesisTime time.Time, globAccount *account.Account, accounts []*account.Account, contracts []*account.Account, validators []*validator.Validator) *Genesis
MakeGenesis takes a chainName and a slice of pointers to Account, and a slice of pointers to Validator to construct a Genesis, or returns an error on failure.
func (*Genesis) GenesisTime ¶
func (*Genesis) GlobalAccount ¶
func (Genesis) MarshalJSON ¶
func (*Genesis) MaximumPower ¶
func (*Genesis) SaveToFile ¶
SaveToFile saves the genesis info a JSON file
func (*Genesis) UnmarshalJSON ¶
func (*Genesis) Validators ¶
func (*Genesis) ValidatorsAddress ¶
Click to show internal directories.
Click to hide internal directories.