genesis

package
v1.0.105 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2020 License: GPL-3.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateMetaGenesisBlock

func CreateMetaGenesisBlock(
	args ArgsMetaGenesisBlockCreator,
) (data.HeaderHandler, error)

CreateMetaGenesisBlock creates the meta genesis block

func CreateShardGenesisBlockFromInitialBalances

func CreateShardGenesisBlockFromInitialBalances(
	accounts state.AccountsAdapter,
	shardCoordinator sharding.Coordinator,
	pubkeyConv state.PubkeyConverter,
	initialBalances map[string]*big.Int,
	genesisTime uint64,
) (data.HeaderHandler, error)

CreateShardGenesisBlockFromInitialBalances creates the genesis block body from map of account balances

func NewGenesisFeeHandler

func NewGenesisFeeHandler() *feeHandler

NewGenesisFeeHandler returns a new genesis fee handler

Types

type ArgsMetaGenesisBlockCreator

type ArgsMetaGenesisBlockCreator struct {
	GenesisTime              uint64
	Accounts                 state.AccountsAdapter
	PubkeyConv               state.PubkeyConverter
	NodesSetup               *sharding.NodesSetup
	Economics                *economics.EconomicsData
	ShardCoordinator         sharding.Coordinator
	Store                    dataRetriever.StorageService
	Blkc                     data.ChainHandler
	Marshalizer              marshal.Marshalizer
	Hasher                   hashing.Hasher
	Uint64ByteSliceConverter typeConverters.Uint64ByteSliceConverter
	DataPool                 dataRetriever.PoolsHolder
	ValidatorStatsRootHash   []byte
	MessageSignVerifier      vm.MessageSignVerifier
	GasMap                   map[string]map[string]uint64
}

ArgsMetaGenesisBlockCreator holds the arguments which are needed to create a genesis metablock

type NilMessageSignVerifier

type NilMessageSignVerifier struct {
}

NilMessageSignVerifier represents the message verifier that accepts any message, sign, pk tuple

func (*NilMessageSignVerifier) IsInterfaceNil

func (nmsv *NilMessageSignVerifier) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*NilMessageSignVerifier) Verify

func (nmsv *NilMessageSignVerifier) Verify(_ []byte, _ []byte, _ []byte) error

Verify returns always nil

Jump to

Keyboard shortcuts

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