genesis

package
v1.4.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertJsonToSnapshot added in v1.2.10

func ConvertJsonToSnapshot(doc *types.GenesisDoc) ([]byte, error)

func ConvertSnapshotToJson

func ConvertSnapshotToJson(snap []byte) (*types.GenesisDoc, error)

func DocProvider added in v1.2.10

func DocProvider(config *tm.Config) node.GenesisDocProvider

DocProvider reads the genesis document.

func Init

func Init(snapshotWriter io.WriteSeeker, opts InitOpts) error

Types

type DataRecord

type DataRecord struct {
	Account *url.URL
	Entry   protocol.DataEntry
}

type GenesisAddressAndBalances

type GenesisAddressAndBalances struct {
	Address *url.URL
	Balance int64
}

func LoadFactomAddressesAndBalances

func LoadFactomAddressesAndBalances(file io.Reader) ([]*GenesisAddressAndBalances, error)

type InitOpts

type InitOpts struct {
	Logger log.Logger

	NetworkID      string
	PartitionId    string
	NetworkType    protocol.PartitionType
	GenesisTime    time.Time
	GenesisGlobals *core.GlobalValues
	OperatorKeys   [][]byte

	// For Tendermint
	ConsensusParams *tmtypes.ConsensusParams

	// Preloaded data
	FactomAddresses func() (io.Reader, error)
	Snapshots       []func() (ioutil2.SectionReader, error)

	// Flags
	IncludeHistoryFromSnapshots bool
}

Jump to

Keyboard shortcuts

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