Documentation ¶
Index ¶
- type Chain
- func (_m *Chain) BestViewCommitteeFromBlock() common.Hash
- func (_m *Chain) CommitteeEngineVersion() int
- func (_m *Chain) CreateNewBlock(version int, proposer string, round int, startTime int64, ...) (types.BlockInterface, error)
- func (_m *Chain) CreateNewBlockFromOldBlock(oldBlock types.BlockInterface, proposer string, startTime int64, ...) (types.BlockInterface, error)
- func (_m *Chain) CurrentHeight() uint64
- func (_m *Chain) GetActiveShardNumber() int
- func (_m *Chain) GetBestView() multiview.View
- func (_m *Chain) GetBestViewHash() string
- func (_m *Chain) GetBestViewHeight() uint64
- func (_m *Chain) GetBlockByHash(hash common.Hash) (types.BlockInterface, error)
- func (_m *Chain) GetBlockConsensusData() map[int]types.BlockConsensusData
- func (_m *Chain) GetChainDatabase() incdb.Database
- func (_m *Chain) GetChainName() string
- func (_m *Chain) GetCommittee() []incognitokey.CommitteePublicKey
- func (_m *Chain) GetCommitteeSize() int
- func (_m *Chain) GetConsensusType() string
- func (_m *Chain) GetEpoch() uint64
- func (_m *Chain) GetFinalView() multiview.View
- func (_m *Chain) GetFinalViewHash() string
- func (_m *Chain) GetFinalViewHeight() uint64
- func (_m *Chain) GetLastBlockTimeStamp() int64
- func (_m *Chain) GetLastProposerIndex() int
- func (_m *Chain) GetMaxBlkCreateTime() time.Duration
- func (_m *Chain) GetMinBlkInterval() time.Duration
- func (_m *Chain) GetMultiView() multiview.MultiView
- func (_m *Chain) GetPendingCommittee() []incognitokey.CommitteePublicKey
- func (_m *Chain) GetPortalParamsV4(beaconHeight uint64) portalv4.PortalParams
- func (_m *Chain) GetProposerByTimeSlotFromCommitteeList(ts int64, committees []incognitokey.CommitteePublicKey) (incognitokey.CommitteePublicKey, int)
- func (_m *Chain) GetPubKeyCommitteeIndex(_a0 string) int
- func (_m *Chain) GetShardID() int
- func (_m *Chain) GetSigningCommittees(proposerIndex int, committees []incognitokey.CommitteePublicKey, ...) []incognitokey.CommitteePublicKey
- func (_m *Chain) GetViewByHash(hash common.Hash) multiview.View
- func (_m *Chain) InsertAndBroadcastBlock(block types.BlockInterface) error
- func (_m *Chain) InsertAndBroadcastBlockWithPrevValidationData(_a0 types.BlockInterface, _a1 string) error
- func (_m *Chain) InsertBlock(block types.BlockInterface, shouldValidate bool) error
- func (_m *Chain) InsertWithPrevValidationData(_a0 types.BlockInterface, _a1 string) error
- func (_m *Chain) IsBeaconChain() bool
- func (_m *Chain) IsReady() bool
- func (_m *Chain) ReplacePreviousValidationData(previousBlockHash common.Hash, proposeBlockHash common.Hash, ...) error
- func (_m *Chain) SetReady(_a0 bool)
- func (_m *Chain) StoreFinalityProof(block types.BlockInterface, finalityProof interface{}, ...) error
- func (_m *Chain) UnmarshalBlock(blockString []byte) (types.BlockInterface, error)
- func (_m *Chain) ValidateBlockSignatures(block types.BlockInterface, committees []incognitokey.CommitteePublicKey) error
- func (_m *Chain) ValidatePreSignBlock(block types.BlockInterface, ...) error
- func (_m *Chain) VerifyFinalityAndReplaceBlockConsensusData(consensusData types.BlockConsensusData) error
- type CommitteeChainHandler
- type NodeInterface
- func (_m *NodeInterface) GetMiningKeys() string
- func (_m *NodeInterface) GetPrivateKey() string
- func (_m *NodeInterface) GetSelfPeerID() peer.ID
- func (_m *NodeInterface) GetUserMiningState() (string, int)
- func (_m *NodeInterface) IsEnableMining() bool
- func (_m *NodeInterface) PushBlockToAll(block types.BlockInterface, previousValidationData string, isBeacon bool) error
- func (_m *NodeInterface) PushMessageToChain(msg wire.Message, chain common.ChainInterface) error
- func (_m *NodeInterface) RequestMissingViewViaStream(peerID string, hashes [][]byte, fromCID int, chainName string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chain ¶
Chain is an autogenerated mock type for the Chain type
func (*Chain) BestViewCommitteeFromBlock ¶
BestViewCommitteeFromBlock provides a mock function with given fields:
func (*Chain) CommitteeEngineVersion ¶
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 ¶
CurrentHeight provides a mock function with given fields:
func (*Chain) GetActiveShardNumber ¶
GetActiveShardNumber provides a mock function with given fields:
func (*Chain) GetBestView ¶
GetBestView provides a mock function with given fields:
func (*Chain) GetBestViewHash ¶
GetBestViewHash provides a mock function with given fields:
func (*Chain) GetBestViewHeight ¶
GetBestViewHeight provides a mock function with given fields:
func (*Chain) GetBlockByHash ¶
GetBlockByHash provides a mock function with given fields: hash
func (*Chain) GetBlockConsensusData ¶
func (_m *Chain) GetBlockConsensusData() map[int]types.BlockConsensusData
func (*Chain) GetChainDatabase ¶
GetChainDatabase provides a mock function with given fields:
func (*Chain) GetChainName ¶
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 ¶
GetCommitteeSize provides a mock function with given fields:
func (*Chain) GetConsensusType ¶
GetConsensusType provides a mock function with given fields:
func (*Chain) GetFinalView ¶
GetFinalView provides a mock function with given fields:
func (*Chain) GetFinalViewHash ¶
GetFinalViewHash provides a mock function with given fields:
func (*Chain) GetFinalViewHeight ¶
GetFinalViewHeight provides a mock function with given fields:
func (*Chain) GetLastBlockTimeStamp ¶
GetLastBlockTimeStamp provides a mock function with given fields:
func (*Chain) GetLastProposerIndex ¶
GetLastProposerIndex provides a mock function with given fields:
func (*Chain) GetMaxBlkCreateTime ¶
GetMaxBlkCreateTime provides a mock function with given fields:
func (*Chain) GetMinBlkInterval ¶
GetMinBlkInterval provides a mock function with given fields:
func (*Chain) GetMultiView ¶
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 ¶
GetPubKeyCommitteeIndex provides a mock function with given fields: _a0
func (*Chain) GetShardID ¶
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 ¶
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 ¶
IsBeaconChain provides a mock function with given fields:
func (*Chain) ReplacePreviousValidationData ¶
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 ¶
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 ¶
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