genesis

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

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

func LoadFromFile(file string) (*Genesis, error)

LoadFromFile loads genesis object from a JSON file.

func MakeGenesis

func MakeGenesis(genesisTime time.Time, accounts map[crypto.Address]*account.Account,
	validators []*validator.Validator, params param.Params) *Genesis

func Testnet

func Testnet() *Genesis

func (*Genesis) Accounts

func (gen *Genesis) Accounts() map[crypto.Address]*account.Account

func (*Genesis) GenesisTime

func (gen *Genesis) GenesisTime() time.Time

func (*Genesis) Hash

func (gen *Genesis) Hash() hash.Hash

func (Genesis) MarshalJSON

func (gen Genesis) MarshalJSON() ([]byte, error)

func (*Genesis) Params

func (gen *Genesis) Params() param.Params

func (*Genesis) SaveToFile

func (gen *Genesis) SaveToFile(file string) error

SaveToFile saves the genesis info a JSON file.

func (*Genesis) UnmarshalJSON

func (gen *Genesis) UnmarshalJSON(bs []byte) error

func (*Genesis) Validators

func (gen *Genesis) Validators() []*validator.Validator

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL