mocks

package
v0.0.0-...-7ece11e Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chain

type Chain struct {
	mock.Mock
}

Chain is an autogenerated mock type for the Chain type

func (*Chain) BestViewCommitteeFromBlock

func (_m *Chain) BestViewCommitteeFromBlock() common.Hash

BestViewCommitteeFromBlock provides a mock function with given fields:

func (*Chain) CommitteeEngineVersion

func (_m *Chain) CommitteeEngineVersion() int

CommitteeEngineVersion provides a mock function with given fields:

func (*Chain) CreateNewBlock

func (_m *Chain) CreateNewBlock(version int, proposer string, round int, startTime int64, committees []incognitokey.CommitteePublicKey, hash common.Hash) (types.BlockInterface, error)

CreateNewBlock provides a mock function with given fields: version, proposer, round, startTime, committees, hash

func (*Chain) CreateNewBlockFromOldBlock

func (_m *Chain) CreateNewBlockFromOldBlock(oldBlock types.BlockInterface, proposer string, startTime int64, isValidRePropose bool) (types.BlockInterface, error)

CreateNewBlockFromOldBlock provides a mock function with given fields: oldBlock, proposer, startTime, isValidRePropose

func (*Chain) CurrentHeight

func (_m *Chain) CurrentHeight() uint64

CurrentHeight provides a mock function with given fields:

func (*Chain) GetActiveShardNumber

func (_m *Chain) GetActiveShardNumber() int

GetActiveShardNumber provides a mock function with given fields:

func (*Chain) GetBestView

func (_m *Chain) GetBestView() multiview.View

GetBestView provides a mock function with given fields:

func (*Chain) GetBestViewHash

func (_m *Chain) GetBestViewHash() string

GetBestViewHash provides a mock function with given fields:

func (*Chain) GetBestViewHeight

func (_m *Chain) GetBestViewHeight() uint64

GetBestViewHeight provides a mock function with given fields:

func (*Chain) GetBlockByHash

func (_m *Chain) GetBlockByHash(hash common.Hash) (types.BlockInterface, error)

GetBlockByHash provides a mock function with given fields: hash

func (*Chain) GetBlockConsensusData

func (_m *Chain) GetBlockConsensusData() map[int]types.BlockConsensusData

func (*Chain) GetChainDatabase

func (_m *Chain) GetChainDatabase() incdb.Database

GetChainDatabase provides a mock function with given fields:

func (*Chain) GetChainName

func (_m *Chain) GetChainName() string

GetChainName provides a mock function with given fields:

func (*Chain) GetCommittee

func (_m *Chain) GetCommittee() []incognitokey.CommitteePublicKey

GetCommittee provides a mock function with given fields:

func (*Chain) GetCommitteeSize

func (_m *Chain) GetCommitteeSize() int

GetCommitteeSize provides a mock function with given fields:

func (*Chain) GetConsensusType

func (_m *Chain) GetConsensusType() string

GetConsensusType provides a mock function with given fields:

func (*Chain) GetEpoch

func (_m *Chain) GetEpoch() uint64

GetEpoch provides a mock function with given fields:

func (*Chain) GetFinalView

func (_m *Chain) GetFinalView() multiview.View

GetFinalView provides a mock function with given fields:

func (*Chain) GetFinalViewHash

func (_m *Chain) GetFinalViewHash() string

GetFinalViewHash provides a mock function with given fields:

func (*Chain) GetFinalViewHeight

func (_m *Chain) GetFinalViewHeight() uint64

GetFinalViewHeight provides a mock function with given fields:

func (*Chain) GetLastBlockTimeStamp

func (_m *Chain) GetLastBlockTimeStamp() int64

GetLastBlockTimeStamp provides a mock function with given fields:

func (*Chain) GetLastProposerIndex

func (_m *Chain) GetLastProposerIndex() int

GetLastProposerIndex provides a mock function with given fields:

func (*Chain) GetMaxBlkCreateTime

func (_m *Chain) GetMaxBlkCreateTime() time.Duration

GetMaxBlkCreateTime provides a mock function with given fields:

func (*Chain) GetMinBlkInterval

func (_m *Chain) GetMinBlkInterval() time.Duration

GetMinBlkInterval provides a mock function with given fields:

func (*Chain) GetMultiView

func (_m *Chain) GetMultiView() multiview.MultiView

GetMultiView provides a mock function with given fields:

func (*Chain) GetPendingCommittee

func (_m *Chain) GetPendingCommittee() []incognitokey.CommitteePublicKey

GetPendingCommittee provides a mock function with given fields:

func (*Chain) GetPortalParamsV4

func (_m *Chain) GetPortalParamsV4(beaconHeight uint64) portalv4.PortalParams

GetPortalParamsV4 provides a mock function with given fields: beaconHeight

func (*Chain) GetProposerByTimeSlotFromCommitteeList

func (_m *Chain) GetProposerByTimeSlotFromCommitteeList(ts int64, committees []incognitokey.CommitteePublicKey) (incognitokey.CommitteePublicKey, int)

GetProposerByTimeSlotFromCommitteeList provides a mock function with given fields: ts, committees

func (*Chain) GetPubKeyCommitteeIndex

func (_m *Chain) GetPubKeyCommitteeIndex(_a0 string) int

GetPubKeyCommitteeIndex provides a mock function with given fields: _a0

func (*Chain) GetShardID

func (_m *Chain) GetShardID() int

GetShardID provides a mock function with given fields:

func (*Chain) GetSigningCommittees

func (_m *Chain) GetSigningCommittees(proposerIndex int, committees []incognitokey.CommitteePublicKey, blockVersion int) []incognitokey.CommitteePublicKey

GetSigningCommittees provides a mock function with given fields: proposerIndex, committees, blockVersion

func (*Chain) GetViewByHash

func (_m *Chain) GetViewByHash(hash common.Hash) multiview.View

GetViewByHash provides a mock function with given fields: hash

func (*Chain) InsertAndBroadcastBlock

func (_m *Chain) InsertAndBroadcastBlock(block types.BlockInterface) error

InsertAndBroadcastBlock provides a mock function with given fields: block

func (*Chain) InsertAndBroadcastBlockWithPrevValidationData

func (_m *Chain) InsertAndBroadcastBlockWithPrevValidationData(_a0 types.BlockInterface, _a1 string) error

InsertAndBroadcastBlockWithPrevValidationData provides a mock function with given fields: _a0, _a1

func (*Chain) InsertBlock

func (_m *Chain) InsertBlock(block types.BlockInterface, shouldValidate bool) error

InsertBlock provides a mock function with given fields: block, shouldValidate

func (*Chain) InsertWithPrevValidationData

func (_m *Chain) InsertWithPrevValidationData(_a0 types.BlockInterface, _a1 string) error

InsertWithPrevValidationData provides a mock function with given fields: _a0, _a1

func (*Chain) IsBeaconChain

func (_m *Chain) IsBeaconChain() bool

IsBeaconChain provides a mock function with given fields:

func (*Chain) IsReady

func (_m *Chain) IsReady() bool

IsReady provides a mock function with given fields:

func (*Chain) ReplacePreviousValidationData

func (_m *Chain) ReplacePreviousValidationData(previousBlockHash common.Hash, proposeBlockHash common.Hash, newValidationData string) error

func (*Chain) SetReady

func (_m *Chain) SetReady(_a0 bool)

SetReady provides a mock function with given fields: _a0

func (*Chain) StoreFinalityProof

func (_m *Chain) StoreFinalityProof(block types.BlockInterface, finalityProof interface{}, reProposeSig interface{}) error

StoreFinalityProof provides a mock function with given fields: block, finalityProof, reProposeSig

func (*Chain) UnmarshalBlock

func (_m *Chain) UnmarshalBlock(blockString []byte) (types.BlockInterface, error)

UnmarshalBlock provides a mock function with given fields: blockString

func (*Chain) ValidateBlockSignatures

func (_m *Chain) ValidateBlockSignatures(block types.BlockInterface, committees []incognitokey.CommitteePublicKey) error

ValidateBlockSignatures provides a mock function with given fields: block, committees

func (*Chain) ValidatePreSignBlock

func (_m *Chain) ValidatePreSignBlock(block types.BlockInterface, signingCommittees []incognitokey.CommitteePublicKey, committees []incognitokey.CommitteePublicKey) error

ValidatePreSignBlock provides a mock function with given fields: block, signingCommittees, committees

func (*Chain) VerifyFinalityAndReplaceBlockConsensusData

func (_m *Chain) VerifyFinalityAndReplaceBlockConsensusData(consensusData types.BlockConsensusData) error

type CommitteeChainHandler

type CommitteeChainHandler struct {
	mock.Mock
}

CommitteeChainHandler is an autogenerated mock type for the CommitteeChainHandler type

func (*CommitteeChainHandler) CommitteesFromViewHashForShard

func (_m *CommitteeChainHandler) CommitteesFromViewHashForShard(committeeHash common.Hash, shardID byte) ([]incognitokey.CommitteePublicKey, error)

CommitteesFromViewHashForShard provides a mock function with given fields: committeeHash, shardID

func (*CommitteeChainHandler) FinalView

func (_m *CommitteeChainHandler) FinalView() multiview.View

FinalView provides a mock function with given fields:

type NodeInterface

type NodeInterface struct {
	mock.Mock
}

NodeInterface is an autogenerated mock type for the NodeInterface type

func (*NodeInterface) GetMiningKeys

func (_m *NodeInterface) GetMiningKeys() string

GetMiningKeys provides a mock function with given fields:

func (*NodeInterface) GetPrivateKey

func (_m *NodeInterface) GetPrivateKey() string

GetPrivateKey provides a mock function with given fields:

func (*NodeInterface) GetSelfPeerID

func (_m *NodeInterface) GetSelfPeerID() peer.ID

GetSelfPeerID provides a mock function with given fields:

func (*NodeInterface) GetUserMiningState

func (_m *NodeInterface) GetUserMiningState() (string, int)

GetUserMiningState provides a mock function with given fields:

func (*NodeInterface) IsEnableMining

func (_m *NodeInterface) IsEnableMining() bool

IsEnableMining provides a mock function with given fields:

func (*NodeInterface) PushBlockToAll

func (_m *NodeInterface) PushBlockToAll(block types.BlockInterface, previousValidationData string, isBeacon bool) error

PushBlockToAll provides a mock function with given fields: block, previousValidationData, isBeacon

func (*NodeInterface) PushMessageToChain

func (_m *NodeInterface) PushMessageToChain(msg wire.Message, chain common.ChainInterface) error

PushMessageToChain provides a mock function with given fields: msg, chain

func (*NodeInterface) RequestMissingViewViaStream

func (_m *NodeInterface) RequestMissingViewViaStream(peerID string, hashes [][]byte, fromCID int, chainName string) error

RequestMissingViewViaStream provides a mock function with given fields: peerID, hashes, fromCID, chainName

Jump to

Keyboard shortcuts

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