genesisMocks

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 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

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

AllInitialNodes -

func (*NodesSetupStub) GetAdaptivity

func (n *NodesSetupStub) GetAdaptivity() bool

GetAdaptivity -

func (*NodesSetupStub) GetChainId

func (n *NodesSetupStub) GetChainId() string

GetChainId -

func (*NodesSetupStub) GetHysteresis

func (n *NodesSetupStub) GetHysteresis() float32

GetHysteresis -

func (*NodesSetupStub) GetMetaConsensusGroupSize

func (n *NodesSetupStub) GetMetaConsensusGroupSize() uint32

GetMetaConsensusGroupSize -

func (*NodesSetupStub) GetMinTransactionVersion

func (n *NodesSetupStub) GetMinTransactionVersion() uint32

GetMinTransactionVersion -

func (*NodesSetupStub) GetRoundDuration

func (n *NodesSetupStub) GetRoundDuration() uint64

GetRoundDuration -

func (*NodesSetupStub) GetShardConsensusGroupSize

func (n *NodesSetupStub) GetShardConsensusGroupSize() uint32

GetShardConsensusGroupSize -

func (*NodesSetupStub) GetShardIDForPubKey

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

GetShardIDForPubKey -

func (*NodesSetupStub) GetStartTime

func (n *NodesSetupStub) GetStartTime() int64

GetStartTime -

func (*NodesSetupStub) InitialEligibleNodesPubKeysForShard

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

InitialEligibleNodesPubKeysForShard -

func (*NodesSetupStub) InitialNodesInfo

InitialNodesInfo -

func (*NodesSetupStub) InitialNodesInfoForShard

InitialNodesInfoForShard -

func (*NodesSetupStub) InitialNodesPubKeys

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

InitialNodesPubKeys -

func (*NodesSetupStub) IsInterfaceNil

func (n *NodesSetupStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*NodesSetupStub) MinMetaHysteresisNodes

func (n *NodesSetupStub) MinMetaHysteresisNodes() uint32

MinMetaHysteresisNodes -

func (*NodesSetupStub) MinNumberOfMetaNodes

func (n *NodesSetupStub) MinNumberOfMetaNodes() uint32

MinNumberOfMetaNodes -

func (*NodesSetupStub) MinNumberOfNodes

func (n *NodesSetupStub) MinNumberOfNodes() uint32

MinNumberOfNodes -

func (*NodesSetupStub) MinNumberOfNodesWithHysteresis

func (n *NodesSetupStub) MinNumberOfNodesWithHysteresis() uint32

MinNumberOfNodesWithHysteresis -

func (*NodesSetupStub) MinNumberOfShardNodes

func (n *NodesSetupStub) MinNumberOfShardNodes() uint32

MinNumberOfShardNodes -

func (*NodesSetupStub) MinShardHysteresisNodes

func (n *NodesSetupStub) MinShardHysteresisNodes() uint32

MinShardHysteresisNodes -

func (*NodesSetupStub) NumberOfShards

func (n *NodesSetupStub) NumberOfShards() uint32

NumberOfShards -

Jump to

Keyboard shortcuts

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