genesisMocks

package
v1.7.13 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountsParserStub

type AccountsParserStub struct {
	InitialAccountsSplitOnAddressesShardsCalled           func(shardCoordinator sharding.Coordinator) (map[uint32][]genesis.InitialAccountHandler, error)
	InitialAccountsSplitOnDelegationAddressesShardsCalled func(shardCoordinator sharding.Coordinator) (map[uint32][]genesis.InitialAccountHandler, error)
	InitialAccountsCalled                                 func() []genesis.InitialAccountHandler
	GetTotalStakedForDelegationAddressCalled              func(delegationAddress string) *big.Int
	GetInitialAccountsForDelegatedCalled                  func(addressBytes []byte) []genesis.InitialAccountHandler
	GenerateInitialTransactionsCalled                     func(shardCoordinator sharding.Coordinator, initialIndexingData map[uint32]*genesis.IndexingData) ([]*block.MiniBlock, map[uint32]*outport.TransactionPool, error)
	GenesisMintingAddressCalled                           func() string
}

AccountsParserStub -

func (*AccountsParserStub) GenerateInitialTransactions

func (aps *AccountsParserStub) GenerateInitialTransactions(shardCoordinator sharding.Coordinator, initialIndexingData map[uint32]*genesis.IndexingData) ([]*block.MiniBlock, map[uint32]*outport.TransactionPool, error)

GenerateInitialTransactions -

func (*AccountsParserStub) GenesisMintingAddress

func (aps *AccountsParserStub) GenesisMintingAddress() string

GenesisMintingAddress -

func (*AccountsParserStub) GetInitialAccountsForDelegated

func (aps *AccountsParserStub) GetInitialAccountsForDelegated(addressBytes []byte) []genesis.InitialAccountHandler

GetInitialAccountsForDelegated -

func (*AccountsParserStub) GetTotalStakedForDelegationAddress

func (aps *AccountsParserStub) GetTotalStakedForDelegationAddress(delegationAddress string) *big.Int

GetTotalStakedForDelegationAddress -

func (*AccountsParserStub) InitialAccounts

func (aps *AccountsParserStub) InitialAccounts() []genesis.InitialAccountHandler

InitialAccounts -

func (*AccountsParserStub) InitialAccountsSplitOnAddressesShards

func (aps *AccountsParserStub) InitialAccountsSplitOnAddressesShards(shardCoordinator sharding.Coordinator) (map[uint32][]genesis.InitialAccountHandler, error)

InitialAccountsSplitOnAddressesShards -

func (*AccountsParserStub) InitialAccountsSplitOnDelegationAddressesShards

func (aps *AccountsParserStub) InitialAccountsSplitOnDelegationAddressesShards(shardCoordinator sharding.Coordinator) (map[uint32][]genesis.InitialAccountHandler, error)

InitialAccountsSplitOnDelegationAddressesShards -

func (*AccountsParserStub) IsInterfaceNil

func (aps *AccountsParserStub) IsInterfaceNil() bool

IsInterfaceNil -

type NodesSetupStub added in v1.7.0

type NodesSetupStub struct {
	InitialNodesPubKeysCalled                 func() map[uint32][]string
	InitialEligibleNodesPubKeysForShardCalled func(shardId uint32) ([]string, error)
	GetShardIDForPubKeyCalled                 func(pubKey []byte) (uint32, error)
	NumberOfShardsCalled                      func() uint32
	GetShardConsensusGroupSizeCalled          func() uint32
	GetMetaConsensusGroupSizeCalled           func() uint32
	GetRoundDurationCalled                    func() uint64
	MinNumberOfMetaNodesCalled                func() uint32
	MinNumberOfShardNodesCalled               func() uint32
	GetHysteresisCalled                       func() float32
	GetAdaptivityCalled                       func() bool
	InitialNodesInfoForShardCalled            func(shardId uint32) ([]nodesCoordinator.GenesisNodeInfoHandler, []nodesCoordinator.GenesisNodeInfoHandler, error)
	InitialNodesInfoCalled                    func() (map[uint32][]nodesCoordinator.GenesisNodeInfoHandler, map[uint32][]nodesCoordinator.GenesisNodeInfoHandler)
	GetStartTimeCalled                        func() int64
	MinNumberOfNodesCalled                    func() uint32
	AllInitialNodesCalled                     func() []nodesCoordinator.GenesisNodeInfoHandler
	MinNumberOfNodesWithHysteresisCalled      func() uint32
	MinShardHysteresisNodesCalled             func() uint32
	MinMetaHysteresisNodesCalled              func() uint32
	GetChainIdCalled                          func() string
	GetMinTransactionVersionCalled            func() uint32
}

