genesis

package
v1.2.10-rc.3 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: MIT Imports: 38 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 DocProvider added in v1.2.10

func DocProvider(config *config.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