Documentation ¶
Index ¶
- func NewOneShardCoordinatorMock() *oneShardCoordinatorMock
- type AccountsDBSyncerStub
- type AccountsDBSyncersStub
- func (a *AccountsDBSyncersStub) Add(key string, val update.AccountsDBSyncer) error
- func (a *AccountsDBSyncersStub) AddMultiple(keys []string, interceptors []update.AccountsDBSyncer) error
- func (a *AccountsDBSyncersStub) Get(key string) (update.AccountsDBSyncer, error)
- func (a *AccountsDBSyncersStub) IsInterfaceNil() bool
- func (a *AccountsDBSyncersStub) Len() int
- func (a *AccountsDBSyncersStub) Remove(key string)
- func (a *AccountsDBSyncersStub) Replace(key string, val update.AccountsDBSyncer) error
- type AddressMock
- type ChainStorerMock
- func (bc *ChainStorerMock) AddStorer(key dataRetriever.UnitType, s storage.Storer)
- func (bc *ChainStorerMock) CloseAll() error
- func (bc *ChainStorerMock) Destroy() error
- func (bc *ChainStorerMock) Get(unitType dataRetriever.UnitType, key []byte) ([]byte, error)
- func (bc *ChainStorerMock) GetAll(unitType dataRetriever.UnitType, keys [][]byte) (map[string][]byte, error)
- func (bc *ChainStorerMock) GetAllStorers() map[dataRetriever.UnitType]storage.Storer
- func (bc *ChainStorerMock) GetStorer(unitType dataRetriever.UnitType) storage.Storer
- func (bc *ChainStorerMock) Has(unitType dataRetriever.UnitType, key []byte) error
- func (bc *ChainStorerMock) IsInterfaceNil() bool
- func (bc *ChainStorerMock) Put(unitType dataRetriever.UnitType, key []byte, value []byte) error
- func (bc *ChainStorerMock) SetEpochForPutOperation(_ uint32)
- type CloserStub
- type CoordinatorStub
- func (coordinator *CoordinatorStub) CommunicationIdentifier(destShardID uint32) string
- func (coordinator *CoordinatorStub) ComputeId(address []byte) uint32
- func (coordinator *CoordinatorStub) IsInterfaceNil() bool
- func (coordinator *CoordinatorStub) NumberOfShards() uint32
- func (coordinator *CoordinatorStub) SameShard(firstAddress, secondAddress []byte) bool
- func (coordinator *CoordinatorStub) SelfId() uint32
- type EpochHandlerStub
- type EpochStartNotifierStub
- func (esnm *EpochStartNotifierStub) IsInterfaceNil() bool
- func (esnm *EpochStartNotifierStub) NotifyAll(hdr data.HeaderHandler)
- func (esnm *EpochStartNotifierStub) NotifyAllPrepare(metaHdr data.HeaderHandler, body data.BodyHandler)
- func (esnm *EpochStartNotifierStub) NotifyEpochChangeConfirmed(epoch uint32)
- func (esnm *EpochStartNotifierStub) RegisterForEpochChangeConfirmed(handler func(epoch uint32))
- func (esnm *EpochStartNotifierStub) RegisterHandler(handler epochStart.ActionHandler)
- func (esnm *EpochStartNotifierStub) UnregisterHandler(handler epochStart.ActionHandler)
- type EpochStartPendingMiniBlocksSyncHandlerMock
- func (ep *EpochStartPendingMiniBlocksSyncHandlerMock) GetMiniBlocks() (map[string]*block.MiniBlock, error)
- func (ep *EpochStartPendingMiniBlocksSyncHandlerMock) IsInterfaceNil() bool
- func (ep *EpochStartPendingMiniBlocksSyncHandlerMock) SyncPendingMiniBlocksFromMeta(epochStart data.MetaHeaderHandler, ...) error
- type EpochStartTriesSyncHandlerMock
- type EpochStartTriggerStub
- func (e *EpochStartTriggerStub) Epoch() uint32
- func (e *EpochStartTriggerStub) EpochFinalityAttestingRound() uint64
- func (e *EpochStartTriggerStub) EpochStartMetaHdrHash() []byte
- func (e *EpochStartTriggerStub) EpochStartRound() uint64
- func (e *EpochStartTriggerStub) ForceEpochStart(round uint64) error
- func (e *EpochStartTriggerStub) GetRoundsPerEpoch() uint64
- func (e *EpochStartTriggerStub) IsEpochStart() bool
- func (e *EpochStartTriggerStub) IsInterfaceNil() bool
- func (e *EpochStartTriggerStub) NotifyAll(_ data.HeaderHandler)
- func (e *EpochStartTriggerStub) ReceivedHeader(header data.HeaderHandler)
- func (e *EpochStartTriggerStub) Revert()
- func (e *EpochStartTriggerStub) SetCurrentEpochStartRound(_ uint64)
- func (e *EpochStartTriggerStub) SetEpoch(_ uint32)
- func (e *EpochStartTriggerStub) SetFinalityAttestingRound(_ uint64)
- func (e *EpochStartTriggerStub) SetProcessed(header data.HeaderHandler)
- func (e *EpochStartTriggerStub) SetRoundsPerEpoch(_ uint64)
- func (e *EpochStartTriggerStub) SetTrigger(_ epochStart.TriggerHandler)
- func (e *EpochStartTriggerStub) Update(round uint64)
- type ExportFactoryHandlerStub
- type ExportHandlerStub
- type GenesisNodesSetupHandlerStub
- func (g *GenesisNodesSetupHandlerStub) GetAdaptivity() bool
- func (g *GenesisNodesSetupHandlerStub) GetChainId() string
- func (g *GenesisNodesSetupHandlerStub) GetHysteresis() float32
- func (g *GenesisNodesSetupHandlerStub) GetMetaConsensusGroupSize() uint32
- func (g *GenesisNodesSetupHandlerStub) GetMinTransactionVersion() uint32
- func (g *GenesisNodesSetupHandlerStub) GetRoundDuration() uint64
- func (g *GenesisNodesSetupHandlerStub) GetShardConsensusGroupSize() uint32
- func (g *GenesisNodesSetupHandlerStub) GetStartTime() int64
- func (g *GenesisNodesSetupHandlerStub) InitialNodesInfo() (map[uint32][]nodesCoordinator.GenesisNodeInfoHandler, ...)
- func (g *GenesisNodesSetupHandlerStub) InitialNodesInfoForShard(shardId uint32) ([]nodesCoordinator.GenesisNodeInfoHandler, ...)
- func (g *GenesisNodesSetupHandlerStub) IsInterfaceNil() bool
- func (g *GenesisNodesSetupHandlerStub) MinNumberOfMetaNodes() uint32
- func (g *GenesisNodesSetupHandlerStub) MinNumberOfNodes() uint32
- func (g *GenesisNodesSetupHandlerStub) MinNumberOfShardNodes() uint32
- func (g *GenesisNodesSetupHandlerStub) NumberOfShards() uint32
- type HardForkBlockProcessor
- func (hfbp *HardForkBlockProcessor) CreateBlock(body *block.Body, chainID string, round uint64, nonce uint64, epoch uint32) (data.HeaderHandler, error)
- func (hfbp *HardForkBlockProcessor) CreateBody() (*block.Body, []*update.MbInfo, error)
- func (hfbp *HardForkBlockProcessor) CreatePostMiniBlocks(mbsInfo []*update.MbInfo) (*block.Body, []*update.MbInfo, error)
- func (hfbp *HardForkBlockProcessor) IsInterfaceNil() bool
- type HardforkStorerStub
- func (hss *HardforkStorerStub) Close() error
- func (hss *HardforkStorerStub) FinishedIdentifier(identifier string) error
- func (hss *HardforkStorerStub) Get(identifier string, key []byte) ([]byte, error)
- func (hss *HardforkStorerStub) IsInterfaceNil() bool
- func (hss *HardforkStorerStub) RangeKeys(handler func(identifier string, keys [][]byte) bool)
- func (hss *HardforkStorerStub) Write(identifier string, key []byte, value []byte) error
- type HasherStub
- type HeaderSyncHandlerStub
- func (hsh *HeaderSyncHandlerStub) GetEpochStartMetaBlock() (data.MetaHeaderHandler, error)
- func (hsh *HeaderSyncHandlerStub) GetUnFinishedMetaBlocks() (map[string]data.MetaHeaderHandler, error)
- func (hsh *HeaderSyncHandlerStub) IsInterfaceNil() bool
- func (hsh *HeaderSyncHandlerStub) SyncUnFinishedMetaHeaders(epoch uint32) error
- type HeaderValidatorStub
- type HeadersCacherStub
- func (hcs *HeadersCacherStub) AddHeader(headerHash []byte, header data.HeaderHandler)
- func (hcs *HeadersCacherStub) Clear()
- func (hcs *HeadersCacherStub) GetHeaderByHash(hash []byte) (data.HeaderHandler, error)
- func (hcs *HeadersCacherStub) GetHeadersByNonceAndShardId(hdrNonce uint64, shardId uint32) ([]data.HeaderHandler, [][]byte, error)
- func (hcs *HeadersCacherStub) GetNumHeaders(shardId uint32) int
- func (hcs *HeadersCacherStub) IsInterfaceNil() bool
- func (hcs *HeadersCacherStub) Len() int
- func (hcs *HeadersCacherStub) MaxSize() int
- func (hcs *HeadersCacherStub) Nonces(shardId uint32) []uint64
- func (hcs *HeadersCacherStub) RegisterHandler(handler func(header data.HeaderHandler, shardHeaderHash []byte))
- func (hcs *HeadersCacherStub) RemoveHeaderByHash(headerHash []byte)
- func (hcs *HeadersCacherStub) RemoveHeaderByNonceAndShardId(hdrNonce uint64, shardId uint32)
- type ImportHandlerStub
- func (ihs *ImportHandlerStub) Close() error
- func (ihs *ImportHandlerStub) GetAccountsDBForShard(shardID uint32) state.AccountsAdapter
- func (ihs *ImportHandlerStub) GetHardForkMetaBlock() data.MetaHeaderHandler
- func (ihs *ImportHandlerStub) GetMiniBlocks() map[string]*block.MiniBlock
- func (ihs *ImportHandlerStub) GetTransactions() map[string]data.TransactionHandler
- func (ihs *ImportHandlerStub) GetUnFinishedMetaBlocks() map[string]data.MetaHeaderHandler
- func (ihs *ImportHandlerStub) GetValidatorAccountsDB() state.AccountsAdapter
- func (ihs *ImportHandlerStub) ImportAll() error
- func (ihs *ImportHandlerStub) IsInterfaceNil() bool
- type ImportStartHandlerStub
- func (ish *ImportStartHandlerStub) IsAfterExportBeforeImport() bool
- func (ish *ImportStartHandlerStub) IsInterfaceNil() bool
- func (ish *ImportStartHandlerStub) ResetStartImport() error
- func (ish *ImportStartHandlerStub) SetStartImport() error
- func (ish *ImportStartHandlerStub) ShouldStartImport() bool
- type MarshalizerFake
- type MarshalizerMock
- type PendingTransactionProcessorStub
- func (ptps *PendingTransactionProcessorStub) Commit() ([]byte, error)
- func (ptps *PendingTransactionProcessorStub) IsInterfaceNil() bool
- func (ptps *PendingTransactionProcessorStub) ProcessTransactionsDstMe(mbInfo *update.MbInfo) (*block.MiniBlock, error)
- func (ptps *PendingTransactionProcessorStub) RootHash() ([]byte, error)
- type PubkeyConverterStub
- type RoundHandlerStub
- func (rhs *RoundHandlerStub) Index() int64
- func (rhs *RoundHandlerStub) IsInterfaceNil() bool
- func (rhs *RoundHandlerStub) RemainingTime(startTime time.Time, maxTime time.Duration) time.Duration
- func (rhs *RoundHandlerStub) TimeDuration() time.Duration
- func (rhs *RoundHandlerStub) TimeStamp() time.Time
- func (rhs *RoundHandlerStub) UpdateRound(genesisRoundTimeStamp time.Time, timeStamp time.Time)
- type StateSyncStub
- func (sss *StateSyncStub) GetAllMiniBlocks() (map[string]*block.MiniBlock, error)
- func (sss *StateSyncStub) GetAllTransactions() (map[string]data.TransactionHandler, error)
- func (sss *StateSyncStub) GetAllTries() (map[string]common.Trie, error)
- func (sss *StateSyncStub) GetEpochStartMetaBlock() (data.MetaHeaderHandler, error)
- func (sss *StateSyncStub) GetUnFinishedMetaBlocks() (map[string]data.MetaHeaderHandler, error)
- func (sss *StateSyncStub) IsInterfaceNil() bool
- func (sss *StateSyncStub) SyncAllState(epoch uint32) error
- type TransactionCoordinatorMock
- func (tcm *TransactionCoordinatorMock) AddIntermediateTransactions(mapSCRs map[block.Type][]data.TransactionHandler) error
- func (tcm *TransactionCoordinatorMock) AddTransactions(txHandlers []data.TransactionHandler, blockType block.Type)
- func (tcm *TransactionCoordinatorMock) AddTxsFromMiniBlocks(miniBlocks block.MiniBlockSlice)
- func (tcm *TransactionCoordinatorMock) CreateBlockStarted()
- func (tcm *TransactionCoordinatorMock) CreateMarshalizedData(body *block.Body) map[string][][]byte
- func (tcm *TransactionCoordinatorMock) CreateMbsAndProcessCrossShardTransactionsDstMe(header data.HeaderHandler, ...) (block.MiniBlockSlice, uint32, bool, error)
- func (tcm *TransactionCoordinatorMock) CreateMbsAndProcessTransactionsFromMe(haveTime func() bool, _ []byte) block.MiniBlockSlice
- func (tcm *TransactionCoordinatorMock) CreatePostProcessMiniBlocks() block.MiniBlockSlice
- func (tcm *TransactionCoordinatorMock) CreateReceiptsHash() ([]byte, error)
- func (tcm *TransactionCoordinatorMock) GetAllCurrentLogs() []*data.LogData
- func (tcm *TransactionCoordinatorMock) GetAllCurrentUsedTxs(blockType block.Type) map[string]data.TransactionHandler
- func (tcm *TransactionCoordinatorMock) GetAllIntermediateTxs() map[block.Type]map[string]data.TransactionHandler
- func (tcm *TransactionCoordinatorMock) GetCreatedInShardMiniBlocks() []*block.MiniBlock
- func (tcm *TransactionCoordinatorMock) IsDataPreparedForProcessing(haveTime func() time.Duration) error
- func (tcm *TransactionCoordinatorMock) IsInterfaceNil() bool
- func (tcm *TransactionCoordinatorMock) ProcessBlockTransaction(header data.HeaderHandler, body *block.Body, haveTime func() time.Duration) error
- func (tcm *TransactionCoordinatorMock) RemoveBlockDataFromPool(body *block.Body) error
- func (tcm *TransactionCoordinatorMock) RemoveTxsFromPool(body *block.Body) error
- func (tcm *TransactionCoordinatorMock) RequestBlockTransactions(body *block.Body)
- func (tcm *TransactionCoordinatorMock) RequestMiniBlocks(header data.HeaderHandler)
- func (tcm *TransactionCoordinatorMock) RestoreBlockDataFromStorage(body *block.Body) (int, error)
- func (tcm *TransactionCoordinatorMock) SaveTxsToStorage(body *block.Body)
- func (tcm *TransactionCoordinatorMock) VerifyCreatedBlockTransactions(hdr data.HeaderHandler, body *block.Body) error
- func (tcm *TransactionCoordinatorMock) VerifyCreatedMiniBlocks(hdr data.HeaderHandler, body *block.Body) error
- type TrieFactoryStub
- type TrieSyncersStub
- func (tss *TrieSyncersStub) Add(key string, val update.TrieSyncer) error
- func (tss *TrieSyncersStub) AddMultiple(keys []string, interceptors []update.TrieSyncer) error
- func (tss *TrieSyncersStub) Get(key string) (update.TrieSyncer, error)
- func (tss *TrieSyncersStub) IsInterfaceNil() bool
- func (tss *TrieSyncersStub) Len() int
- func (tss *TrieSyncersStub) Remove(key string)
- func (tss *TrieSyncersStub) Replace(key string, val update.TrieSyncer) error
- func (tss *TrieSyncersStub) StartSyncing(rootHash []byte, ctx context.Context) error
- func (tss *TrieSyncersStub) Trie() common.Trie
- type Uint64ByteSliceConverterStub
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewOneShardCoordinatorMock ¶
func NewOneShardCoordinatorMock() *oneShardCoordinatorMock
NewOneShardCoordinatorMock -
Types ¶
type AccountsDBSyncerStub ¶
type AccountsDBSyncerStub struct { GetSyncedTriesCalled func() map[string]common.Trie SyncAccountsCalled func(rootHash []byte) error }
AccountsDBSyncerStub -
func (*AccountsDBSyncerStub) GetSyncedTries ¶
func (a *AccountsDBSyncerStub) GetSyncedTries() map[string]common.Trie
GetSyncedTries -
func (*AccountsDBSyncerStub) IsInterfaceNil ¶
func (a *AccountsDBSyncerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*AccountsDBSyncerStub) SyncAccounts ¶
func (a *AccountsDBSyncerStub) SyncAccounts(rootHash []byte) error
SyncAccounts -
type AccountsDBSyncersStub ¶
type AccountsDBSyncersStub struct { GetCalled func(key string) (update.AccountsDBSyncer, error) AddCalled func(key string, val update.AccountsDBSyncer) error AddMultipleCalled func(keys []string, interceptors []update.AccountsDBSyncer) error ReplaceCalled func(key string, val update.AccountsDBSyncer) error RemoveCalled func(key string) LenCalled func() int StartSyncingCalled func(rootHash []byte) error TrieCalled func() common.Trie }
AccountsDBSyncersStub -
func (*AccountsDBSyncersStub) Add ¶
func (a *AccountsDBSyncersStub) Add(key string, val update.AccountsDBSyncer) error
Add -
func (*AccountsDBSyncersStub) AddMultiple ¶
func (a *AccountsDBSyncersStub) AddMultiple(keys []string, interceptors []update.AccountsDBSyncer) error
AddMultiple -
func (*AccountsDBSyncersStub) Get ¶
func (a *AccountsDBSyncersStub) Get(key string) (update.AccountsDBSyncer, error)
Get -
func (*AccountsDBSyncersStub) IsInterfaceNil ¶
func (a *AccountsDBSyncersStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*AccountsDBSyncersStub) Replace ¶
func (a *AccountsDBSyncersStub) Replace(key string, val update.AccountsDBSyncer) error
Replace -
type AddressMock ¶
type AddressMock struct {
// contains filtered or unexported fields
}
AddressMock implements a mock address generator used in testing
func (*AddressMock) Bytes ¶
func (address *AddressMock) Bytes() []byte
Bytes returns the address' bytes
func (*AddressMock) IsInterfaceNil ¶
func (address *AddressMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type ChainStorerMock ¶
type ChainStorerMock struct { AddStorerCalled func(key dataRetriever.UnitType, s storage.Storer) GetStorerCalled func(unitType dataRetriever.UnitType) storage.Storer HasCalled func(unitType dataRetriever.UnitType, key []byte) error GetCalled func(unitType dataRetriever.UnitType, key []byte) ([]byte, error) PutCalled func(unitType dataRetriever.UnitType, key []byte, value []byte) error GetAllCalled func(unitType dataRetriever.UnitType, keys [][]byte) (map[string][]byte, error) GetAllStorersCalled func() map[dataRetriever.UnitType]storage.Storer DestroyCalled func() error }
ChainStorerMock is a mock implementation of the ChainStorer interface
func (*ChainStorerMock) AddStorer ¶
func (bc *ChainStorerMock) AddStorer(key dataRetriever.UnitType, s storage.Storer)
AddStorer will add a new storer to the chain map
func (*ChainStorerMock) Destroy ¶
func (bc *ChainStorerMock) Destroy() error
Destroy removes the underlying files/resources used by the storage service
func (*ChainStorerMock) Get ¶
func (bc *ChainStorerMock) Get(unitType dataRetriever.UnitType, key []byte) ([]byte, error)
Get returns the value for the given key if found in the selected storage unit, nil otherwise. It can return an error if the provided unit type is not supported or if the storage unit underlying implementation reports an error
func (*ChainStorerMock) GetAll ¶
func (bc *ChainStorerMock) GetAll(unitType dataRetriever.UnitType, keys [][]byte) (map[string][]byte, error)
GetAll gets all the elements with keys in the keys array, from the selected storage unit It can report an error if the provided unit type is not supported, if there is a missing key in the unit, or if the underlying implementation of the storage unit reports an error.
func (*ChainStorerMock) GetAllStorers ¶
func (bc *ChainStorerMock) GetAllStorers() map[dataRetriever.UnitType]storage.Storer
GetAllStorers -
func (*ChainStorerMock) GetStorer ¶
func (bc *ChainStorerMock) GetStorer(unitType dataRetriever.UnitType) storage.Storer
GetStorer returns the storer from the chain map or nil if the storer was not found
func (*ChainStorerMock) Has ¶
func (bc *ChainStorerMock) Has(unitType dataRetriever.UnitType, key []byte) error
Has returns true if the key is found in the selected Unit or false otherwise It can return an error if the provided unit type is not supported or if the underlying implementation of the storage unit reports an error.
func (*ChainStorerMock) IsInterfaceNil ¶
func (bc *ChainStorerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ChainStorerMock) Put ¶
func (bc *ChainStorerMock) Put(unitType dataRetriever.UnitType, key []byte, value []byte) error
Put stores the key, value pair in the selected storage unit It can return an error if the provided unit type is not supported or if the storage unit underlying implementation reports an error
func (*ChainStorerMock) SetEpochForPutOperation ¶
func (bc *ChainStorerMock) SetEpochForPutOperation(_ uint32)
SetEpochForPutOperation won't do anything
type CoordinatorStub ¶
type CoordinatorStub struct { NumberOfShardsCalled func() uint32 ComputeIdCalled func(address []byte) uint32 SelfIdCalled func() uint32 SameShardCalled func(firstAddress, secondAddress []byte) bool CommunicationIdentifierCalled func(destShardID uint32) string }
CoordinatorStub -
func (*CoordinatorStub) CommunicationIdentifier ¶
func (coordinator *CoordinatorStub) CommunicationIdentifier(destShardID uint32) string
CommunicationIdentifier -
func (*CoordinatorStub) ComputeId ¶
func (coordinator *CoordinatorStub) ComputeId(address []byte) uint32
ComputeId -
func (*CoordinatorStub) IsInterfaceNil ¶
func (coordinator *CoordinatorStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*CoordinatorStub) NumberOfShards ¶
func (coordinator *CoordinatorStub) NumberOfShards() uint32
NumberOfShards -
func (*CoordinatorStub) SameShard ¶
func (coordinator *CoordinatorStub) SameShard(firstAddress, secondAddress []byte) bool
SameShard -
type EpochHandlerStub ¶
type EpochHandlerStub struct { MetaEpochCalled func() uint32 ForceEpochStartCalled func(round uint64) }
EpochHandlerStub -
func (*EpochHandlerStub) ForceEpochStart ¶
func (ehs *EpochHandlerStub) ForceEpochStart(round uint64)
ForceEpochStart -
func (*EpochHandlerStub) IsInterfaceNil ¶
func (ehs *EpochHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
type EpochStartNotifierStub ¶
type EpochStartNotifierStub struct { RegisterHandlerCalled func(handler epochStart.ActionHandler) UnregisterHandlerCalled func(handler epochStart.ActionHandler) NotifyAllCalled func(hdr data.HeaderHandler) NotifyAllPrepareCalled func(hdr data.HeaderHandler, body data.BodyHandler) NotifyEpochChangeConfirmedCalled func(epoch uint32) RegisterForEpochChangeConfirmedCalled func(handler func(epoch uint32)) // contains filtered or unexported fields }
EpochStartNotifierStub -
func (*EpochStartNotifierStub) IsInterfaceNil ¶
func (esnm *EpochStartNotifierStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*EpochStartNotifierStub) NotifyAll ¶
func (esnm *EpochStartNotifierStub) NotifyAll(hdr data.HeaderHandler)
NotifyAll -
func (*EpochStartNotifierStub) NotifyAllPrepare ¶
func (esnm *EpochStartNotifierStub) NotifyAllPrepare(metaHdr data.HeaderHandler, body data.BodyHandler)
NotifyAllPrepare -
func (*EpochStartNotifierStub) NotifyEpochChangeConfirmed ¶
func (esnm *EpochStartNotifierStub) NotifyEpochChangeConfirmed(epoch uint32)
NotifyEpochChangeConfirmed -
func (*EpochStartNotifierStub) RegisterForEpochChangeConfirmed ¶
func (esnm *EpochStartNotifierStub) RegisterForEpochChangeConfirmed(handler func(epoch uint32))
RegisterForEpochChangeConfirmed -
func (*EpochStartNotifierStub) RegisterHandler ¶
func (esnm *EpochStartNotifierStub) RegisterHandler(handler epochStart.ActionHandler)
RegisterHandler -
func (*EpochStartNotifierStub) UnregisterHandler ¶
func (esnm *EpochStartNotifierStub) UnregisterHandler(handler epochStart.ActionHandler)
UnregisterHandler -
type EpochStartPendingMiniBlocksSyncHandlerMock ¶
type EpochStartPendingMiniBlocksSyncHandlerMock struct { SyncPendingMiniBlocksFromMetaCalled func(epochStart data.MetaHeaderHandler, unFinished map[string]data.MetaHeaderHandler, ctx context.Context) error GetMiniBlocksCalled func() (map[string]*block.MiniBlock, error) }
EpochStartPendingMiniBlocksSyncHandlerMock -
func (*EpochStartPendingMiniBlocksSyncHandlerMock) GetMiniBlocks ¶
func (ep *EpochStartPendingMiniBlocksSyncHandlerMock) GetMiniBlocks() (map[string]*block.MiniBlock, error)
GetMiniBlocks -
func (*EpochStartPendingMiniBlocksSyncHandlerMock) IsInterfaceNil ¶
func (ep *EpochStartPendingMiniBlocksSyncHandlerMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*EpochStartPendingMiniBlocksSyncHandlerMock) SyncPendingMiniBlocksFromMeta ¶
func (ep *EpochStartPendingMiniBlocksSyncHandlerMock) SyncPendingMiniBlocksFromMeta(epochStart data.MetaHeaderHandler, unFinished map[string]data.MetaHeaderHandler, ctx context.Context) error
SyncPendingMiniBlocksFromMeta -
type EpochStartTriesSyncHandlerMock ¶
type EpochStartTriesSyncHandlerMock struct { SyncTriesFromCalled func(meta data.MetaHeaderHandler) error GetTriesCalled func() (map[string]common.Trie, error) }
EpochStartTriesSyncHandlerMock -
func (*EpochStartTriesSyncHandlerMock) GetTries ¶
func (es *EpochStartTriesSyncHandlerMock) GetTries() (map[string]common.Trie, error)
GetTries -
func (*EpochStartTriesSyncHandlerMock) IsInterfaceNil ¶
func (es *EpochStartTriesSyncHandlerMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*EpochStartTriesSyncHandlerMock) SyncTriesFrom ¶
func (es *EpochStartTriesSyncHandlerMock) SyncTriesFrom(meta data.MetaHeaderHandler) error
SyncTriesFrom -
type EpochStartTriggerStub ¶
type EpochStartTriggerStub struct { ForceEpochStartCalled func(round uint64) error IsEpochStartCalled func() bool EpochCalled func() uint32 ReceivedHeaderCalled func(handler data.HeaderHandler) UpdateCalled func(round uint64) ProcessedCalled func(header data.HeaderHandler) EpochStartRoundCalled func() uint64 EpochStartMetaHdrHashCalled func() []byte }
EpochStartTriggerStub -
func (*EpochStartTriggerStub) EpochFinalityAttestingRound ¶
func (e *EpochStartTriggerStub) EpochFinalityAttestingRound() uint64
EpochFinalityAttestingRound -
func (*EpochStartTriggerStub) EpochStartMetaHdrHash ¶
func (e *EpochStartTriggerStub) EpochStartMetaHdrHash() []byte
EpochStartMetaHdrHash -
func (*EpochStartTriggerStub) EpochStartRound ¶
func (e *EpochStartTriggerStub) EpochStartRound() uint64
EpochStartRound -
func (*EpochStartTriggerStub) ForceEpochStart ¶
func (e *EpochStartTriggerStub) ForceEpochStart(round uint64) error
ForceEpochStart -
func (*EpochStartTriggerStub) GetRoundsPerEpoch ¶
func (e *EpochStartTriggerStub) GetRoundsPerEpoch() uint64
GetRoundsPerEpoch -
func (*EpochStartTriggerStub) IsEpochStart ¶
func (e *EpochStartTriggerStub) IsEpochStart() bool
IsEpochStart -
func (*EpochStartTriggerStub) IsInterfaceNil ¶
func (e *EpochStartTriggerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*EpochStartTriggerStub) NotifyAll ¶
func (e *EpochStartTriggerStub) NotifyAll(_ data.HeaderHandler)
NotifyAll -
func (*EpochStartTriggerStub) ReceivedHeader ¶
func (e *EpochStartTriggerStub) ReceivedHeader(header data.HeaderHandler)
ReceivedHeader -
func (*EpochStartTriggerStub) SetCurrentEpochStartRound ¶
func (e *EpochStartTriggerStub) SetCurrentEpochStartRound(_ uint64)
SetCurrentEpochStartRound -
func (*EpochStartTriggerStub) SetEpoch ¶
func (e *EpochStartTriggerStub) SetEpoch(_ uint32)
SetEpoch -
func (*EpochStartTriggerStub) SetFinalityAttestingRound ¶
func (e *EpochStartTriggerStub) SetFinalityAttestingRound(_ uint64)
SetFinalityAttestingRound -
func (*EpochStartTriggerStub) SetProcessed ¶
func (e *EpochStartTriggerStub) SetProcessed(header data.HeaderHandler)
SetProcessed -
func (*EpochStartTriggerStub) SetRoundsPerEpoch ¶
func (e *EpochStartTriggerStub) SetRoundsPerEpoch(_ uint64)
SetRoundsPerEpoch -
func (*EpochStartTriggerStub) SetTrigger ¶
func (e *EpochStartTriggerStub) SetTrigger(_ epochStart.TriggerHandler)
SetTrigger -
func (*EpochStartTriggerStub) Update ¶
func (e *EpochStartTriggerStub) Update(round uint64)
Update -
type ExportFactoryHandlerStub ¶
type ExportFactoryHandlerStub struct {
CreateCalled func() (update.ExportHandler, error)
}
ExportFactoryHandlerStub -
func (*ExportFactoryHandlerStub) Create ¶
func (e *ExportFactoryHandlerStub) Create() (update.ExportHandler, error)
Create -
func (*ExportFactoryHandlerStub) IsInterfaceNil ¶
func (e *ExportFactoryHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
type ExportHandlerStub ¶
ExportHandlerStub -
func (*ExportHandlerStub) ExportAll ¶
func (e *ExportHandlerStub) ExportAll(epoch uint32) error
ExportAll -
func (*ExportHandlerStub) IsInterfaceNil ¶
func (e *ExportHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
type GenesisNodesSetupHandlerStub ¶
type GenesisNodesSetupHandlerStub struct { InitialNodesInfoForShardCalled func(shardId uint32) ([]nodesCoordinator.GenesisNodeInfoHandler, []nodesCoordinator.GenesisNodeInfoHandler, error) InitialNodesInfoCalled func() (map[uint32][]nodesCoordinator.GenesisNodeInfoHandler, map[uint32][]nodesCoordinator.GenesisNodeInfoHandler) GetStartTimeCalled func() int64 GetRoundDurationCalled func() uint64 GetChainIdCalled func() string GetMinTransactionVersionCalled func() uint32 GetShardConsensusGroupSizeCalled func() uint32 GetMetaConsensusGroupSizeCalled func() uint32 MinNumberOfShardNodesCalled func() uint32 MinNumberOfMetaNodesCalled func() uint32 GetHysteresisCalled func() float32 GetAdaptivityCalled func() bool NumberOfShardsCalled func() uint32 MinNumberOfNodesCalled func() uint32 }
GenesisNodesSetupHandlerStub -
func (*GenesisNodesSetupHandlerStub) GetAdaptivity ¶
func (g *GenesisNodesSetupHandlerStub) GetAdaptivity() bool
GetAdaptivity -
func (*GenesisNodesSetupHandlerStub) GetChainId ¶
func (g *GenesisNodesSetupHandlerStub) GetChainId() string
GetChainId -
func (*GenesisNodesSetupHandlerStub) GetHysteresis ¶
func (g *GenesisNodesSetupHandlerStub) GetHysteresis() float32
GetHysteresis -
func (*GenesisNodesSetupHandlerStub) GetMetaConsensusGroupSize ¶
func (g *GenesisNodesSetupHandlerStub) GetMetaConsensusGroupSize() uint32
GetMetaConsensusGroupSize -
func (*GenesisNodesSetupHandlerStub) GetMinTransactionVersion ¶
func (g *GenesisNodesSetupHandlerStub) GetMinTransactionVersion() uint32
GetMinTransactionVersion -
func (*GenesisNodesSetupHandlerStub) GetRoundDuration ¶
func (g *GenesisNodesSetupHandlerStub) GetRoundDuration() uint64
GetRoundDuration -
func (*GenesisNodesSetupHandlerStub) GetShardConsensusGroupSize ¶
func (g *GenesisNodesSetupHandlerStub) GetShardConsensusGroupSize() uint32
GetShardConsensusGroupSize -
func (*GenesisNodesSetupHandlerStub) GetStartTime ¶
func (g *GenesisNodesSetupHandlerStub) GetStartTime() int64
GetStartTime -
func (*GenesisNodesSetupHandlerStub) InitialNodesInfo ¶
func (g *GenesisNodesSetupHandlerStub) InitialNodesInfo() (map[uint32][]nodesCoordinator.GenesisNodeInfoHandler, map[uint32][]nodesCoordinator.GenesisNodeInfoHandler)
InitialNodesInfo -
func (*GenesisNodesSetupHandlerStub) InitialNodesInfoForShard ¶
func (g *GenesisNodesSetupHandlerStub) InitialNodesInfoForShard(shardId uint32) ([]nodesCoordinator.GenesisNodeInfoHandler, []nodesCoordinator.GenesisNodeInfoHandler, error)
InitialNodesInfoForShard -
func (*GenesisNodesSetupHandlerStub) IsInterfaceNil ¶
func (g *GenesisNodesSetupHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*GenesisNodesSetupHandlerStub) MinNumberOfMetaNodes ¶
func (g *GenesisNodesSetupHandlerStub) MinNumberOfMetaNodes() uint32
MinNumberOfMetaNodes -
func (*GenesisNodesSetupHandlerStub) MinNumberOfNodes ¶
func (g *GenesisNodesSetupHandlerStub) MinNumberOfNodes() uint32
MinNumberOfNodes -
func (*GenesisNodesSetupHandlerStub) MinNumberOfShardNodes ¶
func (g *GenesisNodesSetupHandlerStub) MinNumberOfShardNodes() uint32
MinNumberOfShardNodes -
func (*GenesisNodesSetupHandlerStub) NumberOfShards ¶
func (g *GenesisNodesSetupHandlerStub) NumberOfShards() uint32
NumberOfShards -
type HardForkBlockProcessor ¶
type HardForkBlockProcessor struct { CreateBlockCalled func( body *block.Body, chainID string, round uint64, nonce uint64, epoch uint32, ) (data.HeaderHandler, error) CreateBodyCalled func() (*block.Body, []*update.MbInfo, error) CreatePostMiniBlocksCalled func(mbsInfo []*update.MbInfo) (*block.Body, []*update.MbInfo, error) }
HardForkBlockProcessor -
func (*HardForkBlockProcessor) CreateBlock ¶
func (hfbp *HardForkBlockProcessor) CreateBlock(body *block.Body, chainID string, round uint64, nonce uint64, epoch uint32) (data.HeaderHandler, error)
CreateBlock -
func (*HardForkBlockProcessor) CreateBody ¶
CreateBody -
func (*HardForkBlockProcessor) CreatePostMiniBlocks ¶
func (hfbp *HardForkBlockProcessor) CreatePostMiniBlocks(mbsInfo []*update.MbInfo) (*block.Body, []*update.MbInfo, error)
CreatePostMiniBlocks -
func (*HardForkBlockProcessor) IsInterfaceNil ¶
func (hfbp *HardForkBlockProcessor) IsInterfaceNil() bool
IsInterfaceNil returns true if underlying object is nil
type HardforkStorerStub ¶
type HardforkStorerStub struct { WriteCalled func(identifier string, key []byte, value []byte) error FinishedIdentifierCalled func(identifier string) error RangeKeysCalled func(handler func(identifier string, keys [][]byte) bool) GetCalled func(identifier string, key []byte) ([]byte, error) CloseCalled func() error }
HardforkStorerStub -
func (*HardforkStorerStub) FinishedIdentifier ¶
func (hss *HardforkStorerStub) FinishedIdentifier(identifier string) error
FinishedIdentifier -
func (*HardforkStorerStub) Get ¶
func (hss *HardforkStorerStub) Get(identifier string, key []byte) ([]byte, error)
Get -
func (*HardforkStorerStub) IsInterfaceNil ¶
func (hss *HardforkStorerStub) IsInterfaceNil() bool
IsInterfaceNil -
type HasherStub ¶
HasherStub -
func (*HasherStub) IsInterfaceNil ¶
func (hash *HasherStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type HeaderSyncHandlerStub ¶
type HeaderSyncHandlerStub struct { SyncUnFinishedMetaHeadersCalled func(epoch uint32) error GetEpochStartMetaBlockCalled func() (data.MetaHeaderHandler, error) GetUnFinishedMetaBlocksCalled func() (map[string]data.MetaHeaderHandler, error) }
HeaderSyncHandlerStub -
func (*HeaderSyncHandlerStub) GetEpochStartMetaBlock ¶
func (hsh *HeaderSyncHandlerStub) GetEpochStartMetaBlock() (data.MetaHeaderHandler, error)
GetEpochStartMetaBlock -
func (*HeaderSyncHandlerStub) GetUnFinishedMetaBlocks ¶
func (hsh *HeaderSyncHandlerStub) GetUnFinishedMetaBlocks() (map[string]data.MetaHeaderHandler, error)
GetUnFinishedMetaBlocks -
func (*HeaderSyncHandlerStub) IsInterfaceNil ¶
func (hsh *HeaderSyncHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*HeaderSyncHandlerStub) SyncUnFinishedMetaHeaders ¶
func (hsh *HeaderSyncHandlerStub) SyncUnFinishedMetaHeaders(epoch uint32) error
SyncUnFinishedMetaHeaders -
type HeaderValidatorStub ¶
type HeaderValidatorStub struct {
IsHeaderConstructionValidCalled func(currHdr, prevHdr data.HeaderHandler) error
}
HeaderValidatorStub -
func (*HeaderValidatorStub) IsHeaderConstructionValid ¶
func (hvs *HeaderValidatorStub) IsHeaderConstructionValid(currHdr, prevHdr data.HeaderHandler) error
IsHeaderConstructionValid -
func (*HeaderValidatorStub) IsInterfaceNil ¶
func (hvs *HeaderValidatorStub) IsInterfaceNil() bool
IsInterfaceNil returns if underlying object is true
type HeadersCacherStub ¶
type HeadersCacherStub struct { AddCalled func(headerHash []byte, header data.HeaderHandler) RemoveHeaderByHashCalled func(headerHash []byte) RemoveHeaderByNonceAndShardIdCalled func(hdrNonce uint64, shardId uint32) GetHeaderByNonceAndShardIdCalled func(hdrNonce uint64, shardId uint32) ([]data.HeaderHandler, [][]byte, error) GetHeaderByHashCalled func(hash []byte) (data.HeaderHandler, error) ClearCalled func() RegisterHandlerCalled func(handler func(header data.HeaderHandler, shardHeaderHash []byte)) NoncesCalled func(shardId uint32) []uint64 LenCalled func() int MaxSizeCalled func() int GetNumHeadersCalled func(shardId uint32) int }
HeadersCacherStub -
func (*HeadersCacherStub) AddHeader ¶
func (hcs *HeadersCacherStub) AddHeader(headerHash []byte, header data.HeaderHandler)
AddHeader -
func (*HeadersCacherStub) GetHeaderByHash ¶
func (hcs *HeadersCacherStub) GetHeaderByHash(hash []byte) (data.HeaderHandler, error)
GetHeaderByHash -
func (*HeadersCacherStub) GetHeadersByNonceAndShardId ¶
func (hcs *HeadersCacherStub) GetHeadersByNonceAndShardId(hdrNonce uint64, shardId uint32) ([]data.HeaderHandler, [][]byte, error)
GetHeadersByNonceAndShardId -
func (*HeadersCacherStub) GetNumHeaders ¶
func (hcs *HeadersCacherStub) GetNumHeaders(shardId uint32) int
GetNumHeaders -
func (*HeadersCacherStub) IsInterfaceNil ¶
func (hcs *HeadersCacherStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*HeadersCacherStub) Nonces ¶
func (hcs *HeadersCacherStub) Nonces(shardId uint32) []uint64
Nonces -
func (*HeadersCacherStub) RegisterHandler ¶
func (hcs *HeadersCacherStub) RegisterHandler(handler func(header data.HeaderHandler, shardHeaderHash []byte))
RegisterHandler -
func (*HeadersCacherStub) RemoveHeaderByHash ¶
func (hcs *HeadersCacherStub) RemoveHeaderByHash(headerHash []byte)
RemoveHeaderByHash -
func (*HeadersCacherStub) RemoveHeaderByNonceAndShardId ¶
func (hcs *HeadersCacherStub) RemoveHeaderByNonceAndShardId(hdrNonce uint64, shardId uint32)
RemoveHeaderByNonceAndShardId -
type ImportHandlerStub ¶
type ImportHandlerStub struct { ImportAllCalled func() error GetValidatorAccountsDBCalled func() state.AccountsAdapter GetMiniBlocksCalled func() map[string]*block.MiniBlock GetHardForkMetaBlockCalled func() data.MetaHeaderHandler GetUnFinishedMetaBlocksCalled func() map[string]data.MetaHeaderHandler GetTransactionsCalled func() map[string]data.TransactionHandler GetAccountsDBForShardCalled func(shardID uint32) state.AccountsAdapter CloseCalled func() error }
ImportHandlerStub -
func (*ImportHandlerStub) GetAccountsDBForShard ¶
func (ihs *ImportHandlerStub) GetAccountsDBForShard(shardID uint32) state.AccountsAdapter
GetAccountsDBForShard -
func (*ImportHandlerStub) GetHardForkMetaBlock ¶
func (ihs *ImportHandlerStub) GetHardForkMetaBlock() data.MetaHeaderHandler
GetHardForkMetaBlock -
func (*ImportHandlerStub) GetMiniBlocks ¶
func (ihs *ImportHandlerStub) GetMiniBlocks() map[string]*block.MiniBlock
GetMiniBlocks -
func (*ImportHandlerStub) GetTransactions ¶
func (ihs *ImportHandlerStub) GetTransactions() map[string]data.TransactionHandler
GetTransactions -
func (*ImportHandlerStub) GetUnFinishedMetaBlocks ¶
func (ihs *ImportHandlerStub) GetUnFinishedMetaBlocks() map[string]data.MetaHeaderHandler
GetUnFinishedMetaBlocks -
func (*ImportHandlerStub) GetValidatorAccountsDB ¶
func (ihs *ImportHandlerStub) GetValidatorAccountsDB() state.AccountsAdapter
GetValidatorAccountsDB -
func (*ImportHandlerStub) IsInterfaceNil ¶
func (ihs *ImportHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
type ImportStartHandlerStub ¶
type ImportStartHandlerStub struct { SetStartImportCalled func() error ResetStartImportCalled func() error IsAfterExportBeforeImportCalled func() bool ShouldStartImportCalled func() bool }
ImportStartHandlerStub -
func (*ImportStartHandlerStub) IsAfterExportBeforeImport ¶
func (ish *ImportStartHandlerStub) IsAfterExportBeforeImport() bool
IsAfterExportBeforeImport -
func (*ImportStartHandlerStub) IsInterfaceNil ¶
func (ish *ImportStartHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*ImportStartHandlerStub) ResetStartImport ¶
func (ish *ImportStartHandlerStub) ResetStartImport() error
ResetStartImport -
func (*ImportStartHandlerStub) SetStartImport ¶
func (ish *ImportStartHandlerStub) SetStartImport() error
SetStartImport -
func (*ImportStartHandlerStub) ShouldStartImport ¶
func (ish *ImportStartHandlerStub) ShouldStartImport() bool
ShouldStartImport -
type MarshalizerFake ¶
type MarshalizerFake struct {
Fail bool
}
MarshalizerFake that will be used for testing
func (*MarshalizerFake) IsInterfaceNil ¶
func (mm *MarshalizerFake) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*MarshalizerFake) Marshal ¶
func (mm *MarshalizerFake) Marshal(obj interface{}) ([]byte, error)
Marshal converts the input object in a slice of bytes
func (*MarshalizerFake) Unmarshal ¶
func (mm *MarshalizerFake) Unmarshal(obj interface{}, buff []byte) error
Unmarshal applies the serialized values over an instantiated object
type MarshalizerMock ¶
type MarshalizerMock struct {
Fail bool
}
MarshalizerMock that will be used for testing
func (*MarshalizerMock) IsInterfaceNil ¶
func (mm *MarshalizerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*MarshalizerMock) Marshal ¶
func (mm *MarshalizerMock) Marshal(obj interface{}) ([]byte, error)
Marshal converts the input object in a slice of bytes
func (*MarshalizerMock) Unmarshal ¶
func (mm *MarshalizerMock) Unmarshal(obj interface{}, buff []byte) error
Unmarshal applies the serialized values over an instantiated object
type PendingTransactionProcessorStub ¶
type PendingTransactionProcessorStub struct { ProcessTransactionsDstMeCalled func(mbInfo *update.MbInfo) (*block.MiniBlock, error) RootHashCalled func() ([]byte, error) CommitCalled func() ([]byte, error) }
PendingTransactionProcessorStub -
func (*PendingTransactionProcessorStub) Commit ¶
func (ptps *PendingTransactionProcessorStub) Commit() ([]byte, error)
Commit -
func (*PendingTransactionProcessorStub) IsInterfaceNil ¶
func (ptps *PendingTransactionProcessorStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*PendingTransactionProcessorStub) ProcessTransactionsDstMe ¶
func (ptps *PendingTransactionProcessorStub) ProcessTransactionsDstMe(mbInfo *update.MbInfo) (*block.MiniBlock, error)
ProcessTransactionsDstMe -
func (*PendingTransactionProcessorStub) RootHash ¶
func (ptps *PendingTransactionProcessorStub) RootHash() ([]byte, error)
RootHash -
type PubkeyConverterStub ¶
type PubkeyConverterStub struct { LenCalled func() int DecodeCalled func(humanReadable string) ([]byte, error) EncodeCalled func(pkBytes []byte) string }
PubkeyConverterStub -
func (*PubkeyConverterStub) Decode ¶
func (pcs *PubkeyConverterStub) Decode(humanReadable string) ([]byte, error)
Decode -
func (*PubkeyConverterStub) Encode ¶
func (pcs *PubkeyConverterStub) Encode(pkBytes []byte) string
Encode -
func (*PubkeyConverterStub) IsInterfaceNil ¶
func (pcs *PubkeyConverterStub) IsInterfaceNil() bool
IsInterfaceNil -
type RoundHandlerStub ¶
type RoundHandlerStub struct { RoundIndex int64 IndexCalled func() int64 TimeDurationCalled func() time.Duration TimeStampCalled func() time.Time UpdateRoundCalled func(time.Time, time.Time) RemainingTimeCalled func(startTime time.Time, maxTime time.Duration) time.Duration }
RoundHandlerStub -
func (*RoundHandlerStub) IsInterfaceNil ¶
func (rhs *RoundHandlerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*RoundHandlerStub) RemainingTime ¶
func (rhs *RoundHandlerStub) RemainingTime(startTime time.Time, maxTime time.Duration) time.Duration
RemainingTime -
func (*RoundHandlerStub) TimeDuration ¶
func (rhs *RoundHandlerStub) TimeDuration() time.Duration
TimeDuration -
func (*RoundHandlerStub) UpdateRound ¶
func (rhs *RoundHandlerStub) UpdateRound(genesisRoundTimeStamp time.Time, timeStamp time.Time)
UpdateRound -
type StateSyncStub ¶
type StateSyncStub struct { GetEpochStartMetaBlockCalled func() (data.MetaHeaderHandler, error) GetUnFinishedMetaBlocksCalled func() (map[string]data.MetaHeaderHandler, error) SyncAllStateCalled func(epoch uint32) error GetAllTriesCalled func() (map[string]common.Trie, error) GetAllTransactionsCalled func() (map[string]data.TransactionHandler, error) GetAllMiniBlocksCalled func() (map[string]*block.MiniBlock, error) }
StateSyncStub -
func (*StateSyncStub) GetAllMiniBlocks ¶
func (sss *StateSyncStub) GetAllMiniBlocks() (map[string]*block.MiniBlock, error)
GetAllMiniBlocks -
func (*StateSyncStub) GetAllTransactions ¶
func (sss *StateSyncStub) GetAllTransactions() (map[string]data.TransactionHandler, error)
GetAllTransactions -
func (*StateSyncStub) GetAllTries ¶
func (sss *StateSyncStub) GetAllTries() (map[string]common.Trie, error)
GetAllTries -
func (*StateSyncStub) GetEpochStartMetaBlock ¶
func (sss *StateSyncStub) GetEpochStartMetaBlock() (data.MetaHeaderHandler, error)
GetEpochStartMetaBlock -
func (*StateSyncStub) GetUnFinishedMetaBlocks ¶
func (sss *StateSyncStub) GetUnFinishedMetaBlocks() (map[string]data.MetaHeaderHandler, error)
GetUnFinishedMetaBlocks -
func (*StateSyncStub) IsInterfaceNil ¶
func (sss *StateSyncStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*StateSyncStub) SyncAllState ¶
func (sss *StateSyncStub) SyncAllState(epoch uint32) error
SyncAllState -
type TransactionCoordinatorMock ¶
type TransactionCoordinatorMock struct { ComputeTransactionTypeCalled func(tx data.TransactionHandler) (process.TransactionType, error) RequestMiniBlocksCalled func(header data.HeaderHandler) RequestBlockTransactionsCalled func(body *block.Body) IsDataPreparedForProcessingCalled func(haveTime func() time.Duration) error SaveTxsToStorageCalled func(body *block.Body) RestoreBlockDataFromStorageCalled func(body *block.Body) (int, error) RemoveBlockDataFromPoolCalled func(body *block.Body) error RemoveTxsFromPoolCalled func(body *block.Body) error ProcessBlockTransactionCalled func(header data.HeaderHandler, body *block.Body, haveTime func() time.Duration) error CreateBlockStartedCalled func() CreateMbsAndProcessCrossShardTransactionsDstMeCalled func(header data.HeaderHandler, processedMiniBlocksInfo map[string]*processedMb.ProcessedMiniBlockInfo, haveTime func() bool, haveAdditionalTime func() bool, scheduledMode bool) (block.MiniBlockSlice, uint32, bool, error) CreateMbsAndProcessTransactionsFromMeCalled func(haveTime func() bool) block.MiniBlockSlice CreateMarshalizedDataCalled func(body *block.Body) map[string][][]byte GetCreatedInShardMiniBlocksCalled func() []*block.MiniBlock GetAllCurrentUsedTxsCalled func(blockType block.Type) map[string]data.TransactionHandler VerifyCreatedBlockTransactionsCalled func(hdr data.HeaderHandler, body *block.Body) error CreatePostProcessMiniBlocksCalled func() block.MiniBlockSlice VerifyCreatedMiniBlocksCalled func(hdr data.HeaderHandler, body *block.Body) error AddIntermediateTransactionsCalled func(mapSCRs map[block.Type][]data.TransactionHandler) error GetAllIntermediateTxsCalled func() map[block.Type]map[string]data.TransactionHandler AddTxsFromMiniBlocksCalled func(miniBlocks block.MiniBlockSlice) AddTransactionsCalled func(txHandlers []data.TransactionHandler, blockType block.Type) }
TransactionCoordinatorMock -
func (*TransactionCoordinatorMock) AddIntermediateTransactions ¶
func (tcm *TransactionCoordinatorMock) AddIntermediateTransactions(mapSCRs map[block.Type][]data.TransactionHandler) error
AddIntermediateTransactions -
func (*TransactionCoordinatorMock) AddTransactions ¶
func (tcm *TransactionCoordinatorMock) AddTransactions(txHandlers []data.TransactionHandler, blockType block.Type)
AddTransactions -
func (*TransactionCoordinatorMock) AddTxsFromMiniBlocks ¶
func (tcm *TransactionCoordinatorMock) AddTxsFromMiniBlocks(miniBlocks block.MiniBlockSlice)
AddTxsFromMiniBlocks -
func (*TransactionCoordinatorMock) CreateBlockStarted ¶
func (tcm *TransactionCoordinatorMock) CreateBlockStarted()
CreateBlockStarted -
func (*TransactionCoordinatorMock) CreateMarshalizedData ¶
func (tcm *TransactionCoordinatorMock) CreateMarshalizedData(body *block.Body) map[string][][]byte
CreateMarshalizedData -
func (*TransactionCoordinatorMock) CreateMbsAndProcessCrossShardTransactionsDstMe ¶
func (tcm *TransactionCoordinatorMock) CreateMbsAndProcessCrossShardTransactionsDstMe( header data.HeaderHandler, processedMiniBlocksInfo map[string]*processedMb.ProcessedMiniBlockInfo, haveTime func() bool, haveAdditionalTime func() bool, scheduledMode bool, ) (block.MiniBlockSlice, uint32, bool, error)
CreateMbsAndProcessCrossShardTransactionsDstMe -
func (*TransactionCoordinatorMock) CreateMbsAndProcessTransactionsFromMe ¶
func (tcm *TransactionCoordinatorMock) CreateMbsAndProcessTransactionsFromMe(haveTime func() bool, _ []byte) block.MiniBlockSlice
CreateMbsAndProcessTransactionsFromMe -
func (*TransactionCoordinatorMock) CreatePostProcessMiniBlocks ¶
func (tcm *TransactionCoordinatorMock) CreatePostProcessMiniBlocks() block.MiniBlockSlice
CreatePostProcessMiniBlocks -
func (*TransactionCoordinatorMock) CreateReceiptsHash ¶
func (tcm *TransactionCoordinatorMock) CreateReceiptsHash() ([]byte, error)
CreateReceiptsHash -
func (*TransactionCoordinatorMock) GetAllCurrentLogs ¶
func (tcm *TransactionCoordinatorMock) GetAllCurrentLogs() []*data.LogData
GetAllCurrentLogs -
func (*TransactionCoordinatorMock) GetAllCurrentUsedTxs ¶
func (tcm *TransactionCoordinatorMock) GetAllCurrentUsedTxs(blockType block.Type) map[string]data.TransactionHandler
GetAllCurrentUsedTxs -
func (*TransactionCoordinatorMock) GetAllIntermediateTxs ¶
func (tcm *TransactionCoordinatorMock) GetAllIntermediateTxs() map[block.Type]map[string]data.TransactionHandler
GetAllIntermediateTxs -
func (*TransactionCoordinatorMock) GetCreatedInShardMiniBlocks ¶
func (tcm *TransactionCoordinatorMock) GetCreatedInShardMiniBlocks() []*block.MiniBlock
GetCreatedInShardMiniBlocks -
func (*TransactionCoordinatorMock) IsDataPreparedForProcessing ¶
func (tcm *TransactionCoordinatorMock) IsDataPreparedForProcessing(haveTime func() time.Duration) error
IsDataPreparedForProcessing -
func (*TransactionCoordinatorMock) IsInterfaceNil ¶
func (tcm *TransactionCoordinatorMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*TransactionCoordinatorMock) ProcessBlockTransaction ¶
func (tcm *TransactionCoordinatorMock) ProcessBlockTransaction(header data.HeaderHandler, body *block.Body, haveTime func() time.Duration) error
ProcessBlockTransaction -
func (*TransactionCoordinatorMock) RemoveBlockDataFromPool ¶
func (tcm *TransactionCoordinatorMock) RemoveBlockDataFromPool(body *block.Body) error
RemoveBlockDataFromPool -
func (*TransactionCoordinatorMock) RemoveTxsFromPool ¶
func (tcm *TransactionCoordinatorMock) RemoveTxsFromPool(body *block.Body) error
RemoveTxsFromPool -
func (*TransactionCoordinatorMock) RequestBlockTransactions ¶
func (tcm *TransactionCoordinatorMock) RequestBlockTransactions(body *block.Body)
RequestBlockTransactions -
func (*TransactionCoordinatorMock) RequestMiniBlocks ¶
func (tcm *TransactionCoordinatorMock) RequestMiniBlocks(header data.HeaderHandler)
RequestMiniBlocks -
func (*TransactionCoordinatorMock) RestoreBlockDataFromStorage ¶
func (tcm *TransactionCoordinatorMock) RestoreBlockDataFromStorage(body *block.Body) (int, error)
RestoreBlockDataFromStorage -
func (*TransactionCoordinatorMock) SaveTxsToStorage ¶
func (tcm *TransactionCoordinatorMock) SaveTxsToStorage(body *block.Body)
SaveTxsToStorage -
func (*TransactionCoordinatorMock) VerifyCreatedBlockTransactions ¶
func (tcm *TransactionCoordinatorMock) VerifyCreatedBlockTransactions(hdr data.HeaderHandler, body *block.Body) error
VerifyCreatedBlockTransactions -
func (*TransactionCoordinatorMock) VerifyCreatedMiniBlocks ¶
func (tcm *TransactionCoordinatorMock) VerifyCreatedMiniBlocks(hdr data.HeaderHandler, body *block.Body) error
VerifyCreatedMiniBlocks -
type TrieFactoryStub ¶
type TrieFactoryStub struct {
CreateCalled func(config config.StorageConfig, s string, b bool) (common.StorageManager, common.Trie, error)
}
TrieFactoryStub -
func (*TrieFactoryStub) Create ¶
func (t *TrieFactoryStub) Create(config config.StorageConfig, s string, b bool) (common.StorageManager, common.Trie, error)
Create -
func (*TrieFactoryStub) IsInterfaceNil ¶
func (t *TrieFactoryStub) IsInterfaceNil() bool
IsInterfaceNil -
type TrieSyncersStub ¶
type TrieSyncersStub struct { GetCalled func(key string) (update.TrieSyncer, error) AddCalled func(key string, val update.TrieSyncer) error AddMultipleCalled func(keys []string, interceptors []update.TrieSyncer) error ReplaceCalled func(key string, val update.TrieSyncer) error RemoveCalled func(key string) LenCalled func() int StartSyncingCalled func(rootHash []byte, ctx context.Context) error TrieCalled func() common.Trie }
TrieSyncersStub -
func (*TrieSyncersStub) Add ¶
func (tss *TrieSyncersStub) Add(key string, val update.TrieSyncer) error
Add -
func (*TrieSyncersStub) AddMultiple ¶
func (tss *TrieSyncersStub) AddMultiple(keys []string, interceptors []update.TrieSyncer) error
AddMultiple -
func (*TrieSyncersStub) Get ¶
func (tss *TrieSyncersStub) Get(key string) (update.TrieSyncer, error)
Get -
func (*TrieSyncersStub) IsInterfaceNil ¶
func (tss *TrieSyncersStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*TrieSyncersStub) Replace ¶
func (tss *TrieSyncersStub) Replace(key string, val update.TrieSyncer) error
Replace -
func (*TrieSyncersStub) StartSyncing ¶
func (tss *TrieSyncersStub) StartSyncing(rootHash []byte, ctx context.Context) error
StartSyncing -
type Uint64ByteSliceConverterStub ¶
type Uint64ByteSliceConverterStub struct { ToByteSliceCalled func(uint64) []byte ToUint64Called func([]byte) (uint64, error) }
Uint64ByteSliceConverterStub converts byte slice to/from uint64
func (*Uint64ByteSliceConverterStub) IsInterfaceNil ¶
func (u *Uint64ByteSliceConverterStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*Uint64ByteSliceConverterStub) ToByteSlice ¶
func (u *Uint64ByteSliceConverterStub) ToByteSlice(p uint64) []byte
ToByteSlice is a mock implementation for Uint64ByteSliceConverter
Source Files ¶
- accountsDBSyncerStub.go
- accountsDBSyncersStub.go
- addressMock.go
- chainStorerMock.go
- closerStub.go
- coordinatorStub.go
- endOfEpochTriggerStub.go
- epochHandlerStub.go
- epochMiniBlocksSyncHandlerMock.go
- epochStartNotifierStub.go
- epochStartTriesSyncHandlerMock.go
- exportFactoryHandlerStub.go
- exportHandlerStub.go
- hardForkBlockProcessor.go
- hardforkStorerStub.go
- hasherStub.go
- headerSyncHandlerStub.go
- headerValidatorStub.go
- headersCacherStub.go
- importHandlerStub.go
- importStartHandlerStub.go
- marshalizerFake.go
- marshalizerMock.go
- nodesSetupHandlerStub.go
- oneShardCoordinatorMock.go
- pendingTransactionProcessorStub.go
- pubkeyConverterStub.go
- roundHandlerStub.go
- stateSyncStub.go
- transactionCoordinatorMock.go
- trieFactoryStub.go
- trieSyncersStub.go
- uint64ByteSliceConverterStub.go