NodesSetupStub -

func (*NodesSetupStub) AllInitialNodes added in v1.7.0

AllInitialNodes -

func (*NodesSetupStub) GetAdaptivity added in v1.7.0

func (n *NodesSetupStub) GetAdaptivity() bool

GetAdaptivity -

func (*NodesSetupStub) GetChainId added in v1.7.0

func (n *NodesSetupStub) GetChainId() string

GetChainId -

func (*NodesSetupStub) GetHysteresis added in v1.7.0

func (n *NodesSetupStub) GetHysteresis() float32

GetHysteresis -

func (*NodesSetupStub) GetMetaConsensusGroupSize added in v1.7.0

func (n *NodesSetupStub) GetMetaConsensusGroupSize() uint32

GetMetaConsensusGroupSize -

func (*NodesSetupStub) GetMinTransactionVersion added in v1.7.0

func (n *NodesSetupStub) GetMinTransactionVersion() uint32

GetMinTransactionVersion -

func (*NodesSetupStub) GetRoundDuration added in v1.7.0

func (n *NodesSetupStub) GetRoundDuration() uint64

GetRoundDuration -

func (*NodesSetupStub) GetShardConsensusGroupSize added in v1.7.0

func (n *NodesSetupStub) GetShardConsensusGroupSize() uint32

GetShardConsensusGroupSize -

func (*NodesSetupStub) GetShardIDForPubKey added in v1.7.0

func (n *NodesSetupStub) GetShardIDForPubKey(pubkey []byte) (uint32, error)

GetShardIDForPubKey -

func (*NodesSetupStub) GetStartTime added in v1.7.0

func (n *NodesSetupStub) GetStartTime() int64

GetStartTime -

func (*NodesSetupStub) InitialEligibleNodesPubKeysForShard added in v1.7.0

func (n *NodesSetupStub) InitialEligibleNodesPubKeysForShard(shardId uint32) ([]string, error)

InitialEligibleNodesPubKeysForShard -

func (*NodesSetupStub) InitialNodesInfo added in v1.7.0

InitialNodesInfo -

func (*NodesSetupStub) InitialNodesInfoForShard added in v1.7.0

InitialNodesInfoForShard -

func (*NodesSetupStub) InitialNodesPubKeys added in v1.7.0

func (n *NodesSetupStub) InitialNodesPubKeys() map[uint32][]string

InitialNodesPubKeys -

func (*NodesSetupStub) IsInterfaceNil added in v1.7.0

func (n *NodesSetupStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*NodesSetupStub) MinMetaHysteresisNodes added in v1.7.0

func (n *NodesSetupStub) MinMetaHysteresisNodes() uint32

MinMetaHysteresisNodes -

func (*NodesSetupStub) MinNumberOfMetaNodes added in v1.7.0

func (n *NodesSetupStub) MinNumberOfMetaNodes() uint32

MinNumberOfMetaNodes -

func (*NodesSetupStub) MinNumberOfNodes added in v1.7.0

func (n *NodesSetupStub) MinNumberOfNodes() uint32

MinNumberOfNodes -

func (*NodesSetupStub) MinNumberOfNodesWithHysteresis added in v1.7.0

func (n *NodesSetupStub) MinNumberOfNodesWithHysteresis() uint32

MinNumberOfNodesWithHysteresis -

func (*NodesSetupStub) MinNumberOfShardNodes added in v1.7.0

func (n *NodesSetupStub) MinNumberOfShardNodes() uint32

MinNumberOfShardNodes -

func (*NodesSetupStub) MinShardHysteresisNodes added in v1.7.0

func (n *NodesSetupStub) MinShardHysteresisNodes() uint32

MinShardHysteresisNodes -

func (*NodesSetupStub) NumberOfShards added in v1.7.0

func (n *NodesSetupStub) NumberOfShards() uint32

NumberOfShards -

Jump to

Keyboard shortcuts

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