Documentation ¶
Index ¶
- func NewMultiShardsCoordinatorMock(nrShard uint32) *multipleShardsCoordinatorMock
- func NewMultipleShardsCoordinatorMock() *multipleShardsCoordinatorMock
- func NewNonceHashConverterMock() *nonceHashConverterMock
- func NewOneShardCoordinatorMock() *oneShardCoordinatorMock
- type AccountsDBSyncerStub
- type AntifloodDebuggerStub
- type ArgumentParserMock
- func (ap *ArgumentParserMock) CreateDataFromStorageUpdate(storageUpdates []*vmcommon.StorageUpdate) string
- func (ap *ArgumentParserMock) GetStorageUpdates(data string) ([]*vmcommon.StorageUpdate, error)
- func (ap *ArgumentParserMock) IsInterfaceNil() bool
- func (ap *ArgumentParserMock) ParseArguments(data string) ([][]byte, error)
- func (ap *ArgumentParserMock) ParseCallData(data string) (string, [][]byte, error)
- func (ap *ArgumentParserMock) ParseDeployData(data string) (*parsers.DeployArgs, error)
- type BlockNotarizerHandlerMock
- func (bngm *BlockNotarizerHandlerMock) AddNotarizedHeader(shardID uint32, notarizedHeader data.HeaderHandler, notarizedHeaderHash []byte)
- func (bngm *BlockNotarizerHandlerMock) CleanupNotarizedHeadersBehindNonce(shardID uint32, nonce uint64)
- func (bngm *BlockNotarizerHandlerMock) DisplayNotarizedHeaders(shardID uint32, message string)
- func (bngm *BlockNotarizerHandlerMock) GetFirstNotarizedHeader(shardID uint32) (data.HeaderHandler, []byte, error)
- func (bngm *BlockNotarizerHandlerMock) GetLastNotarizedHeader(shardID uint32) (data.HeaderHandler, []byte, error)
- func (bngm *BlockNotarizerHandlerMock) GetLastNotarizedHeaderNonce(shardID uint32) uint64
- func (bngm *BlockNotarizerHandlerMock) GetNotarizedHeader(shardID uint32, offset uint64) (data.HeaderHandler, []byte, error)
- func (bngm *BlockNotarizerHandlerMock) InitNotarizedHeaders(startHeaders map[uint32]data.HeaderHandler) error
- func (bngm *BlockNotarizerHandlerMock) IsInterfaceNil() bool
- func (bngm *BlockNotarizerHandlerMock) RemoveLastNotarizedHeader()
- func (bngm *BlockNotarizerHandlerMock) RestoreNotarizedHeadersToGenesis()
- type BlockNotifierHandlerStub
- func (bnhs *BlockNotifierHandlerStub) CallHandlers(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte)
- func (bnhs *BlockNotifierHandlerStub) GetNumRegisteredHandlers() int
- func (bnhs *BlockNotifierHandlerStub) IsInterfaceNil() bool
- func (bnhs *BlockNotifierHandlerStub) RegisterHandler(...)
- type BlockSizeThrottlerStub
- func (bsts *BlockSizeThrottlerStub) Add(round uint64, size uint32)
- func (bsts *BlockSizeThrottlerStub) ComputeCurrentMaxSize()
- func (bsts *BlockSizeThrottlerStub) GetCurrentMaxSize() uint32
- func (bsts *BlockSizeThrottlerStub) IsInterfaceNil() bool
- func (bsts *BlockSizeThrottlerStub) Succeed(round uint64)
- type BlockTrackerHandlerMock
- func (bthm *BlockTrackerHandlerMock) AddHeaderFromPool(shardID uint32, nonce uint64)
- func (bthm *BlockTrackerHandlerMock) ComputeCrossInfo(headers []data.HeaderHandler)
- func (bthm *BlockTrackerHandlerMock) ComputeLongestSelfChain() (data.HeaderHandler, []byte, []data.HeaderHandler, [][]byte)
- func (bthm *BlockTrackerHandlerMock) GetSelfHeaders(headerHandler data.HeaderHandler) []*track.HeaderInfo
- func (bthm *BlockTrackerHandlerMock) IsInterfaceNil() bool
- func (bthm *BlockTrackerHandlerMock) SortHeadersFromNonce(shardID uint32, nonce uint64) ([]data.HeaderHandler, [][]byte)
- type BlockTrackerMock
- func (btm *BlockTrackerMock) AddCrossNotarizedHeader(shardID uint32, crossNotarizedHeader data.HeaderHandler, ...)
- func (btm *BlockTrackerMock) AddSelfNotarizedHeader(shardID uint32, selfNotarizedHeader data.HeaderHandler, ...)
- func (btm *BlockTrackerMock) AddTrackedHeader(header data.HeaderHandler, hash []byte)
- func (btm *BlockTrackerMock) CheckBlockAgainstFinal(headerHandler data.HeaderHandler) error
- func (btm *BlockTrackerMock) CheckBlockAgainstRoundHandler(headerHandler data.HeaderHandler) error
- func (btm *BlockTrackerMock) CheckBlockAgainstWhitelist(interceptedData process.InterceptedData) bool
- func (btm *BlockTrackerMock) CleanupHeadersBehindNonce(shardID uint32, selfNotarizedNonce uint64, crossNotarizedNonce uint64)
- func (btm *BlockTrackerMock) CleanupInvalidCrossHeaders(_ uint32, _ uint64)
- func (btm *BlockTrackerMock) ComputeLongestChain(shardID uint32, header data.HeaderHandler) ([]data.HeaderHandler, [][]byte)
- func (btm *BlockTrackerMock) ComputeLongestMetaChainFromLastNotarized() ([]data.HeaderHandler, [][]byte, error)
- func (btm *BlockTrackerMock) ComputeLongestShardsChainsFromLastNotarized() ([]data.HeaderHandler, [][]byte, map[uint32][]data.HeaderHandler, error)
- func (btm *BlockTrackerMock) DisplayTrackedHeaders()
- func (btm *BlockTrackerMock) GetCrossNotarizedHeader(shardID uint32, offset uint64) (data.HeaderHandler, []byte, error)
- func (btm *BlockTrackerMock) GetLastCrossNotarizedHeader(shardID uint32) (data.HeaderHandler, []byte, error)
- func (btm *BlockTrackerMock) GetLastCrossNotarizedHeadersForAllShards() (map[uint32]data.HeaderHandler, error)
- func (btm *BlockTrackerMock) GetLastSelfNotarizedHeader(shardID uint32) (data.HeaderHandler, []byte, error)
- func (btm *BlockTrackerMock) GetSelfNotarizedHeader(shardID uint32, offset uint64) (data.HeaderHandler, []byte, error)
- func (btm *BlockTrackerMock) GetTrackedHeaders(shardID uint32) ([]data.HeaderHandler, [][]byte)
- func (btm *BlockTrackerMock) GetTrackedHeadersForAllShards() map[uint32][]data.HeaderHandler
- func (btm *BlockTrackerMock) GetTrackedHeadersWithNonce(shardID uint32, nonce uint64) ([]data.HeaderHandler, [][]byte)
- func (btm *BlockTrackerMock) InitNotarizedHeaders(startHeaders map[uint32]data.HeaderHandler) error
- func (btm *BlockTrackerMock) IsInterfaceNil() bool
- func (btm *BlockTrackerMock) IsShardStuck(shardId uint32) bool
- func (btm *BlockTrackerMock) RegisterCrossNotarizedHeadersHandler(...)
- func (btm *BlockTrackerMock) RegisterFinalMetachainHeadersHandler(...)
- func (btm *BlockTrackerMock) RegisterSelfNotarizedFromCrossHeadersHandler(...)
- func (btm *BlockTrackerMock) RegisterSelfNotarizedHeadersHandler(...)
- func (btm *BlockTrackerMock) RemoveLastNotarizedHeaders()
- func (btm *BlockTrackerMock) RestoreToGenesis()
- func (btm *BlockTrackerMock) ShouldAddHeader(headerHandler data.HeaderHandler) bool
- func (btm *BlockTrackerMock) ShouldSkipMiniBlocksCreationFromSelf() bool
- type BoostrapStorerMock
- func (bsm *BoostrapStorerMock) Get(round int64) (bootstrapStorage.BootstrapData, error)
- func (bsm *BoostrapStorerMock) GetHighestRound() int64
- func (bsm *BoostrapStorerMock) IsInterfaceNil() bool
- func (bsm *BoostrapStorerMock) Put(round int64, bootData bootstrapStorage.BootstrapData) error
- func (bsm *BoostrapStorerMock) SaveLastRound(round int64) error
- type BootstrapComponentsMock
- func (bcm *BootstrapComponentsMock) HeaderIntegrityVerifier() factory.HeaderIntegrityVerifierHandler
- func (bcm *BootstrapComponentsMock) IsInterfaceNil() bool
- func (bcm *BootstrapComponentsMock) ShardCoordinator() sharding.Coordinator
- func (bcm *BootstrapComponentsMock) VersionedHeaderFactory() factory.VersionedHeaderFactory
- type BootstrapperStub
- func (boot *BootstrapperStub) AddSyncStateListener(syncStateNotifier func(isSyncing bool))
- func (boot *BootstrapperStub) Close() error
- func (boot *BootstrapperStub) CreateAndCommitEmptyBlock(shardForCurrentNode uint32) (data.BodyHandler, data.HeaderHandler, error)
- func (boot *BootstrapperStub) GetNodeState() common.NodeState
- func (boot *BootstrapperStub) IsInterfaceNil() bool
- func (boot *BootstrapperStub) StartSyncingBlocks() error
- type BuiltInFunctionStub
- func (b *BuiltInFunctionStub) IsActive() bool
- func (b *BuiltInFunctionStub) IsInterfaceNil() bool
- func (b *BuiltInFunctionStub) ProcessBuiltinFunction(acntSnd, acntDst vmcommon.UserAccountHandler, ...) (*vmcommon.VMOutput, error)
- func (b *BuiltInFunctionStub) SetNewGasConfig(gasCost *vmcommon.GasCost)
- type ChunkProcessorStub
- 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 CoreComponentsMock
- func (ccm *CoreComponentsMock) AddressPubKeyConverter() core.PubkeyConverter
- func (ccm *CoreComponentsMock) ChainID() string
- func (ccm *CoreComponentsMock) ChanStopNodeProcess() chan endProcess.ArgEndProcess
- func (ccm *CoreComponentsMock) EconomicsData() process.EconomicsDataHandler
- func (ccm *CoreComponentsMock) EnableEpochsHandler() common.EnableEpochsHandler
- func (ccm *CoreComponentsMock) EnableRoundsHandler() process.EnableRoundsHandler
- func (ccm *CoreComponentsMock) EpochNotifier() process.EpochNotifier
- func (ccm *CoreComponentsMock) GenesisNodesSetup() sharding.GenesisNodesSetupHandler
- func (ccm *CoreComponentsMock) HardforkTriggerPubKey() []byte
- func (ccm *CoreComponentsMock) Hasher() hashing.Hasher
- func (ccm *CoreComponentsMock) InternalMarshalizer() marshal.Marshalizer
- func (ccm *CoreComponentsMock) IsInterfaceNil() bool
- func (ccm *CoreComponentsMock) MinTransactionVersion() uint32
- func (ccm *CoreComponentsMock) NodeTypeProvider() core.NodeTypeProviderHandler
- func (ccm *CoreComponentsMock) PathHandler() storage.PathManagerHandler
- func (ccm *CoreComponentsMock) ProcessStatusHandler() common.ProcessStatusHandler
- func (ccm *CoreComponentsMock) RoundHandler() consensus.RoundHandler
- func (ccm *CoreComponentsMock) RoundNotifier() process.RoundNotifier
- func (ccm *CoreComponentsMock) SetInternalMarshalizer(m marshal.Marshalizer) error
- func (ccm *CoreComponentsMock) TxMarshalizer() marshal.Marshalizer
- func (ccm *CoreComponentsMock) TxSignHasher() hashing.Hasher
- func (ccm *CoreComponentsMock) TxVersionChecker() process.TxVersionCheckerHandler
- func (ccm *CoreComponentsMock) Uint64ByteSliceConverter() typeConverters.Uint64ByteSliceConverter
- func (ccm *CoreComponentsMock) ValidatorPubKeyConverter() core.PubkeyConverter
- type CryptoComponentsMock
- func (ccm *CryptoComponentsMock) BlockSignKeyGen() crypto.KeyGenerator
- func (ccm *CryptoComponentsMock) BlockSigner() crypto.SingleSigner
- func (ccm *CryptoComponentsMock) Clone() interface{}
- func (ccm *CryptoComponentsMock) GetMultiSigner(epoch uint32) (crypto.MultiSigner, error)
- func (ccm *CryptoComponentsMock) IsInterfaceNil() bool
- func (ccm *CryptoComponentsMock) ManagedPeersHolder() common.ManagedPeersHolder
- func (ccm *CryptoComponentsMock) MultiSignerContainer() cryptoCommon.MultiSignerContainer
- func (ccm *CryptoComponentsMock) PeerSignatureHandler() crypto.PeerSignatureHandler
- func (ccm *CryptoComponentsMock) PrivateKey() crypto.PrivateKey
- func (ccm *CryptoComponentsMock) PublicKey() crypto.PublicKey
- func (ccm *CryptoComponentsMock) SetMultiSignerContainer(msc cryptoCommon.MultiSignerContainer) error
- func (ccm *CryptoComponentsMock) TxSignKeyGen() crypto.KeyGenerator
- func (ccm *CryptoComponentsMock) TxSingleSigner() crypto.SingleSigner
- type CurrentNetworkEpochSetterStub
- type DCDTRoleHandlerStub
- type DataComponentsMock
- func (dcm *DataComponentsMock) Blockchain() data.ChainHandler
- func (dcm *DataComponentsMock) Clone() interface{}
- func (dcm *DataComponentsMock) Datapool() dataRetriever.PoolsHolder
- func (dcm *DataComponentsMock) IsInterfaceNil() bool
- func (dcm *DataComponentsMock) StorageService() dataRetriever.StorageService
- type EpochEconomicsStub
- type EpochStartDataCreatorStub
- 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) RegisterHandler(handler epochStart.ActionHandler)
- func (esnm *EpochStartNotifierStub) UnregisterHandler(handler epochStart.ActionHandler)
- type EpochStartTriggerStub
- func (e *EpochStartTriggerStub) Close() error
- func (e *EpochStartTriggerStub) Epoch() uint32
- func (e *EpochStartTriggerStub) EpochFinalityAttestingRound() uint64
- func (e *EpochStartTriggerStub) EpochStartMetaHdrHash() []byte
- func (e *EpochStartTriggerStub) EpochStartRound() uint64
- func (e *EpochStartTriggerStub) ForceEpochStart() error
- func (e *EpochStartTriggerStub) GetSavedStateKey() []byte
- func (e *EpochStartTriggerStub) IsEpochStart() bool
- func (e *EpochStartTriggerStub) IsInterfaceNil() bool
- func (e *EpochStartTriggerStub) LoadState(_ []byte) error
- func (e *EpochStartTriggerStub) MetaEpoch() uint32
- func (e *EpochStartTriggerStub) NotifyAll(_ data.HeaderHandler)
- func (e *EpochStartTriggerStub) RequestEpochStartIfNeeded(_ data.HeaderHandler)
- func (e *EpochStartTriggerStub) Revert(_ data.HeaderHandler)
- func (e *EpochStartTriggerStub) RevertStateToBlock(_ data.HeaderHandler) error
- func (e *EpochStartTriggerStub) SetAppStatusHandler(_ core.AppStatusHandler) error
- func (e *EpochStartTriggerStub) SetCurrentEpochStartRound(_ uint64)
- func (e *EpochStartTriggerStub) SetFinalityAttestingRound(_ uint64)
- func (e *EpochStartTriggerStub) SetProcessed(header data.HeaderHandler, _ data.BodyHandler)
- func (e *EpochStartTriggerStub) Update(round uint64, nonce uint64)
- type FeeAccumulatorStub
- func (f *FeeAccumulatorStub) CreateBlockStarted(gasAndFees scheduled.GasAndFees)
- func (f *FeeAccumulatorStub) GetAccumulatedFees() *big.Int
- func (f *FeeAccumulatorStub) GetDeveloperFees() *big.Int
- func (f *FeeAccumulatorStub) IsInterfaceNil() bool
- func (f *FeeAccumulatorStub) ProcessTransactionFee(cost *big.Int, devFee *big.Int, txHash []byte)
- func (f *FeeAccumulatorStub) ProcessTransactionFeeRelayedUserTx(cost *big.Int, devFee *big.Int, userTxHash []byte, originalTxHash []byte)
- func (f *FeeAccumulatorStub) RevertFees(txHashes [][]byte)
- type FloodPreventerStub
- type ForkDetectorMock
- func (fdm *ForkDetectorMock) AddHeader(header data.HeaderHandler, hash []byte, state process.BlockHeaderState, ...) error
- func (fdm *ForkDetectorMock) CheckFork() *process.ForkInfo
- func (fdm *ForkDetectorMock) GetHighestFinalBlockHash() []byte
- func (fdm *ForkDetectorMock) GetHighestFinalBlockNonce() uint64
- func (fdm *ForkDetectorMock) GetNotarizedHeaderHash(nonce uint64) []byte
- func (fdm *ForkDetectorMock) IsInterfaceNil() bool
- func (fdm *ForkDetectorMock) ProbableHighestNonce() uint64
- func (fdm *ForkDetectorMock) RemoveHeader(nonce uint64, hash []byte)
- func (fdm *ForkDetectorMock) ResetFork()
- func (fdm *ForkDetectorMock) ResetProbableHighestNonce()
- func (fdm *ForkDetectorMock) RestoreToGenesis()
- func (fdm *ForkDetectorMock) SetFinalToLastCheckpoint()
- func (fdm *ForkDetectorMock) SetRollBackNonce(nonce uint64)
- type GasHandlerMock
- func (ghm *GasHandlerMock) ComputeGasProvidedByMiniBlock(miniBlock *block.MiniBlock, mapHashTx map[string]data.TransactionHandler) (uint64, uint64, error)
- func (ghm *GasHandlerMock) ComputeGasProvidedByTx(txSenderShardId uint32, txReceiverShardId uint32, ...) (uint64, uint64, error)
- func (ghm *GasHandlerMock) GasPenalized(hash []byte) uint64
- func (ghm *GasHandlerMock) GasProvided(hash []byte) uint64
- func (ghm *GasHandlerMock) GasProvidedAsScheduled(hash []byte) uint64
- func (ghm *GasHandlerMock) GasRefunded(hash []byte) uint64
- func (ghm *GasHandlerMock) Init()
- func (ghm *GasHandlerMock) IsInterfaceNil() bool
- func (ghm *GasHandlerMock) RemoveGasPenalized(hashes [][]byte)
- func (ghm *GasHandlerMock) RemoveGasProvided(hashes [][]byte)
- func (ghm *GasHandlerMock) RemoveGasProvidedAsScheduled(hashes [][]byte)
- func (ghm *GasHandlerMock) RemoveGasRefunded(hashes [][]byte)
- func (ghm *GasHandlerMock) Reset(key []byte)
- func (ghm *GasHandlerMock) RestoreGasSinceLastReset(key []byte)
- func (ghm *GasHandlerMock) SetGasPenalized(gasPenalized uint64, hash []byte)
- func (ghm *GasHandlerMock) SetGasProvided(gasProvided uint64, hash []byte)
- func (ghm *GasHandlerMock) SetGasProvidedAsScheduled(gasProvided uint64, hash []byte)
- func (ghm *GasHandlerMock) SetGasRefunded(gasRefunded uint64, hash []byte)
- func (ghm *GasHandlerMock) TotalGasPenalized() uint64
- func (ghm *GasHandlerMock) TotalGasProvided() uint64
- func (ghm *GasHandlerMock) TotalGasProvidedAsScheduled() uint64
- func (ghm *GasHandlerMock) TotalGasProvidedWithScheduled() uint64
- func (ghm *GasHandlerMock) TotalGasRefunded() uint64
- type GetHdrHandlerStub
- type HasherStub
- type HeaderIntegrityVerifierStub
- type HeaderSigVerifierStub
- func (hsvm *HeaderSigVerifierStub) IsInterfaceNil() bool
- func (hsvm *HeaderSigVerifierStub) VerifyLeaderSignature(header data.HeaderHandler) error
- func (hsvm *HeaderSigVerifierStub) VerifyRandSeed(header data.HeaderHandler) error
- func (hsvm *HeaderSigVerifierStub) VerifyRandSeedAndLeaderSignature(header data.HeaderHandler) error
- func (hsvm *HeaderSigVerifierStub) VerifySignature(header data.HeaderHandler) error
- 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 InterceptedDataFactoryStub
- type InterceptedDataVerifierMock
- type InterceptedDebugHandlerStub
- type InterceptedTrieNodeStub
- func (ins *InterceptedTrieNodeStub) CheckValidity() error
- func (ins *InterceptedTrieNodeStub) Hash() []byte
- func (ins *InterceptedTrieNodeStub) Identifiers() [][]byte
- func (ins *InterceptedTrieNodeStub) IsForCurrentShard() bool
- func (ins *InterceptedTrieNodeStub) IsInterfaceNil() bool
- func (ins *InterceptedTrieNodeStub) SizeInBytes() int
- func (ins *InterceptedTrieNodeStub) String() string
- func (ins *InterceptedTrieNodeStub) Type() string
- type InterceptedTxHandlerStub
- func (iths *InterceptedTxHandlerStub) Fee() *big.Int
- func (iths *InterceptedTxHandlerStub) GetTxMessageForSignatureVerification() ([]byte, error)
- func (iths *InterceptedTxHandlerStub) Nonce() uint64
- func (iths *InterceptedTxHandlerStub) ReceiverShardId() uint32
- func (iths *InterceptedTxHandlerStub) SenderAddress() []byte
- func (iths *InterceptedTxHandlerStub) SenderShardId() uint32
- func (iths *InterceptedTxHandlerStub) Transaction() data.TransactionHandler
- type InterceptorProcessorStub
- func (ips *InterceptorProcessorStub) IsInterfaceNil() bool
- func (ips *InterceptorProcessorStub) RegisterHandler(handler func(topic string, hash []byte, data interface{}))
- func (ips *InterceptorProcessorStub) Save(data process.InterceptedData, _ core.PeerID, _ string) error
- func (ips *InterceptorProcessorStub) Validate(data process.InterceptedData, _ core.PeerID) error
- type InterceptorThrottlerStub
- func (its *InterceptorThrottlerStub) CanProcess() bool
- func (its *InterceptorThrottlerStub) EndProcessing()
- func (its *InterceptorThrottlerStub) EndProcessingCount() int32
- func (its *InterceptorThrottlerStub) IsInterfaceNil() bool
- func (its *InterceptorThrottlerStub) StartProcessing()
- func (its *InterceptorThrottlerStub) StartProcessingCount() int32
- type InterimProcessorContainerMock
- func (ipcm *InterimProcessorContainerMock) Add(_ block.Type, _ process.IntermediateTransactionHandler) error
- func (ipcm *InterimProcessorContainerMock) AddMultiple(_ []block.Type, _ []process.IntermediateTransactionHandler) error
- func (ipcm *InterimProcessorContainerMock) Get(key block.Type) (process.IntermediateTransactionHandler, error)
- func (ipcm *InterimProcessorContainerMock) IsInterfaceNil() bool
- func (ipcm *InterimProcessorContainerMock) Keys() []block.Type
- func (ipcm *InterimProcessorContainerMock) Len() int
- func (ipcm *InterimProcessorContainerMock) Remove(_ block.Type)
- func (ipcm *InterimProcessorContainerMock) Replace(_ block.Type, _ process.IntermediateTransactionHandler) error
- type IntermProcessorContainerStub
- func (ipcm *IntermProcessorContainerStub) Add(_ block.Type, _ process.IntermediateTransactionHandler) error
- func (ipcm *IntermProcessorContainerStub) AddMultiple(_ []block.Type, _ []process.IntermediateTransactionHandler) error
- func (ipcm *IntermProcessorContainerStub) Get(key block.Type) (process.IntermediateTransactionHandler, error)
- func (ipcm *IntermProcessorContainerStub) IsInterfaceNil() bool
- func (ipcm *IntermProcessorContainerStub) Keys() []block.Type
- func (ipcm *IntermProcessorContainerStub) Len() int
- func (ipcm *IntermProcessorContainerStub) Remove(_ block.Type)
- func (ipcm *IntermProcessorContainerStub) Replace(_ block.Type, _ process.IntermediateTransactionHandler) error
- type IntermediateTransactionHandlerMock
- func (ith *IntermediateTransactionHandlerMock) AddIntermediateTransactions(txs []data.TransactionHandler) error
- func (ith *IntermediateTransactionHandlerMock) CreateAllInterMiniBlocks() []*block.MiniBlock
- func (ith *IntermediateTransactionHandlerMock) CreateBlockStarted()
- func (ith *IntermediateTransactionHandlerMock) CreateMarshalledData(txHashes [][]byte) ([][]byte, error)
- func (ith *IntermediateTransactionHandlerMock) GetAllCurrentFinishedTxs() map[string]data.TransactionHandler
- func (ith *IntermediateTransactionHandlerMock) GetCreatedInShardMiniBlock() *block.MiniBlock
- func (ith *IntermediateTransactionHandlerMock) GetIntermediateTransactions() []data.TransactionHandler
- func (ith *IntermediateTransactionHandlerMock) GetNumOfCrossInterMbsAndTxs() (int, int)
- func (ith *IntermediateTransactionHandlerMock) InitProcessedResults(key []byte)
- func (ith *IntermediateTransactionHandlerMock) IsInterfaceNil() bool
- func (ith *IntermediateTransactionHandlerMock) RemoveProcessedResults(key []byte) [][]byte
- func (ith *IntermediateTransactionHandlerMock) SaveCurrentIntermediateTxToStorage()
- func (ith *IntermediateTransactionHandlerMock) VerifyInterMiniBlocks(body *block.Body) error
- type IntermediateTransactionHandlerStub
- func (ith *IntermediateTransactionHandlerStub) AddIntermediateTransactions(txs []data.TransactionHandler) error
- func (ith *IntermediateTransactionHandlerStub) CreateAllInterMiniBlocks() []*block.MiniBlock
- func (ith *IntermediateTransactionHandlerStub) CreateBlockStarted()
- func (ith *IntermediateTransactionHandlerStub) CreateMarshalledData(txHashes [][]byte) ([][]byte, error)
- func (ith *IntermediateTransactionHandlerStub) GetAllCurrentFinishedTxs() map[string]data.TransactionHandler
- func (ith *IntermediateTransactionHandlerStub) GetCreatedInShardMiniBlock() *block.MiniBlock
- func (ith *IntermediateTransactionHandlerStub) GetIntermediateTransactions() []data.TransactionHandler
- func (ith *IntermediateTransactionHandlerStub) GetNumOfCrossInterMbsAndTxs() (int, int)
- func (ith *IntermediateTransactionHandlerStub) InitProcessedResults(key []byte)
- func (ith *IntermediateTransactionHandlerStub) IsInterfaceNil() bool
- func (ith *IntermediateTransactionHandlerStub) RemoveProcessedResults(key []byte) [][]byte
- func (ith *IntermediateTransactionHandlerStub) SaveCurrentIntermediateTxToStorage()
- func (ith *IntermediateTransactionHandlerStub) VerifyInterMiniBlocks(body *block.Body) error
- type MarshalizerMock
- type MarshalizerStub
- type MessageHandlerStub
- type MessageSignVerifierMock
- type MiniBlocksProviderStub
- func (mbps *MiniBlocksProviderStub) GetMiniBlocks(hashes [][]byte) ([]*block.MiniblockAndHash, [][]byte)
- func (mbps *MiniBlocksProviderStub) GetMiniBlocksFromPool(hashes [][]byte) ([]*block.MiniblockAndHash, [][]byte)
- func (mbps *MiniBlocksProviderStub) GetMiniBlocksFromStorer(hashes [][]byte) ([]*block.MiniblockAndHash, [][]byte)
- func (mbps *MiniBlocksProviderStub) IsInterfaceNil() bool
- type NetworkConnectionWatcherStub
- type NodeInfoMock
- type NodesConfigProviderStub
- type NodesCoordinatorStub
- type ObjectsContainerStub
- func (ocs *ObjectsContainerStub) Add(key string, val interface{}) error
- func (ocs *ObjectsContainerStub) Get(key string) (interface{}, error)
- func (ocs *ObjectsContainerStub) Len() int
- func (ocs *ObjectsContainerStub) Remove(key string)
- func (ocs *ObjectsContainerStub) Replace(key string, val interface{}) error
- type P2PAntifloodHandlerStub
- func (p2pahs *P2PAntifloodHandlerStub) ApplyConsensusSize(size int)
- func (p2pahs *P2PAntifloodHandlerStub) BlacklistPeer(peer core.PeerID, reason string, duration time.Duration)
- func (p2pahs *P2PAntifloodHandlerStub) CanProcessMessage(message p2p.MessageP2P, fromConnectedPeer core.PeerID) error
- func (p2pahs *P2PAntifloodHandlerStub) CanProcessMessagesOnTopic(peer core.PeerID, topic string, numMessages uint32, totalSize uint64, ...) error
- func (p2pahs *P2PAntifloodHandlerStub) Close() error
- func (p2pahs *P2PAntifloodHandlerStub) IsInterfaceNil() bool
- func (p2pahs *P2PAntifloodHandlerStub) IsOriginatorEligibleForTopic(pid core.PeerID, topic string) error
- func (p2pahs *P2PAntifloodHandlerStub) SetDebugger(debugger process.AntifloodDebugger) error
- type PauseHandlerStub
- type PayableHandlerStub
- type PeerBlackListHandlerStub
- type PeerChangesHandler
- type PeerShardMapperStub
- func (psms *PeerShardMapperStub) GetLastKnownPeerID(pk []byte) (core.PeerID, bool)
- func (psms *PeerShardMapperStub) GetPeerInfo(pid core.PeerID) core.P2PPeerInfo
- func (psms *PeerShardMapperStub) IsInterfaceNil() bool
- func (psms *PeerShardMapperStub) PutPeerIdShardId(pid core.PeerID, shardId uint32)
- func (psms *PeerShardMapperStub) PutPeerIdSubType(pid core.PeerID, peerSubType core.P2PPeerSubType)
- func (psms *PeerShardMapperStub) UpdatePeerIDPublicKeyPair(pid core.PeerID, pk []byte)
- func (psms *PeerShardMapperStub) UpdatePeerIdPublicKey(pid core.PeerID, pk []byte)
- func (psms *PeerShardMapperStub) UpdatePublicKeyShardId(pk []byte, shardId uint32)
- type PeerShardResolverStub
- type PeerSignatureHandlerStub
- type PendingMiniBlocksHandlerStub
- func (p *PendingMiniBlocksHandlerStub) AddProcessedHeader(handler data.HeaderHandler) error
- func (p *PendingMiniBlocksHandlerStub) GetPendingMiniBlocks(shardID uint32) [][]byte
- func (p *PendingMiniBlocksHandlerStub) IsInterfaceNil() bool
- func (p *PendingMiniBlocksHandlerStub) RevertHeader(handler data.HeaderHandler) error
- func (p *PendingMiniBlocksHandlerStub) SetPendingMiniBlocks(shardID uint32, mbHashes [][]byte)
- type PreProcessorContainerMock
- func (ppcm *PreProcessorContainerMock) Add(_ block.Type, _ process.PreProcessor) error
- func (ppcm *PreProcessorContainerMock) AddMultiple(_ []block.Type, _ []process.PreProcessor) error
- func (ppcm *PreProcessorContainerMock) Get(key block.Type) (process.PreProcessor, error)
- func (ppcm *PreProcessorContainerMock) IsInterfaceNil() bool
- func (ppcm *PreProcessorContainerMock) Keys() []block.Type
- func (ppcm *PreProcessorContainerMock) Len() int
- func (ppcm *PreProcessorContainerMock) Remove(_ block.Type)
- func (ppcm *PreProcessorContainerMock) Replace(_ block.Type, _ process.PreProcessor) error
- type PreProcessorMock
- func (ppm *PreProcessorMock) AddTransactions(txHandlers []data.TransactionHandler)
- func (ppm *PreProcessorMock) AddTxsFromMiniBlocks(miniBlocks block.MiniBlockSlice)
- func (ppm *PreProcessorMock) CreateAndProcessMiniBlocks(haveTime func() bool, _ []byte) (block.MiniBlockSlice, error)
- func (ppm *PreProcessorMock) CreateBlockStarted()
- func (ppm *PreProcessorMock) CreateMarshalledData(txHashes [][]byte) ([][]byte, error)
- func (ppm *PreProcessorMock) GetAllCurrentUsedTxs() map[string]data.TransactionHandler
- func (ppm *PreProcessorMock) IsDataPrepared(requestedTxs int, haveTime func() time.Duration) error
- func (ppm *PreProcessorMock) IsInterfaceNil() bool
- func (ppm *PreProcessorMock) ProcessBlockTransactions(header data.HeaderHandler, body *block.Body, haveTime func() bool) error
- func (ppm *PreProcessorMock) ProcessMiniBlock(miniBlock *block.MiniBlock, haveTime func() bool, ...) ([][]byte, int, bool, error)
- func (ppm *PreProcessorMock) RemoveBlockDataFromPools(body *block.Body, miniBlockPool storage.Cacher) error
- func (ppm *PreProcessorMock) RemoveTxsFromPools(body *block.Body) error
- func (ppm *PreProcessorMock) RequestBlockTransactions(body *block.Body) int
- func (ppm *PreProcessorMock) RequestTransactionsForMiniBlock(miniBlock *block.MiniBlock) int
- func (ppm *PreProcessorMock) RestoreBlockDataIntoPools(body *block.Body, miniBlockPool storage.Cacher) (int, error)
- func (ppm *PreProcessorMock) SaveTxsToStorage(body *block.Body) error
- type ProtobufMarshalizerMock
- type QuotaStatusHandlerStub
- type RaterMock
- func (rm *RaterMock) ComputeDecreaseProposer(shardId uint32, currentRating uint32, consecutiveMisses uint32) uint32
- func (rm *RaterMock) ComputeDecreaseValidator(shardId uint32, currentRating uint32) uint32
- func (rm *RaterMock) ComputeIncreaseProposer(shardId uint32, currentRating uint32) uint32
- func (rm *RaterMock) ComputeIncreaseValidator(shardId uint32, currentRating uint32) uint32
- func (rm *RaterMock) GetChance(rating uint32) uint32
- func (rm *RaterMock) GetRating(pk string) uint32
- func (rm *RaterMock) GetSignedBlocksThreshold() float32
- func (rm *RaterMock) GetStartRating() uint32
- func (rm *RaterMock) IsInterfaceNil() bool
- func (rm *RaterMock) RevertIncreaseValidator(shardId uint32, currentRating uint32, nrReverts uint32) uint32
- type RatingReaderMock
- type RatingStepMock
- func (rd *RatingStepMock) ConsecutiveMissedBlocksPenalty() float32
- func (rd *RatingStepMock) ProposerDecreaseRatingStep() int32
- func (rd *RatingStepMock) ProposerIncreaseRatingStep() int32
- func (rd *RatingStepMock) ValidatorDecreaseRatingStep() int32
- func (rd *RatingStepMock) ValidatorIncreaseRatingStep() int32
- type RatingsInfoMock
- func (rd *RatingsInfoMock) IsInterfaceNil() bool
- func (rd *RatingsInfoMock) MaxRating() uint32
- func (rd *RatingsInfoMock) MetaChainRatingsStepHandler() process.RatingsStepHandler
- func (rd *RatingsInfoMock) MinRating() uint32
- func (rd *RatingsInfoMock) SelectionChances() []process.SelectionChance
- func (rd *RatingsInfoMock) ShardChainRatingsStepHandler() process.RatingsStepHandler
- func (rd *RatingsInfoMock) SignedBlocksThreshold() float32
- func (rd *RatingsInfoMock) StartRating() uint32
- type RequestedItemsHandlerStub
- type ResolverStub
- type ResolversContainerStub
- func (rcs *ResolversContainerStub) Add(key string, val dataRetriever.Resolver) error
- func (rcs *ResolversContainerStub) AddMultiple(_ []string, _ []dataRetriever.Resolver) error
- func (rcs *ResolversContainerStub) Get(key string) (dataRetriever.Resolver, error)
- func (rcs *ResolversContainerStub) IsInterfaceNil() bool
- func (rcs *ResolversContainerStub) Len() int
- func (rcs *ResolversContainerStub) Remove(key string)
- func (rcs *ResolversContainerStub) Replace(key string, val dataRetriever.Resolver) error
- type RewardsHandlerMock
- func (rhm *RewardsHandlerMock) IsInterfaceNil() bool
- func (rhm *RewardsHandlerMock) LeaderPercentage() float64
- func (rhm *RewardsHandlerMock) MaxInflationRate(uint32) float64
- func (rhm *RewardsHandlerMock) MinInflationRate() float64
- func (rhm *RewardsHandlerMock) ProtocolSustainabilityAddress() string
- func (rhm *RewardsHandlerMock) ProtocolSustainabilityPercentage() float64
- func (rhm *RewardsHandlerMock) RewardsTopUpFactor() float64
- func (rhm *RewardsHandlerMock) RewardsTopUpGradientPoint() *big.Int
- type RoundHandlerMock
- func (rndm *RoundHandlerMock) BeforeGenesis() bool
- func (rndm *RoundHandlerMock) Index() int64
- func (rndm *RoundHandlerMock) IsInterfaceNil() bool
- func (rndm *RoundHandlerMock) RemainingTime(_ time.Time, _ time.Duration) time.Duration
- func (rndm *RoundHandlerMock) TimeDuration() time.Duration
- func (rndm *RoundHandlerMock) TimeStamp() time.Time
- func (rndm *RoundHandlerMock) UpdateRound(genesisRoundTimeStamp time.Time, timeStamp time.Time)
- type RoundStub
- func (rnds *RoundStub) Index() int64
- func (rnds *RoundStub) IsInterfaceNil() bool
- func (rnds *RoundStub) RemainingTime(startTime time.Time, maxTime time.Duration) time.Duration
- func (rnds *RoundStub) TimeDuration() time.Duration
- func (rnds *RoundStub) TimeStamp() time.Time
- func (rnds *RoundStub) UpdateRound(genesisRoundTimeStamp time.Time, timeStamp time.Time)
- type SCToProtocolStub
- type ScQueryStub
- type ShardCoordinatorStub
- func (coordinator *ShardCoordinatorStub) CommunicationIdentifier(destShardID uint32) string
- func (coordinator *ShardCoordinatorStub) ComputeId(address []byte) uint32
- func (coordinator *ShardCoordinatorStub) IsInterfaceNil() bool
- func (coordinator *ShardCoordinatorStub) NumberOfShards() uint32
- func (coordinator *ShardCoordinatorStub) SameShard(firstAddress, secondAddress []byte) bool
- func (coordinator *ShardCoordinatorStub) SelfId() uint32
- type ShardIdHasMapMock
- func (sihsm *ShardIdHasMapMock) Delete(shardId uint32)
- func (sihsm *ShardIdHasMapMock) IsInterfaceNil() bool
- func (sihsm *ShardIdHasMapMock) Load(shardId uint32) ([]byte, bool)
- func (sihsm *ShardIdHasMapMock) Range(f func(shardId uint32, hash []byte) bool)
- func (sihsm *ShardIdHasMapMock) Store(shardId uint32, hash []byte)
- type SignaturesHandlerStub
- type SignerMock
- type SingleSignKeyGenMock
- func (sskgm *SingleSignKeyGenMock) CheckPublicKeyValid(_ []byte) error
- func (sskgm *SingleSignKeyGenMock) GeneratePair() (crypto.PrivateKey, crypto.PublicKey)
- func (sskgm *SingleSignKeyGenMock) IsInterfaceNil() bool
- func (sskgm *SingleSignKeyGenMock) PrivateKeyFromByteArray(_ []byte) (crypto.PrivateKey, error)
- func (sskgm *SingleSignKeyGenMock) PublicKeyFromByteArray(b []byte) (crypto.PublicKey, error)
- func (sskgm *SingleSignKeyGenMock) Suite() crypto.Suite
- type SingleSignPublicKey
- type StatusComponentsMock
- type StorageBootstrapperMock
- type StorerMock
- func (sm *StorerMock) ClearCache()
- func (sm *StorerMock) Close() error
- func (sm *StorerMock) DestroyUnit() error
- func (sm *StorerMock) Get(key []byte) ([]byte, error)
- func (sm *StorerMock) GetBulkFromEpoch(_ [][]byte, _ uint32) ([]data.KeyValuePair, error)
- func (sm *StorerMock) GetFromEpoch(key []byte, _ uint32) ([]byte, error)
- func (sm *StorerMock) GetOldestEpoch() (uint32, error)
- func (sm *StorerMock) Has(_ []byte) error
- func (sm *StorerMock) IsInterfaceNil() bool
- func (sm *StorerMock) Put(key, data []byte) error
- func (sm *StorerMock) PutInEpoch(key, data []byte, _ uint32) error
- func (sm *StorerMock) RangeKeys(_ func(key []byte, val []byte) bool)
- func (sm *StorerMock) Remove(key []byte) error
- func (sm *StorerMock) RemoveFromCurrentEpoch(key []byte) error
- func (sm *StorerMock) SearchFirst(_ []byte) ([]byte, error)
- type SyncStarterStub
- type SyncTimerMock
- type TopicAntiFloodStub
- func (t *TopicAntiFloodStub) IncreaseLoad(pid core.PeerID, topic string, numMessages uint32) error
- func (t *TopicAntiFloodStub) IsInterfaceNil() bool
- func (t *TopicAntiFloodStub) ResetForNotRegisteredTopics()
- func (t *TopicAntiFloodStub) ResetForTopic(topic string)
- func (t *TopicAntiFloodStub) SetMaxMessagesForTopic(topic string, num uint32)
- type TopicHandlerStub
- func (stub *TopicHandlerStub) CreateTopic(name string, createChannelForTopic bool) error
- func (stub *TopicHandlerStub) HasTopic(name string) bool
- func (stub *TopicHandlerStub) ID() core.PeerID
- func (stub *TopicHandlerStub) IsInterfaceNil() bool
- func (stub *TopicHandlerStub) RegisterMessageProcessor(topic string, identifier string, handler p2p.MessageProcessor) error
- type TransactionInterceptorMock
- func (tim *TransactionInterceptorMock) Check() bool
- func (tim *TransactionInterceptorMock) GetTransaction() *transaction.Transaction
- func (tim *TransactionInterceptorMock) Hash() []byte
- func (tim *TransactionInterceptorMock) ID() string
- func (tim *TransactionInterceptorMock) IsAddressedToOtherShards() bool
- func (tim *TransactionInterceptorMock) IsInterfaceNil() bool
- func (tim *TransactionInterceptorMock) PubkeyConverter() core.PubkeyConverter
- func (tim *TransactionInterceptorMock) RcvShard() uint32
- func (tim *TransactionInterceptorMock) SetHash(hash []byte)
- func (tim *TransactionInterceptorMock) SetPubkeyConverter(converter core.PubkeyConverter)
- func (tim *TransactionInterceptorMock) SndShard() uint32
- func (tim *TransactionInterceptorMock) VerifySig() bool
- type TransactionPoolMock
- type TransactionSimulatorStub
- type TxForCurrentBlockStub
- type TxLogsProcessorStub
- func (txls *TxLogsProcessorStub) Clean()
- func (txls *TxLogsProcessorStub) GetAllCurrentLogs() []*data.LogData
- func (txls *TxLogsProcessorStub) GetLog(txHash []byte) (data.LogHandler, error)
- func (txls *TxLogsProcessorStub) IsInterfaceNil() bool
- func (txls *TxLogsProcessorStub) SaveLog(txHash []byte, tx data.TransactionHandler, vmLogs []*vmcommon.LogEntry) error
- type TxValidatorHandlerStub
- type TxValidatorStub
- type Uint64ByteSliceConverterMock
- type Uint64SyncMapCacherStub
- func (usmcs *Uint64SyncMapCacherStub) Clear()
- func (usmcs *Uint64SyncMapCacherStub) Get(nonce uint64) (dataRetriever.ShardIdHashMap, bool)
- func (usmcs *Uint64SyncMapCacherStub) Has(nonce uint64, shardId uint32) bool
- func (usmcs *Uint64SyncMapCacherStub) IsInterfaceNil() bool
- func (usmcs *Uint64SyncMapCacherStub) Merge(nonce uint64, src dataRetriever.ShardIdHashMap)
- func (usmcs *Uint64SyncMapCacherStub) RegisterHandler(handler func(nonce uint64, shardId uint32, value []byte))
- func (usmcs *Uint64SyncMapCacherStub) Remove(nonce uint64, shardId uint32)
- func (usmcs *Uint64SyncMapCacherStub) UnRegisterHandler(handler func(key []byte, value interface{}))
- type VMContainerMock
- func (v *VMContainerMock) Add(key []byte, val vmcommon.VMExecutionHandler) error
- func (v *VMContainerMock) AddMultiple(keys [][]byte, vms []vmcommon.VMExecutionHandler) error
- func (v *VMContainerMock) Close() error
- func (v *VMContainerMock) Get(key []byte) (vmcommon.VMExecutionHandler, error)
- func (v *VMContainerMock) IsInterfaceNil() bool
- func (v *VMContainerMock) Keys() [][]byte
- func (v *VMContainerMock) Len() int
- func (v *VMContainerMock) Remove(key []byte)
- func (v *VMContainerMock) Replace(key []byte, val vmcommon.VMExecutionHandler) error
- type VMExecutionHandlerStub
- func (vm *VMExecutionHandlerStub) Close() error
- func (vm *VMExecutionHandlerStub) GasScheduleChange(gasSchedule map[string]map[string]uint64)
- func (vm *VMExecutionHandlerStub) GetVersion() string
- func (vm *VMExecutionHandlerStub) IsInterfaceNil() bool
- func (vm *VMExecutionHandlerStub) RunSmartContractCall(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error)
- func (vm *VMExecutionHandlerStub) RunSmartContractCreate(input *vmcommon.ContractCreateInput) (*vmcommon.VMOutput, error)
- type ValidatorSettingsStub
- type ValidityAttesterStub
- func (vas *ValidityAttesterStub) CheckBlockAgainstFinal(headerHandler data.HeaderHandler) error
- func (vas *ValidityAttesterStub) CheckBlockAgainstRoundHandler(headerHandler data.HeaderHandler) error
- func (vas *ValidityAttesterStub) CheckBlockAgainstWhitelist(interceptedData process.InterceptedData) bool
- func (vas *ValidityAttesterStub) IsInterfaceNil() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMultiShardsCoordinatorMock ¶
func NewMultiShardsCoordinatorMock(nrShard uint32) *multipleShardsCoordinatorMock
NewMultiShardsCoordinatorMock -
func NewMultipleShardsCoordinatorMock ¶
func NewMultipleShardsCoordinatorMock() *multipleShardsCoordinatorMock
NewMultipleShardsCoordinatorMock -
func NewNonceHashConverterMock ¶
func NewNonceHashConverterMock() *nonceHashConverterMock
NewNonceHashConverterMock -
func NewOneShardCoordinatorMock ¶
func NewOneShardCoordinatorMock() *oneShardCoordinatorMock
NewOneShardCoordinatorMock -
Types ¶
type AccountsDBSyncerStub ¶
type AccountsDBSyncerStub struct { GetSyncedTriesCalled func() map[string]common.Trie SyncAccountsCalled func(rootHash []byte, storageMarker common.StorageMarker) 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, storageMarker common.StorageMarker) error
SyncAccounts -
type AntifloodDebuggerStub ¶
type AntifloodDebuggerStub struct { AddDataCalled func(pid core.PeerID, topic string, numRejected uint32, sizeRejected uint64, sequence []byte, isBlacklisted bool) CloseCalled func() error }
AntifloodDebuggerStub -
func (*AntifloodDebuggerStub) AddData ¶
func (ads *AntifloodDebuggerStub) AddData(pid core.PeerID, topic string, numRejected uint32, sizeRejected uint64, sequence []byte, isBlacklisted bool)
AddData -
func (*AntifloodDebuggerStub) IsInterfaceNil ¶
func (ads *AntifloodDebuggerStub) IsInterfaceNil() bool
IsInterfaceNil -
type ArgumentParserMock ¶
type ArgumentParserMock struct { ParseCallDataCalled func(data string) (string, [][]byte, error) ParseArgumentsCalled func(data string) ([][]byte, error) ParseDeployDataCalled func(data string) (*parsers.DeployArgs, error) CreateDataFromStorageUpdateCalled func(storageUpdates []*vmcommon.StorageUpdate) string GetStorageUpdatesCalled func(data string) ([]*vmcommon.StorageUpdate, error) }
ArgumentParserMock -
func (*ArgumentParserMock) CreateDataFromStorageUpdate ¶
func (ap *ArgumentParserMock) CreateDataFromStorageUpdate(storageUpdates []*vmcommon.StorageUpdate) string
CreateDataFromStorageUpdate -
func (*ArgumentParserMock) GetStorageUpdates ¶
func (ap *ArgumentParserMock) GetStorageUpdates(data string) ([]*vmcommon.StorageUpdate, error)
GetStorageUpdates -
func (*ArgumentParserMock) IsInterfaceNil ¶
func (ap *ArgumentParserMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ArgumentParserMock) ParseArguments ¶
func (ap *ArgumentParserMock) ParseArguments(data string) ([][]byte, error)
ParseArguments -
func (*ArgumentParserMock) ParseCallData ¶
func (ap *ArgumentParserMock) ParseCallData(data string) (string, [][]byte, error)
ParseCallData -
func (*ArgumentParserMock) ParseDeployData ¶
func (ap *ArgumentParserMock) ParseDeployData(data string) (*parsers.DeployArgs, error)
ParseDeployData -
type BlockNotarizerHandlerMock ¶
type BlockNotarizerHandlerMock struct { AddNotarizedHeaderCalled func(shardID uint32, notarizedHeader data.HeaderHandler, notarizedHeaderHash []byte) CleanupNotarizedHeadersBehindNonceCalled func(shardID uint32, nonce uint64) DisplayNotarizedHeadersCalled func(shardID uint32, message string) GetFirstNotarizedHeaderCalled func(shardID uint32) (data.HeaderHandler, []byte, error) GetLastNotarizedHeaderCalled func(shardID uint32) (data.HeaderHandler, []byte, error) GetLastNotarizedHeaderNonceCalled func(shardID uint32) uint64 GetNotarizedHeaderCalled func(shardID uint32, offset uint64) (data.HeaderHandler, []byte, error) InitNotarizedHeadersCalled func(startHeaders map[uint32]data.HeaderHandler) error RemoveLastNotarizedHeaderCalled func() RestoreNotarizedHeadersToGenesisCalled func() }
BlockNotarizerHandlerMock -
func (*BlockNotarizerHandlerMock) AddNotarizedHeader ¶
func (bngm *BlockNotarizerHandlerMock) AddNotarizedHeader(shardID uint32, notarizedHeader data.HeaderHandler, notarizedHeaderHash []byte)
AddNotarizedHeader -
func (*BlockNotarizerHandlerMock) CleanupNotarizedHeadersBehindNonce ¶
func (bngm *BlockNotarizerHandlerMock) CleanupNotarizedHeadersBehindNonce(shardID uint32, nonce uint64)
CleanupNotarizedHeadersBehindNonce -
func (*BlockNotarizerHandlerMock) DisplayNotarizedHeaders ¶
func (bngm *BlockNotarizerHandlerMock) DisplayNotarizedHeaders(shardID uint32, message string)
DisplayNotarizedHeaders -
func (*BlockNotarizerHandlerMock) GetFirstNotarizedHeader ¶
func (bngm *BlockNotarizerHandlerMock) GetFirstNotarizedHeader(shardID uint32) (data.HeaderHandler, []byte, error)
GetFirstNotarizedHeader -
func (*BlockNotarizerHandlerMock) GetLastNotarizedHeader ¶
func (bngm *BlockNotarizerHandlerMock) GetLastNotarizedHeader(shardID uint32) (data.HeaderHandler, []byte, error)
GetLastNotarizedHeader -
func (*BlockNotarizerHandlerMock) GetLastNotarizedHeaderNonce ¶
func (bngm *BlockNotarizerHandlerMock) GetLastNotarizedHeaderNonce(shardID uint32) uint64
GetLastNotarizedHeaderNonce -
func (*BlockNotarizerHandlerMock) GetNotarizedHeader ¶
func (bngm *BlockNotarizerHandlerMock) GetNotarizedHeader(shardID uint32, offset uint64) (data.HeaderHandler, []byte, error)
GetNotarizedHeader -
func (*BlockNotarizerHandlerMock) InitNotarizedHeaders ¶
func (bngm *BlockNotarizerHandlerMock) InitNotarizedHeaders(startHeaders map[uint32]data.HeaderHandler) error
InitNotarizedHeaders -
func (*BlockNotarizerHandlerMock) IsInterfaceNil ¶
func (bngm *BlockNotarizerHandlerMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*BlockNotarizerHandlerMock) RemoveLastNotarizedHeader ¶
func (bngm *BlockNotarizerHandlerMock) RemoveLastNotarizedHeader()
RemoveLastNotarizedHeader -
func (*BlockNotarizerHandlerMock) RestoreNotarizedHeadersToGenesis ¶
func (bngm *BlockNotarizerHandlerMock) RestoreNotarizedHeadersToGenesis()
RestoreNotarizedHeadersToGenesis -
type BlockNotifierHandlerStub ¶
type BlockNotifierHandlerStub struct { CallHandlersCalled func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte) RegisterHandlerCalled func(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte)) GetNumRegisteredHandlersCalled func() int }
BlockNotifierHandlerStub -
func (*BlockNotifierHandlerStub) CallHandlers ¶
func (bnhs *BlockNotifierHandlerStub) CallHandlers(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte)
CallHandlers -
func (*BlockNotifierHandlerStub) GetNumRegisteredHandlers ¶
func (bnhs *BlockNotifierHandlerStub) GetNumRegisteredHandlers() int
GetNumRegisteredHandlers -
func (*BlockNotifierHandlerStub) IsInterfaceNil ¶
func (bnhs *BlockNotifierHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*BlockNotifierHandlerStub) RegisterHandler ¶
func (bnhs *BlockNotifierHandlerStub) RegisterHandler(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte))
RegisterHandler -
type BlockSizeThrottlerStub ¶
type BlockSizeThrottlerStub struct { GetCurrentMaxSizeCalled func() uint32 AddCalled func(round uint64, size uint32) SucceedCalled func(round uint64) ComputeCurrentMaxSizeCalled func() }
BlockSizeThrottlerStub -
func (*BlockSizeThrottlerStub) Add ¶
func (bsts *BlockSizeThrottlerStub) Add(round uint64, size uint32)
Add -
func (*BlockSizeThrottlerStub) ComputeCurrentMaxSize ¶
func (bsts *BlockSizeThrottlerStub) ComputeCurrentMaxSize()
ComputeCurrentMaxSize -
func (*BlockSizeThrottlerStub) GetCurrentMaxSize ¶
func (bsts *BlockSizeThrottlerStub) GetCurrentMaxSize() uint32
GetCurrentMaxSize -
func (*BlockSizeThrottlerStub) IsInterfaceNil ¶
func (bsts *BlockSizeThrottlerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*BlockSizeThrottlerStub) Succeed ¶
func (bsts *BlockSizeThrottlerStub) Succeed(round uint64)
Succeed -
type BlockTrackerHandlerMock ¶
type BlockTrackerHandlerMock struct { GetSelfHeadersCalled func(headerHandler data.HeaderHandler) []*track.HeaderInfo ComputeCrossInfoCalled func(headers []data.HeaderHandler) ComputeLongestSelfChainCalled func() (data.HeaderHandler, []byte, []data.HeaderHandler, [][]byte) SortHeadersFromNonceCalled func(shardID uint32, nonce uint64) ([]data.HeaderHandler, [][]byte) AddHeaderFromPoolCalled func(shardID uint32, nonce uint64) }
BlockTrackerHandlerMock -
func (*BlockTrackerHandlerMock) AddHeaderFromPool ¶
func (bthm *BlockTrackerHandlerMock) AddHeaderFromPool(shardID uint32, nonce uint64)
AddHeaderFromPool -
func (*BlockTrackerHandlerMock) ComputeCrossInfo ¶
func (bthm *BlockTrackerHandlerMock) ComputeCrossInfo(headers []data.HeaderHandler)
ComputeCrossInfo -
func (*BlockTrackerHandlerMock) ComputeLongestSelfChain ¶
func (bthm *BlockTrackerHandlerMock) ComputeLongestSelfChain() (data.HeaderHandler, []byte, []data.HeaderHandler, [][]byte)
ComputeLongestSelfChain -
func (*BlockTrackerHandlerMock) GetSelfHeaders ¶
func (bthm *BlockTrackerHandlerMock) GetSelfHeaders(headerHandler data.HeaderHandler) []*track.HeaderInfo
GetSelfHeaders -
func (*BlockTrackerHandlerMock) IsInterfaceNil ¶
func (bthm *BlockTrackerHandlerMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*BlockTrackerHandlerMock) SortHeadersFromNonce ¶
func (bthm *BlockTrackerHandlerMock) SortHeadersFromNonce(shardID uint32, nonce uint64) ([]data.HeaderHandler, [][]byte)
SortHeadersFromNonce -
type BlockTrackerMock ¶
type BlockTrackerMock struct { AddTrackedHeaderCalled func(header data.HeaderHandler, hash []byte) AddCrossNotarizedHeaderCalled func(shardID uint32, crossNotarizedHeader data.HeaderHandler, crossNotarizedHeaderHash []byte) AddSelfNotarizedHeaderCalled func(shardID uint32, selfNotarizedHeader data.HeaderHandler, selfNotarizedHeaderHash []byte) CheckBlockAgainstFinalCalled func(headerHandler data.HeaderHandler) error CheckBlockAgainstRoundHandlerCalled func(headerHandler data.HeaderHandler) error CheckBlockAgainstWhitelistCalled func(interceptedData process.InterceptedData) bool CleanupHeadersBehindNonceCalled func(shardID uint32, selfNotarizedNonce uint64, crossNotarizedNonce uint64) ComputeLongestChainCalled func(shardID uint32, header data.HeaderHandler) ([]data.HeaderHandler, [][]byte) ComputeLongestMetaChainFromLastNotarizedCalled func() ([]data.HeaderHandler, [][]byte, error) ComputeLongestShardsChainsFromLastNotarizedCalled func() ([]data.HeaderHandler, [][]byte, map[uint32][]data.HeaderHandler, error) DisplayTrackedHeadersCalled func() GetCrossNotarizedHeaderCalled func(shardID uint32, offset uint64) (data.HeaderHandler, []byte, error) GetLastCrossNotarizedHeaderCalled func(shardID uint32) (data.HeaderHandler, []byte, error) GetLastCrossNotarizedHeadersForAllShardsCalled func() (map[uint32]data.HeaderHandler, error) GetLastSelfNotarizedHeaderCalled func(shardID uint32) (data.HeaderHandler, []byte, error) GetSelfNotarizedHeaderCalled func(shardID uint32, offset uint64) (data.HeaderHandler, []byte, error) GetTrackedHeadersCalled func(shardID uint32) ([]data.HeaderHandler, [][]byte) GetTrackedHeadersForAllShardsCalled func() map[uint32][]data.HeaderHandler GetTrackedHeadersWithNonceCalled func(shardID uint32, nonce uint64) ([]data.HeaderHandler, [][]byte) ShouldSkipMiniBlocksCreationFromSelfCalled func() bool IsShardStuckCalled func(shardId uint32) bool RegisterCrossNotarizedHeadersHandlerCalled func(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte)) RegisterSelfNotarizedFromCrossHeadersHandlerCalled func(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte)) RegisterSelfNotarizedHeadersHandlerCalled func(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte)) RegisterFinalMetachainHeadersHandlerCalled func(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte)) RemoveLastNotarizedHeadersCalled func() RestoreToGenesisCalled func() ShouldAddHeaderCalled func(headerHandler data.HeaderHandler) bool // contains filtered or unexported fields }
BlockTrackerMock -
func NewBlockTrackerMock ¶
func NewBlockTrackerMock(shardCoordinator sharding.Coordinator, startHeaders map[uint32]data.HeaderHandler) *BlockTrackerMock
NewBlockTrackerMock -
func (*BlockTrackerMock) AddCrossNotarizedHeader ¶
func (btm *BlockTrackerMock) AddCrossNotarizedHeader(shardID uint32, crossNotarizedHeader data.HeaderHandler, crossNotarizedHeaderHash []byte)
AddCrossNotarizedHeader -
func (*BlockTrackerMock) AddSelfNotarizedHeader ¶
func (btm *BlockTrackerMock) AddSelfNotarizedHeader(shardID uint32, selfNotarizedHeader data.HeaderHandler, selfNotarizedHeaderHash []byte)
AddSelfNotarizedHeader -
func (*BlockTrackerMock) AddTrackedHeader ¶
func (btm *BlockTrackerMock) AddTrackedHeader(header data.HeaderHandler, hash []byte)
AddTrackedHeader -
func (*BlockTrackerMock) CheckBlockAgainstFinal ¶
func (btm *BlockTrackerMock) CheckBlockAgainstFinal(headerHandler data.HeaderHandler) error
CheckBlockAgainstFinal -
func (*BlockTrackerMock) CheckBlockAgainstRoundHandler ¶
func (btm *BlockTrackerMock) CheckBlockAgainstRoundHandler(headerHandler data.HeaderHandler) error
CheckBlockAgainstRoundHandler -
func (*BlockTrackerMock) CheckBlockAgainstWhitelist ¶
func (btm *BlockTrackerMock) CheckBlockAgainstWhitelist(interceptedData process.InterceptedData) bool
CheckBlockAgainstWhitelist -
func (*BlockTrackerMock) CleanupHeadersBehindNonce ¶
func (btm *BlockTrackerMock) CleanupHeadersBehindNonce(shardID uint32, selfNotarizedNonce uint64, crossNotarizedNonce uint64)
CleanupHeadersBehindNonce -
func (*BlockTrackerMock) CleanupInvalidCrossHeaders ¶
func (btm *BlockTrackerMock) CleanupInvalidCrossHeaders(_ uint32, _ uint64)
CleanupInvalidCrossHeaders -
func (*BlockTrackerMock) ComputeLongestChain ¶
func (btm *BlockTrackerMock) ComputeLongestChain(shardID uint32, header data.HeaderHandler) ([]data.HeaderHandler, [][]byte)
ComputeLongestChain -
func (*BlockTrackerMock) ComputeLongestMetaChainFromLastNotarized ¶
func (btm *BlockTrackerMock) ComputeLongestMetaChainFromLastNotarized() ([]data.HeaderHandler, [][]byte, error)
ComputeLongestMetaChainFromLastNotarized -
func (*BlockTrackerMock) ComputeLongestShardsChainsFromLastNotarized ¶
func (btm *BlockTrackerMock) ComputeLongestShardsChainsFromLastNotarized() ([]data.HeaderHandler, [][]byte, map[uint32][]data.HeaderHandler, error)
ComputeLongestShardsChainsFromLastNotarized -
func (*BlockTrackerMock) DisplayTrackedHeaders ¶
func (btm *BlockTrackerMock) DisplayTrackedHeaders()
DisplayTrackedHeaders -
func (*BlockTrackerMock) GetCrossNotarizedHeader ¶
func (btm *BlockTrackerMock) GetCrossNotarizedHeader(shardID uint32, offset uint64) (data.HeaderHandler, []byte, error)
GetCrossNotarizedHeader -
func (*BlockTrackerMock) GetLastCrossNotarizedHeader ¶
func (btm *BlockTrackerMock) GetLastCrossNotarizedHeader(shardID uint32) (data.HeaderHandler, []byte, error)
GetLastCrossNotarizedHeader -
func (*BlockTrackerMock) GetLastCrossNotarizedHeadersForAllShards ¶
func (btm *BlockTrackerMock) GetLastCrossNotarizedHeadersForAllShards() (map[uint32]data.HeaderHandler, error)
GetLastCrossNotarizedHeadersForAllShards -
func (*BlockTrackerMock) GetLastSelfNotarizedHeader ¶
func (btm *BlockTrackerMock) GetLastSelfNotarizedHeader(shardID uint32) (data.HeaderHandler, []byte, error)
GetLastSelfNotarizedHeader -
func (*BlockTrackerMock) GetSelfNotarizedHeader ¶
func (btm *BlockTrackerMock) GetSelfNotarizedHeader(shardID uint32, offset uint64) (data.HeaderHandler, []byte, error)
GetSelfNotarizedHeader -
func (*BlockTrackerMock) GetTrackedHeaders ¶
func (btm *BlockTrackerMock) GetTrackedHeaders(shardID uint32) ([]data.HeaderHandler, [][]byte)
GetTrackedHeaders -
func (*BlockTrackerMock) GetTrackedHeadersForAllShards ¶
func (btm *BlockTrackerMock) GetTrackedHeadersForAllShards() map[uint32][]data.HeaderHandler
GetTrackedHeadersForAllShards -
func (*BlockTrackerMock) GetTrackedHeadersWithNonce ¶
func (btm *BlockTrackerMock) GetTrackedHeadersWithNonce(shardID uint32, nonce uint64) ([]data.HeaderHandler, [][]byte)
GetTrackedHeadersWithNonce -
func (*BlockTrackerMock) InitNotarizedHeaders ¶
func (btm *BlockTrackerMock) InitNotarizedHeaders(startHeaders map[uint32]data.HeaderHandler) error
InitNotarizedHeaders -
func (*BlockTrackerMock) IsInterfaceNil ¶
func (btm *BlockTrackerMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*BlockTrackerMock) IsShardStuck ¶
func (btm *BlockTrackerMock) IsShardStuck(shardId uint32) bool
IsShardStuck -
func (*BlockTrackerMock) RegisterCrossNotarizedHeadersHandler ¶
func (btm *BlockTrackerMock) RegisterCrossNotarizedHeadersHandler(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte))
RegisterCrossNotarizedHeadersHandler -
func (*BlockTrackerMock) RegisterFinalMetachainHeadersHandler ¶
func (btm *BlockTrackerMock) RegisterFinalMetachainHeadersHandler(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte))
RegisterFinalMetachainHeadersHandler -
func (*BlockTrackerMock) RegisterSelfNotarizedFromCrossHeadersHandler ¶
func (btm *BlockTrackerMock) RegisterSelfNotarizedFromCrossHeadersHandler(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte))
RegisterSelfNotarizedFromCrossHeadersHandler -
func (*BlockTrackerMock) RegisterSelfNotarizedHeadersHandler ¶
func (btm *BlockTrackerMock) RegisterSelfNotarizedHeadersHandler(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte))
RegisterSelfNotarizedHeadersHandler -
func (*BlockTrackerMock) RemoveLastNotarizedHeaders ¶
func (btm *BlockTrackerMock) RemoveLastNotarizedHeaders()
RemoveLastNotarizedHeaders -
func (*BlockTrackerMock) RestoreToGenesis ¶
func (btm *BlockTrackerMock) RestoreToGenesis()
RestoreToGenesis -
func (*BlockTrackerMock) ShouldAddHeader ¶
func (btm *BlockTrackerMock) ShouldAddHeader(headerHandler data.HeaderHandler) bool
ShouldAddHeader -
func (*BlockTrackerMock) ShouldSkipMiniBlocksCreationFromSelf ¶
func (btm *BlockTrackerMock) ShouldSkipMiniBlocksCreationFromSelf() bool
ShouldSkipMiniBlocksCreationFromSelf -
type BoostrapStorerMock ¶
type BoostrapStorerMock struct { PutCalled func(round int64, bootData bootstrapStorage.BootstrapData) error GetCalled func(round int64) (bootstrapStorage.BootstrapData, error) GetHighestRoundCalled func() int64 SaveLastRoundCalled func(round int64) error }
BoostrapStorerMock -
func (*BoostrapStorerMock) Get ¶
func (bsm *BoostrapStorerMock) Get(round int64) (bootstrapStorage.BootstrapData, error)
Get -
func (*BoostrapStorerMock) GetHighestRound ¶
func (bsm *BoostrapStorerMock) GetHighestRound() int64
GetHighestRound -
func (*BoostrapStorerMock) IsInterfaceNil ¶
func (bsm *BoostrapStorerMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*BoostrapStorerMock) Put ¶
func (bsm *BoostrapStorerMock) Put(round int64, bootData bootstrapStorage.BootstrapData) error
Put -
func (*BoostrapStorerMock) SaveLastRound ¶
func (bsm *BoostrapStorerMock) SaveLastRound(round int64) error
SaveLastRound -
type BootstrapComponentsMock ¶
type BootstrapComponentsMock struct { Coordinator sharding.Coordinator HdrIntegrityVerifier factory.HeaderIntegrityVerifierHandler VersionedHdrFactory factory.VersionedHeaderFactory }
BootstrapComponentsMock -
func (*BootstrapComponentsMock) HeaderIntegrityVerifier ¶
func (bcm *BootstrapComponentsMock) HeaderIntegrityVerifier() factory.HeaderIntegrityVerifierHandler
HeaderIntegrityVerifier -
func (*BootstrapComponentsMock) IsInterfaceNil ¶
func (bcm *BootstrapComponentsMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*BootstrapComponentsMock) ShardCoordinator ¶
func (bcm *BootstrapComponentsMock) ShardCoordinator() sharding.Coordinator
ShardCoordinator -
func (*BootstrapComponentsMock) VersionedHeaderFactory ¶
func (bcm *BootstrapComponentsMock) VersionedHeaderFactory() factory.VersionedHeaderFactory
VersionedHeaderFactory -
type BootstrapperStub ¶
type BootstrapperStub struct { CreateAndCommitEmptyBlockCalled func(uint32) (data.BodyHandler, data.HeaderHandler, error) AddSyncStateListenerCalled func(func(bool)) GetNodeStateCalled func() common.NodeState StartSyncingBlocksCalled func() error }
BootstrapperStub mocks the implementation for a Bootstrapper
func (*BootstrapperStub) AddSyncStateListener ¶
func (boot *BootstrapperStub) AddSyncStateListener(syncStateNotifier func(isSyncing bool))
AddSyncStateListener -
func (*BootstrapperStub) CreateAndCommitEmptyBlock ¶
func (boot *BootstrapperStub) CreateAndCommitEmptyBlock(shardForCurrentNode uint32) (data.BodyHandler, data.HeaderHandler, error)
CreateAndCommitEmptyBlock -
func (*BootstrapperStub) GetNodeState ¶
func (boot *BootstrapperStub) GetNodeState() common.NodeState
GetNodeState -
func (*BootstrapperStub) IsInterfaceNil ¶
func (boot *BootstrapperStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*BootstrapperStub) StartSyncingBlocks ¶
func (boot *BootstrapperStub) StartSyncingBlocks() error
StartSyncingBlocks -
type BuiltInFunctionStub ¶
type BuiltInFunctionStub struct { ProcessBuiltinFunctionCalled func(acntSnd, acntDst vmcommon.UserAccountHandler, vmInput *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error) SetNewGasConfigCalled func(gasCost *vmcommon.GasCost) IsActiveCalled func() bool }
BuiltInFunctionStub -
func (*BuiltInFunctionStub) IsInterfaceNil ¶
func (b *BuiltInFunctionStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*BuiltInFunctionStub) ProcessBuiltinFunction ¶
func (b *BuiltInFunctionStub) ProcessBuiltinFunction(acntSnd, acntDst vmcommon.UserAccountHandler, vmInput *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error)
ProcessBuiltinFunction -
func (*BuiltInFunctionStub) SetNewGasConfig ¶
func (b *BuiltInFunctionStub) SetNewGasConfig(gasCost *vmcommon.GasCost)
SetNewGasConfig -
type ChunkProcessorStub ¶
type ChunkProcessorStub struct { CheckBatchCalled func(b *batch.Batch, w process.WhiteListHandler) (process.CheckedChunkResult, error) CloseCalled func() error }
ChunkProcessorStub -
func (*ChunkProcessorStub) CheckBatch ¶
func (c *ChunkProcessorStub) CheckBatch(b *batch.Batch, w process.WhiteListHandler) (process.CheckedChunkResult, error)
CheckBatch -
func (*ChunkProcessorStub) IsInterfaceNil ¶
func (c *ChunkProcessorStub) IsInterfaceNil() bool
IsInterfaceNil -
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 CoreComponentsMock ¶
type CoreComponentsMock struct { IntMarsh marshal.Marshalizer TxMarsh marshal.Marshalizer Hash hashing.Hasher TxSignHasherField hashing.Hasher UInt64ByteSliceConv typeConverters.Uint64ByteSliceConverter AddrPubKeyConv core.PubkeyConverter ValPubKeyConv core.PubkeyConverter PathHdl storage.PathManagerHandler ChainIdCalled func() string MinTransactionVersionCalled func() uint32 GenesisNodesSetupCalled func() sharding.GenesisNodesSetupHandler TxVersionCheckField process.TxVersionCheckerHandler EpochNotifierField process.EpochNotifier EnableEpochsHandlerField common.EnableEpochsHandler RoundNotifierField process.RoundNotifier EnableRoundsHandlerField process.EnableRoundsHandler RoundField consensus.RoundHandler StatusField core.AppStatusHandler ChanStopNode chan endProcess.ArgEndProcess NodeTypeProviderField core.NodeTypeProviderHandler EconomicsDataField process.EconomicsDataHandler ProcessStatusHandlerField common.ProcessStatusHandler HardforkTriggerPubKeyField []byte }
CoreComponentsMock -
func (*CoreComponentsMock) AddressPubKeyConverter ¶
func (ccm *CoreComponentsMock) AddressPubKeyConverter() core.PubkeyConverter
AddressPubKeyConverter -
func (*CoreComponentsMock) ChanStopNodeProcess ¶
func (ccm *CoreComponentsMock) ChanStopNodeProcess() chan endProcess.ArgEndProcess
ChanStopNodeProcess -
func (*CoreComponentsMock) EconomicsData ¶
func (ccm *CoreComponentsMock) EconomicsData() process.EconomicsDataHandler
EconomicsData -
func (*CoreComponentsMock) EnableEpochsHandler ¶
func (ccm *CoreComponentsMock) EnableEpochsHandler() common.EnableEpochsHandler
EnableEpochsHandler -
func (*CoreComponentsMock) EnableRoundsHandler ¶
func (ccm *CoreComponentsMock) EnableRoundsHandler() process.EnableRoundsHandler
EnableEpochsHandler -
func (*CoreComponentsMock) EpochNotifier ¶
func (ccm *CoreComponentsMock) EpochNotifier() process.EpochNotifier
EpochNotifier -
func (*CoreComponentsMock) GenesisNodesSetup ¶
func (ccm *CoreComponentsMock) GenesisNodesSetup() sharding.GenesisNodesSetupHandler
GenesisNodesSetup -
func (*CoreComponentsMock) HardforkTriggerPubKey ¶
func (ccm *CoreComponentsMock) HardforkTriggerPubKey() []byte
HardforkTriggerPubKey -
func (*CoreComponentsMock) InternalMarshalizer ¶
func (ccm *CoreComponentsMock) InternalMarshalizer() marshal.Marshalizer
InternalMarshalizer -
func (*CoreComponentsMock) IsInterfaceNil ¶
func (ccm *CoreComponentsMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*CoreComponentsMock) MinTransactionVersion ¶
func (ccm *CoreComponentsMock) MinTransactionVersion() uint32
MinTransactionVersion -
func (*CoreComponentsMock) NodeTypeProvider ¶
func (ccm *CoreComponentsMock) NodeTypeProvider() core.NodeTypeProviderHandler
NodeTypeProvider -
func (*CoreComponentsMock) PathHandler ¶
func (ccm *CoreComponentsMock) PathHandler() storage.PathManagerHandler
PathHandler -
func (*CoreComponentsMock) ProcessStatusHandler ¶
func (ccm *CoreComponentsMock) ProcessStatusHandler() common.ProcessStatusHandler
ProcessStatusHandler -
func (*CoreComponentsMock) RoundHandler ¶
func (ccm *CoreComponentsMock) RoundHandler() consensus.RoundHandler
RoundHandler -
func (*CoreComponentsMock) RoundNotifier ¶
func (ccm *CoreComponentsMock) RoundNotifier() process.RoundNotifier
RoundNotifier -
func (*CoreComponentsMock) SetInternalMarshalizer ¶
func (ccm *CoreComponentsMock) SetInternalMarshalizer(m marshal.Marshalizer) error
SetInternalMarshalizer -
func (*CoreComponentsMock) TxMarshalizer ¶
func (ccm *CoreComponentsMock) TxMarshalizer() marshal.Marshalizer
TxMarshalizer -
func (*CoreComponentsMock) TxSignHasher ¶
func (ccm *CoreComponentsMock) TxSignHasher() hashing.Hasher
TxSignHasher -
func (*CoreComponentsMock) TxVersionChecker ¶
func (ccm *CoreComponentsMock) TxVersionChecker() process.TxVersionCheckerHandler
TxVersionChecker -
func (*CoreComponentsMock) Uint64ByteSliceConverter ¶
func (ccm *CoreComponentsMock) Uint64ByteSliceConverter() typeConverters.Uint64ByteSliceConverter
Uint64ByteSliceConverter -
func (*CoreComponentsMock) ValidatorPubKeyConverter ¶
func (ccm *CoreComponentsMock) ValidatorPubKeyConverter() core.PubkeyConverter
ValidatorPubKeyConverter -
type CryptoComponentsMock ¶
type CryptoComponentsMock struct { BlockSig crypto.SingleSigner TxSig crypto.SingleSigner MultiSigContainer cryptoCommon.MultiSignerContainer PeerSignHandler crypto.PeerSignatureHandler BlKeyGen crypto.KeyGenerator TxKeyGen crypto.KeyGenerator PubKey crypto.PublicKey PrivKey crypto.PrivateKey ManagedPeers common.ManagedPeersHolder // contains filtered or unexported fields }
CryptoComponentsMock -
func (*CryptoComponentsMock) BlockSignKeyGen ¶
func (ccm *CryptoComponentsMock) BlockSignKeyGen() crypto.KeyGenerator
BlockSignKeyGen -
func (*CryptoComponentsMock) BlockSigner ¶
func (ccm *CryptoComponentsMock) BlockSigner() crypto.SingleSigner
BlockSigner -
func (*CryptoComponentsMock) GetMultiSigner ¶
func (ccm *CryptoComponentsMock) GetMultiSigner(epoch uint32) (crypto.MultiSigner, error)
GetMultiSigner -
func (*CryptoComponentsMock) IsInterfaceNil ¶
func (ccm *CryptoComponentsMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*CryptoComponentsMock) ManagedPeersHolder ¶
func (ccm *CryptoComponentsMock) ManagedPeersHolder() common.ManagedPeersHolder
ManagedPeersHolder -
func (*CryptoComponentsMock) MultiSignerContainer ¶
func (ccm *CryptoComponentsMock) MultiSignerContainer() cryptoCommon.MultiSignerContainer
MultiSignerContainer -
func (*CryptoComponentsMock) PeerSignatureHandler ¶
func (ccm *CryptoComponentsMock) PeerSignatureHandler() crypto.PeerSignatureHandler
PeerSignatureHandler returns the peer signature handler
func (*CryptoComponentsMock) PrivateKey ¶
func (ccm *CryptoComponentsMock) PrivateKey() crypto.PrivateKey
PrivateKey -
func (*CryptoComponentsMock) PublicKey ¶
func (ccm *CryptoComponentsMock) PublicKey() crypto.PublicKey
PublicKey -
func (*CryptoComponentsMock) SetMultiSignerContainer ¶
func (ccm *CryptoComponentsMock) SetMultiSignerContainer(msc cryptoCommon.MultiSignerContainer) error
SetMultiSignerContainer -
func (*CryptoComponentsMock) TxSignKeyGen ¶
func (ccm *CryptoComponentsMock) TxSignKeyGen() crypto.KeyGenerator
TxSignKeyGen -
func (*CryptoComponentsMock) TxSingleSigner ¶
func (ccm *CryptoComponentsMock) TxSingleSigner() crypto.SingleSigner
TxSingleSigner -
type CurrentNetworkEpochSetterStub ¶
type CurrentNetworkEpochSetterStub struct {
SetCurrentEpochCalled func(epoch uint32)
}
CurrentNetworkEpochSetterStub -
func (*CurrentNetworkEpochSetterStub) IsInterfaceNil ¶
func (c *CurrentNetworkEpochSetterStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*CurrentNetworkEpochSetterStub) SetNetworkEpochAtBootstrap ¶
func (c *CurrentNetworkEpochSetterStub) SetNetworkEpochAtBootstrap(epoch uint32)
SetNetworkEpochAtBootstrap -
type DCDTRoleHandlerStub ¶
type DCDTRoleHandlerStub struct {
CheckAllowedToExecuteCalled func(account state.UserAccountHandler, tokenID []byte, action []byte) error
}
DCDTRoleHandlerStub -
func (*DCDTRoleHandlerStub) CheckAllowedToExecute ¶
func (e *DCDTRoleHandlerStub) CheckAllowedToExecute(account state.UserAccountHandler, tokenID []byte, action []byte) error
CheckAllowedToExecute -
func (*DCDTRoleHandlerStub) IsInterfaceNil ¶
func (e *DCDTRoleHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
type DataComponentsMock ¶
type DataComponentsMock struct { Storage dataRetriever.StorageService DataPool dataRetriever.PoolsHolder BlockChain data.ChainHandler }
DataComponentsMock -
func (*DataComponentsMock) Blockchain ¶
func (dcm *DataComponentsMock) Blockchain() data.ChainHandler
Blockchain -
func (*DataComponentsMock) Datapool ¶
func (dcm *DataComponentsMock) Datapool() dataRetriever.PoolsHolder
Datapool -
func (*DataComponentsMock) IsInterfaceNil ¶
func (dcm *DataComponentsMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*DataComponentsMock) StorageService ¶
func (dcm *DataComponentsMock) StorageService() dataRetriever.StorageService
StorageService -
type EpochEconomicsStub ¶
type EpochEconomicsStub struct { ComputeEndOfEpochEconomicsCalled func(metaBlock *block.MetaBlock) (*block.Economics, error) VerifyRewardsPerBlockCalled func( metaBlock *block.MetaBlock, correctedProtocolSustainability *big.Int, computedEconomics *block.Economics, ) error }
EpochEconomicsStub -
func (*EpochEconomicsStub) ComputeEndOfEpochEconomics ¶
func (e *EpochEconomicsStub) ComputeEndOfEpochEconomics(metaBlock *block.MetaBlock) (*block.Economics, error)
ComputeEndOfEpochEconomics -
func (*EpochEconomicsStub) IsInterfaceNil ¶
func (e *EpochEconomicsStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*EpochEconomicsStub) VerifyRewardsPerBlock ¶
func (e *EpochEconomicsStub) VerifyRewardsPerBlock( metaBlock *block.MetaBlock, correctedProtocolSustainability *big.Int, computedEconomics *block.Economics, ) error
VerifyRewardsPerBlock -
type EpochStartDataCreatorStub ¶
type EpochStartDataCreatorStub struct { CreateEpochStartDataCalled func() (*block.EpochStart, error) VerifyEpochStartDataForMetablockCalled func(metaBlock *block.MetaBlock) error }
EpochStartDataCreatorStub -
func (*EpochStartDataCreatorStub) CreateEpochStartData ¶
func (e *EpochStartDataCreatorStub) CreateEpochStartData() (*block.EpochStart, error)
CreateEpochStartData -
func (*EpochStartDataCreatorStub) IsInterfaceNil ¶
func (e *EpochStartDataCreatorStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*EpochStartDataCreatorStub) VerifyEpochStartDataForMetablock ¶
func (e *EpochStartDataCreatorStub) VerifyEpochStartDataForMetablock(metaBlock *block.MetaBlock) error
VerifyEpochStartDataForMetablock -
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) // 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) RegisterHandler ¶
func (esnm *EpochStartNotifierStub) RegisterHandler(handler epochStart.ActionHandler)
RegisterHandler -
func (*EpochStartNotifierStub) UnregisterHandler ¶
func (esnm *EpochStartNotifierStub) UnregisterHandler(handler epochStart.ActionHandler)
UnregisterHandler -
type EpochStartTriggerStub ¶
type EpochStartTriggerStub struct { ForceEpochStartCalled func() error IsEpochStartCalled func() bool EpochCalled func() uint32 MetaEpochCalled func() uint32 ReceivedHeaderCalled func(handler data.HeaderHandler) UpdateCalled func(round uint64, nonce uint64) ProcessedCalled func(header data.HeaderHandler) EpochStartRoundCalled func() uint64 EpochFinalityAttestingRoundCalled 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() error
ForceEpochStart -
func (*EpochStartTriggerStub) GetSavedStateKey ¶
func (e *EpochStartTriggerStub) GetSavedStateKey() []byte
GetSavedStateKey -
func (*EpochStartTriggerStub) IsEpochStart ¶
func (e *EpochStartTriggerStub) IsEpochStart() bool
IsEpochStart -
func (*EpochStartTriggerStub) IsInterfaceNil ¶
func (e *EpochStartTriggerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*EpochStartTriggerStub) LoadState ¶
func (e *EpochStartTriggerStub) LoadState(_ []byte) error
LoadState -
func (*EpochStartTriggerStub) MetaEpoch ¶
func (e *EpochStartTriggerStub) MetaEpoch() uint32
MetaEpoch -
func (*EpochStartTriggerStub) NotifyAll ¶
func (e *EpochStartTriggerStub) NotifyAll(_ data.HeaderHandler)
NotifyAll -
func (*EpochStartTriggerStub) RequestEpochStartIfNeeded ¶
func (e *EpochStartTriggerStub) RequestEpochStartIfNeeded(_ data.HeaderHandler)
RequestEpochStartIfNeeded -
func (*EpochStartTriggerStub) Revert ¶
func (e *EpochStartTriggerStub) Revert(_ data.HeaderHandler)
Revert -
func (*EpochStartTriggerStub) RevertStateToBlock ¶
func (e *EpochStartTriggerStub) RevertStateToBlock(_ data.HeaderHandler) error
RevertStateToBlock -
func (*EpochStartTriggerStub) SetAppStatusHandler ¶
func (e *EpochStartTriggerStub) SetAppStatusHandler(_ core.AppStatusHandler) error
SetAppStatusHandler -
func (*EpochStartTriggerStub) SetCurrentEpochStartRound ¶
func (e *EpochStartTriggerStub) SetCurrentEpochStartRound(_ uint64)
SetCurrentEpochStartRound -
func (*EpochStartTriggerStub) SetFinalityAttestingRound ¶
func (e *EpochStartTriggerStub) SetFinalityAttestingRound(_ uint64)
SetFinalityAttestingRound -
func (*EpochStartTriggerStub) SetProcessed ¶
func (e *EpochStartTriggerStub) SetProcessed(header data.HeaderHandler, _ data.BodyHandler)
SetProcessed -
func (*EpochStartTriggerStub) Update ¶
func (e *EpochStartTriggerStub) Update(round uint64, nonce uint64)
Update -
type FeeAccumulatorStub ¶
type FeeAccumulatorStub struct { CreateBlockStartedCalled func(gasAndFees scheduled.GasAndFees) GetAccumulatedFeesCalled func() *big.Int GetDeveloperFeesCalled func() *big.Int ProcessTransactionFeeCalled func(cost *big.Int, devFee *big.Int, hash []byte) ProcessTransactionFeeRelayedUserTxCalled func(cost *big.Int, devFee *big.Int, userTxHash []byte, originalTxHash []byte) RevertFeesCalled func(txHashes [][]byte) }
FeeAccumulatorStub is a stub which implements TransactionFeeHandler interface
func (*FeeAccumulatorStub) CreateBlockStarted ¶
func (f *FeeAccumulatorStub) CreateBlockStarted(gasAndFees scheduled.GasAndFees)
CreateBlockStarted -
func (*FeeAccumulatorStub) GetAccumulatedFees ¶
func (f *FeeAccumulatorStub) GetAccumulatedFees() *big.Int
GetAccumulatedFees -
func (*FeeAccumulatorStub) GetDeveloperFees ¶
func (f *FeeAccumulatorStub) GetDeveloperFees() *big.Int
GetDeveloperFees -
func (*FeeAccumulatorStub) IsInterfaceNil ¶
func (f *FeeAccumulatorStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*FeeAccumulatorStub) ProcessTransactionFee ¶
ProcessTransactionFee -
func (*FeeAccumulatorStub) ProcessTransactionFeeRelayedUserTx ¶
func (f *FeeAccumulatorStub) ProcessTransactionFeeRelayedUserTx(cost *big.Int, devFee *big.Int, userTxHash []byte, originalTxHash []byte)
ProcessTransactionFeeRelayedUserTx -
func (*FeeAccumulatorStub) RevertFees ¶
func (f *FeeAccumulatorStub) RevertFees(txHashes [][]byte)
RevertFees -
type FloodPreventerStub ¶
type FloodPreventerStub struct { IncreaseLoadCalled func(pid core.PeerID, size uint64) error ApplyConsensusSizeCalled func(size int) ResetCalled func() }
FloodPreventerStub -
func (*FloodPreventerStub) ApplyConsensusSize ¶
func (fps *FloodPreventerStub) ApplyConsensusSize(size int)
ApplyConsensusSize -
func (*FloodPreventerStub) IncreaseLoad ¶
func (fps *FloodPreventerStub) IncreaseLoad(pid core.PeerID, size uint64) error
IncreaseLoad -
func (*FloodPreventerStub) IsInterfaceNil ¶
func (fps *FloodPreventerStub) IsInterfaceNil() bool
IsInterfaceNil -
type ForkDetectorMock ¶
type ForkDetectorMock struct { AddHeaderCalled func(header data.HeaderHandler, hash []byte, state process.BlockHeaderState, selfNotarizedHeaders []data.HeaderHandler, selfNotarizedHeadersHashes [][]byte) error RemoveHeaderCalled func(nonce uint64, hash []byte) CheckForkCalled func() *process.ForkInfo GetHighestFinalBlockNonceCalled func() uint64 GetHighestFinalBlockHashCalled func() []byte ProbableHighestNonceCalled func() uint64 ResetForkCalled func() GetNotarizedHeaderHashCalled func(nonce uint64) []byte SetRollBackNonceCalled func(nonce uint64) RestoreToGenesisCalled func() ResetProbableHighestNonceCalled func() SetFinalToLastCheckpointCalled func() }
ForkDetectorMock -
func (*ForkDetectorMock) AddHeader ¶
func (fdm *ForkDetectorMock) AddHeader(header data.HeaderHandler, hash []byte, state process.BlockHeaderState, selfNotarizedHeaders []data.HeaderHandler, selfNotarizedHeadersHashes [][]byte) error
AddHeader -
func (*ForkDetectorMock) CheckFork ¶
func (fdm *ForkDetectorMock) CheckFork() *process.ForkInfo
CheckFork -
func (*ForkDetectorMock) GetHighestFinalBlockHash ¶
func (fdm *ForkDetectorMock) GetHighestFinalBlockHash() []byte
GetHighestFinalBlockHash -
func (*ForkDetectorMock) GetHighestFinalBlockNonce ¶
func (fdm *ForkDetectorMock) GetHighestFinalBlockNonce() uint64
GetHighestFinalBlockNonce -
func (*ForkDetectorMock) GetNotarizedHeaderHash ¶
func (fdm *ForkDetectorMock) GetNotarizedHeaderHash(nonce uint64) []byte
GetNotarizedHeaderHash -
func (*ForkDetectorMock) IsInterfaceNil ¶
func (fdm *ForkDetectorMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ForkDetectorMock) ProbableHighestNonce ¶
func (fdm *ForkDetectorMock) ProbableHighestNonce() uint64
ProbableHighestNonce -
func (*ForkDetectorMock) RemoveHeader ¶
func (fdm *ForkDetectorMock) RemoveHeader(nonce uint64, hash []byte)
RemoveHeader -
func (*ForkDetectorMock) ResetProbableHighestNonce ¶
func (fdm *ForkDetectorMock) ResetProbableHighestNonce()
ResetProbableHighestNonce -
func (*ForkDetectorMock) RestoreToGenesis ¶
func (fdm *ForkDetectorMock) RestoreToGenesis()
RestoreToGenesis -
func (*ForkDetectorMock) SetFinalToLastCheckpoint ¶
func (fdm *ForkDetectorMock) SetFinalToLastCheckpoint()
SetFinalToLastCheckpoint -
func (*ForkDetectorMock) SetRollBackNonce ¶
func (fdm *ForkDetectorMock) SetRollBackNonce(nonce uint64)
SetRollBackNonce -
type GasHandlerMock ¶
type GasHandlerMock struct { InitCalled func() ResetCalled func(key []byte) SetGasProvidedCalled func(gasProvided uint64, hash []byte) SetGasProvidedAsScheduledCalled func(gasProvided uint64, hash []byte) SetGasRefundedCalled func(gasRefunded uint64, hash []byte) SetGasPenalizedCalled func(gasPenalized uint64, hash []byte) GasProvidedCalled func(hash []byte) uint64 GasProvidedAsScheduledCalled func(hash []byte) uint64 GasRefundedCalled func(hash []byte) uint64 GasPenalizedCalled func(hash []byte) uint64 TotalGasProvidedCalled func() uint64 TotalGasProvidedAsScheduledCalled func() uint64 TotalGasProvidedWithScheduledCalled func() uint64 TotalGasRefundedCalled func() uint64 TotalGasPenalizedCalled func() uint64 RemoveGasProvidedCalled func(hashes [][]byte) RemoveGasProvidedAsScheduledCalled func(hashes [][]byte) RemoveGasRefundedCalled func(hashes [][]byte) RemoveGasPenalizedCalled func(hashes [][]byte) RestoreGasSinceLastResetCalled func(key []byte) ComputeGasProvidedByMiniBlockCalled func(miniBlock *block.MiniBlock, mapHashTx map[string]data.TransactionHandler) (uint64, uint64, error) ComputeGasProvidedByTxCalled func(txSenderShardId uint32, txReceiverSharedId uint32, txHandler data.TransactionHandler) (uint64, uint64, error) }
GasHandlerMock -
func (*GasHandlerMock) ComputeGasProvidedByMiniBlock ¶
func (ghm *GasHandlerMock) ComputeGasProvidedByMiniBlock(miniBlock *block.MiniBlock, mapHashTx map[string]data.TransactionHandler) (uint64, uint64, error)
ComputeGasProvidedByMiniBlock -
func (*GasHandlerMock) ComputeGasProvidedByTx ¶
func (ghm *GasHandlerMock) ComputeGasProvidedByTx(txSenderShardId uint32, txReceiverShardId uint32, txHandler data.TransactionHandler) (uint64, uint64, error)
ComputeGasProvidedByTx -
func (*GasHandlerMock) GasPenalized ¶
func (ghm *GasHandlerMock) GasPenalized(hash []byte) uint64
GasPenalized -
func (*GasHandlerMock) GasProvided ¶
func (ghm *GasHandlerMock) GasProvided(hash []byte) uint64
GasProvided -
func (*GasHandlerMock) GasProvidedAsScheduled ¶
func (ghm *GasHandlerMock) GasProvidedAsScheduled(hash []byte) uint64
GasProvidedAsScheduled -
func (*GasHandlerMock) GasRefunded ¶
func (ghm *GasHandlerMock) GasRefunded(hash []byte) uint64
GasRefunded -
func (*GasHandlerMock) IsInterfaceNil ¶
func (ghm *GasHandlerMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*GasHandlerMock) RemoveGasPenalized ¶
func (ghm *GasHandlerMock) RemoveGasPenalized(hashes [][]byte)
RemoveGasPenalized -
func (*GasHandlerMock) RemoveGasProvided ¶
func (ghm *GasHandlerMock) RemoveGasProvided(hashes [][]byte)
RemoveGasProvided -
func (*GasHandlerMock) RemoveGasProvidedAsScheduled ¶
func (ghm *GasHandlerMock) RemoveGasProvidedAsScheduled(hashes [][]byte)
RemoveGasProvidedAsScheduled -
func (*GasHandlerMock) RemoveGasRefunded ¶
func (ghm *GasHandlerMock) RemoveGasRefunded(hashes [][]byte)
RemoveGasRefunded -
func (*GasHandlerMock) RestoreGasSinceLastReset ¶
func (ghm *GasHandlerMock) RestoreGasSinceLastReset(key []byte)
RestoreGasSinceLastReset -
func (*GasHandlerMock) SetGasPenalized ¶
func (ghm *GasHandlerMock) SetGasPenalized(gasPenalized uint64, hash []byte)
SetGasPenalized -
func (*GasHandlerMock) SetGasProvided ¶
func (ghm *GasHandlerMock) SetGasProvided(gasProvided uint64, hash []byte)
SetGasProvided -
func (*GasHandlerMock) SetGasProvidedAsScheduled ¶
func (ghm *GasHandlerMock) SetGasProvidedAsScheduled(gasProvided uint64, hash []byte)
SetGasProvidedAsScheduled -
func (*GasHandlerMock) SetGasRefunded ¶
func (ghm *GasHandlerMock) SetGasRefunded(gasRefunded uint64, hash []byte)
SetGasRefunded -
func (*GasHandlerMock) TotalGasPenalized ¶
func (ghm *GasHandlerMock) TotalGasPenalized() uint64
TotalGasPenalized -
func (*GasHandlerMock) TotalGasProvided ¶
func (ghm *GasHandlerMock) TotalGasProvided() uint64
TotalGasProvided -
func (*GasHandlerMock) TotalGasProvidedAsScheduled ¶
func (ghm *GasHandlerMock) TotalGasProvidedAsScheduled() uint64
TotalGasProvidedAsScheduled -
func (*GasHandlerMock) TotalGasProvidedWithScheduled ¶
func (ghm *GasHandlerMock) TotalGasProvidedWithScheduled() uint64
TotalGasProvidedWithScheduled -
func (*GasHandlerMock) TotalGasRefunded ¶
func (ghm *GasHandlerMock) TotalGasRefunded() uint64
TotalGasRefunded -
type GetHdrHandlerStub ¶
type GetHdrHandlerStub struct {
HeaderHandlerCalled func() data.HeaderHandler
}
GetHdrHandlerStub -
func (*GetHdrHandlerStub) HeaderHandler ¶
func (ghhs *GetHdrHandlerStub) HeaderHandler() data.HeaderHandler
HeaderHandler -
type HasherStub ¶
HasherStub -
func (*HasherStub) IsInterfaceNil ¶
func (hash *HasherStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type HeaderIntegrityVerifierStub ¶
type HeaderIntegrityVerifierStub struct { VerifyCalled func(header data.HeaderHandler) error GetVersionCalled func(epoch uint32) string }
HeaderIntegrityVerifierStub -
func (*HeaderIntegrityVerifierStub) GetVersion ¶
func (h *HeaderIntegrityVerifierStub) GetVersion(epoch uint32) string
GetVersion -
func (*HeaderIntegrityVerifierStub) IsInterfaceNil ¶
func (h *HeaderIntegrityVerifierStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*HeaderIntegrityVerifierStub) Verify ¶
func (h *HeaderIntegrityVerifierStub) Verify(header data.HeaderHandler) error
Verify -
type HeaderSigVerifierStub ¶
type HeaderSigVerifierStub struct { VerifyLeaderSignatureCalled func(header data.HeaderHandler) error VerifyRandSeedCalled func(header data.HeaderHandler) error VerifyRandSeedAndLeaderSignatureCalled func(header data.HeaderHandler) error VerifySignatureCalled func(header data.HeaderHandler) error }
HeaderSigVerifierStub -
func (*HeaderSigVerifierStub) IsInterfaceNil ¶
func (hsvm *HeaderSigVerifierStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*HeaderSigVerifierStub) VerifyLeaderSignature ¶
func (hsvm *HeaderSigVerifierStub) VerifyLeaderSignature(header data.HeaderHandler) error
VerifyLeaderSignature -
func (*HeaderSigVerifierStub) VerifyRandSeed ¶
func (hsvm *HeaderSigVerifierStub) VerifyRandSeed(header data.HeaderHandler) error
VerifyRandSeed -
func (*HeaderSigVerifierStub) VerifyRandSeedAndLeaderSignature ¶
func (hsvm *HeaderSigVerifierStub) VerifyRandSeedAndLeaderSignature(header data.HeaderHandler) error
VerifyRandSeedAndLeaderSignature -
func (*HeaderSigVerifierStub) VerifySignature ¶
func (hsvm *HeaderSigVerifierStub) VerifySignature(header data.HeaderHandler) error
VerifySignature -
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 InterceptedDataFactoryStub ¶
type InterceptedDataFactoryStub struct {
CreateCalled func(buff []byte) (process.InterceptedData, error)
}
InterceptedDataFactoryStub -
func (*InterceptedDataFactoryStub) Create ¶
func (idfs *InterceptedDataFactoryStub) Create(buff []byte) (process.InterceptedData, error)
Create -
func (*InterceptedDataFactoryStub) IsInterfaceNil ¶
func (idfs *InterceptedDataFactoryStub) IsInterfaceNil() bool
IsInterfaceNil -
type InterceptedDataVerifierMock ¶
type InterceptedDataVerifierMock struct { }
InterceptedDataVerifierMock -
func (*InterceptedDataVerifierMock) IsForCurrentShard ¶
func (i *InterceptedDataVerifierMock) IsForCurrentShard(_ process.InterceptedData) bool
IsForCurrentShard -
func (*InterceptedDataVerifierMock) IsInterfaceNil ¶
func (i *InterceptedDataVerifierMock) IsInterfaceNil() bool
IsInterfaceNil returns true if underlying object is
type InterceptedDebugHandlerStub ¶
type InterceptedDebugHandlerStub struct { LogReceivedHashesCalled func(topic string, hashes [][]byte) LogProcessedHashesCalled func(topic string, hashes [][]byte, err error) }
InterceptedDebugHandlerStub -
func (*InterceptedDebugHandlerStub) IsInterfaceNil ¶
func (idhs *InterceptedDebugHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*InterceptedDebugHandlerStub) LogProcessedHashes ¶
func (idhs *InterceptedDebugHandlerStub) LogProcessedHashes(topic string, hashes [][]byte, err error)
LogProcessedHashes -
func (*InterceptedDebugHandlerStub) LogReceivedHashes ¶
func (idhs *InterceptedDebugHandlerStub) LogReceivedHashes(topic string, hashes [][]byte)
LogReceivedHashes -
type InterceptedTrieNodeStub ¶
type InterceptedTrieNodeStub struct { CheckValidityCalled func() error IsForCurrentShardCalled func() bool SizeInBytesCalled func() int HashField []byte StringField string IdentifiersField [][]byte TypeField string }
InterceptedTrieNodeStub -
func (*InterceptedTrieNodeStub) CheckValidity ¶
func (ins *InterceptedTrieNodeStub) CheckValidity() error
CheckValidity -
func (*InterceptedTrieNodeStub) Identifiers ¶
func (ins *InterceptedTrieNodeStub) Identifiers() [][]byte
Identifiers -
func (*InterceptedTrieNodeStub) IsForCurrentShard ¶
func (ins *InterceptedTrieNodeStub) IsForCurrentShard() bool
IsForCurrentShard -
func (*InterceptedTrieNodeStub) IsInterfaceNil ¶
func (ins *InterceptedTrieNodeStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*InterceptedTrieNodeStub) SizeInBytes ¶
func (ins *InterceptedTrieNodeStub) SizeInBytes() int
SizeInBytes -
func (*InterceptedTrieNodeStub) String ¶
func (ins *InterceptedTrieNodeStub) String() string
String -
type InterceptedTxHandlerStub ¶
type InterceptedTxHandlerStub struct { SenderShardIdCalled func() uint32 ReceiverShardIdCalled func() uint32 NonceCalled func() uint64 SenderAddressCalled func() []byte FeeCalled func() *big.Int TransactionCalled func() data.TransactionHandler GetTxMessageForSignatureVerificationCalled func() ([]byte, error) }
InterceptedTxHandlerStub -
func (*InterceptedTxHandlerStub) GetTxMessageForSignatureVerification ¶
func (iths *InterceptedTxHandlerStub) GetTxMessageForSignatureVerification() ([]byte, error)
GetTxMessageForSignatureVerification -
func (*InterceptedTxHandlerStub) Nonce ¶
func (iths *InterceptedTxHandlerStub) Nonce() uint64
Nonce -
func (*InterceptedTxHandlerStub) ReceiverShardId ¶
func (iths *InterceptedTxHandlerStub) ReceiverShardId() uint32
ReceiverShardId -
func (*InterceptedTxHandlerStub) SenderAddress ¶
func (iths *InterceptedTxHandlerStub) SenderAddress() []byte
SenderAddress -
func (*InterceptedTxHandlerStub) SenderShardId ¶
func (iths *InterceptedTxHandlerStub) SenderShardId() uint32
SenderShardId -
func (*InterceptedTxHandlerStub) Transaction ¶
func (iths *InterceptedTxHandlerStub) Transaction() data.TransactionHandler
Transaction -
type InterceptorProcessorStub ¶
type InterceptorProcessorStub struct { ValidateCalled func(data process.InterceptedData) error SaveCalled func(data process.InterceptedData) error RegisterHandlerCalled func(handler func(topic string, hash []byte, data interface{})) }
InterceptorProcessorStub -
func (*InterceptorProcessorStub) IsInterfaceNil ¶
func (ips *InterceptorProcessorStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*InterceptorProcessorStub) RegisterHandler ¶
func (ips *InterceptorProcessorStub) RegisterHandler(handler func(topic string, hash []byte, data interface{}))
RegisterHandler -
func (*InterceptorProcessorStub) Save ¶
func (ips *InterceptorProcessorStub) Save(data process.InterceptedData, _ core.PeerID, _ string) error
Save -
func (*InterceptorProcessorStub) Validate ¶
func (ips *InterceptorProcessorStub) Validate(data process.InterceptedData, _ core.PeerID) error
Validate -
type InterceptorThrottlerStub ¶
type InterceptorThrottlerStub struct { CanProcessCalled func() bool // contains filtered or unexported fields }
InterceptorThrottlerStub -
func (*InterceptorThrottlerStub) CanProcess ¶
func (its *InterceptorThrottlerStub) CanProcess() bool
CanProcess -
func (*InterceptorThrottlerStub) EndProcessing ¶
func (its *InterceptorThrottlerStub) EndProcessing()
EndProcessing -
func (*InterceptorThrottlerStub) EndProcessingCount ¶
func (its *InterceptorThrottlerStub) EndProcessingCount() int32
EndProcessingCount -
func (*InterceptorThrottlerStub) IsInterfaceNil ¶
func (its *InterceptorThrottlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*InterceptorThrottlerStub) StartProcessing ¶
func (its *InterceptorThrottlerStub) StartProcessing()
StartProcessing -
func (*InterceptorThrottlerStub) StartProcessingCount ¶
func (its *InterceptorThrottlerStub) StartProcessingCount() int32
StartProcessingCount -
type InterimProcessorContainerMock ¶
type InterimProcessorContainerMock struct { GetCalled func(key block.Type) (process.IntermediateTransactionHandler, error) KeysCalled func() []block.Type }
InterimProcessorContainerMock -
func (*InterimProcessorContainerMock) Add ¶
func (ipcm *InterimProcessorContainerMock) Add(_ block.Type, _ process.IntermediateTransactionHandler) error
Add -
func (*InterimProcessorContainerMock) AddMultiple ¶
func (ipcm *InterimProcessorContainerMock) AddMultiple(_ []block.Type, _ []process.IntermediateTransactionHandler) error
AddMultiple -
func (*InterimProcessorContainerMock) Get ¶
func (ipcm *InterimProcessorContainerMock) Get(key block.Type) (process.IntermediateTransactionHandler, error)
Get -
func (*InterimProcessorContainerMock) IsInterfaceNil ¶
func (ipcm *InterimProcessorContainerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*InterimProcessorContainerMock) Keys ¶
func (ipcm *InterimProcessorContainerMock) Keys() []block.Type
Keys -
func (*InterimProcessorContainerMock) Len ¶
func (ipcm *InterimProcessorContainerMock) Len() int
Len -
func (*InterimProcessorContainerMock) Remove ¶
func (ipcm *InterimProcessorContainerMock) Remove(_ block.Type)
Remove -
func (*InterimProcessorContainerMock) Replace ¶
func (ipcm *InterimProcessorContainerMock) Replace(_ block.Type, _ process.IntermediateTransactionHandler) error
Replace -
type IntermProcessorContainerStub ¶
type IntermProcessorContainerStub struct { GetCalled func(key block.Type) (process.IntermediateTransactionHandler, error) KeysCalled func() []block.Type }
IntermProcessorContainerStub -
func (*IntermProcessorContainerStub) Add ¶
func (ipcm *IntermProcessorContainerStub) Add(_ block.Type, _ process.IntermediateTransactionHandler) error
Add -
func (*IntermProcessorContainerStub) AddMultiple ¶
func (ipcm *IntermProcessorContainerStub) AddMultiple(_ []block.Type, _ []process.IntermediateTransactionHandler) error
AddMultiple -
func (*IntermProcessorContainerStub) Get ¶
func (ipcm *IntermProcessorContainerStub) Get(key block.Type) (process.IntermediateTransactionHandler, error)
Get -
func (*IntermProcessorContainerStub) IsInterfaceNil ¶
func (ipcm *IntermProcessorContainerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*IntermProcessorContainerStub) Keys ¶
func (ipcm *IntermProcessorContainerStub) Keys() []block.Type
Keys -
func (*IntermProcessorContainerStub) Len ¶
func (ipcm *IntermProcessorContainerStub) Len() int
Len -
func (*IntermProcessorContainerStub) Remove ¶
func (ipcm *IntermProcessorContainerStub) Remove(_ block.Type)
Remove -
func (*IntermProcessorContainerStub) Replace ¶
func (ipcm *IntermProcessorContainerStub) Replace(_ block.Type, _ process.IntermediateTransactionHandler) error
Replace -
type IntermediateTransactionHandlerMock ¶
type IntermediateTransactionHandlerMock struct { AddIntermediateTransactionsCalled func(txs []data.TransactionHandler) error GetNumOfCrossInterMbsAndTxsCalled func() (int, int) CreateAllInterMiniBlocksCalled func() []*block.MiniBlock VerifyInterMiniBlocksCalled func(body *block.Body) error SaveCurrentIntermediateTxToStorageCalled func() CreateBlockStartedCalled func() CreateMarshalledDataCalled func(txHashes [][]byte) ([][]byte, error) GetAllCurrentFinishedTxsCalled func() map[string]data.TransactionHandler RemoveProcessedResultsCalled func(key []byte) [][]byte InitProcessedResultsCalled func(key []byte) GetCreatedInShardMiniBlockCalled func() *block.MiniBlock // contains filtered or unexported fields }
IntermediateTransactionHandlerMock -
func (*IntermediateTransactionHandlerMock) AddIntermediateTransactions ¶
func (ith *IntermediateTransactionHandlerMock) AddIntermediateTransactions(txs []data.TransactionHandler) error
AddIntermediateTransactions -
func (*IntermediateTransactionHandlerMock) CreateAllInterMiniBlocks ¶
func (ith *IntermediateTransactionHandlerMock) CreateAllInterMiniBlocks() []*block.MiniBlock
CreateAllInterMiniBlocks -
func (*IntermediateTransactionHandlerMock) CreateBlockStarted ¶
func (ith *IntermediateTransactionHandlerMock) CreateBlockStarted()
CreateBlockStarted -
func (*IntermediateTransactionHandlerMock) CreateMarshalledData ¶
func (ith *IntermediateTransactionHandlerMock) CreateMarshalledData(txHashes [][]byte) ([][]byte, error)
CreateMarshalledData -
func (*IntermediateTransactionHandlerMock) GetAllCurrentFinishedTxs ¶
func (ith *IntermediateTransactionHandlerMock) GetAllCurrentFinishedTxs() map[string]data.TransactionHandler
GetAllCurrentFinishedTxs -
func (*IntermediateTransactionHandlerMock) GetCreatedInShardMiniBlock ¶
func (ith *IntermediateTransactionHandlerMock) GetCreatedInShardMiniBlock() *block.MiniBlock
GetCreatedInShardMiniBlock -
func (*IntermediateTransactionHandlerMock) GetIntermediateTransactions ¶
func (ith *IntermediateTransactionHandlerMock) GetIntermediateTransactions() []data.TransactionHandler
GetIntermediateTransactions -
func (*IntermediateTransactionHandlerMock) GetNumOfCrossInterMbsAndTxs ¶
func (ith *IntermediateTransactionHandlerMock) GetNumOfCrossInterMbsAndTxs() (int, int)
GetNumOfCrossInterMbsAndTxs -
func (*IntermediateTransactionHandlerMock) InitProcessedResults ¶
func (ith *IntermediateTransactionHandlerMock) InitProcessedResults(key []byte)
InitProcessedResults -
func (*IntermediateTransactionHandlerMock) IsInterfaceNil ¶
func (ith *IntermediateTransactionHandlerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*IntermediateTransactionHandlerMock) RemoveProcessedResults ¶
func (ith *IntermediateTransactionHandlerMock) RemoveProcessedResults(key []byte) [][]byte
RemoveProcessedResults -
func (*IntermediateTransactionHandlerMock) SaveCurrentIntermediateTxToStorage ¶
func (ith *IntermediateTransactionHandlerMock) SaveCurrentIntermediateTxToStorage()
SaveCurrentIntermediateTxToStorage -
func (*IntermediateTransactionHandlerMock) VerifyInterMiniBlocks ¶
func (ith *IntermediateTransactionHandlerMock) VerifyInterMiniBlocks(body *block.Body) error
VerifyInterMiniBlocks -
type IntermediateTransactionHandlerStub ¶
type IntermediateTransactionHandlerStub struct { AddIntermediateTransactionsCalled func(txs []data.TransactionHandler) error GetNumOfCrossInterMbsAndTxsCalled func() (int, int) CreateAllInterMiniBlocksCalled func() []*block.MiniBlock VerifyInterMiniBlocksCalled func(body *block.Body) error SaveCurrentIntermediateTxToStorageCalled func() CreateBlockStartedCalled func() CreateMarshalledDataCalled func(txHashes [][]byte) ([][]byte, error) GetAllCurrentFinishedTxsCalled func() map[string]data.TransactionHandler RemoveProcessedResultsCalled func(key []byte) [][]byte InitProcessedResultsCalled func(key []byte) // contains filtered or unexported fields }
IntermediateTransactionHandlerStub -
func (*IntermediateTransactionHandlerStub) AddIntermediateTransactions ¶
func (ith *IntermediateTransactionHandlerStub) AddIntermediateTransactions(txs []data.TransactionHandler) error
AddIntermediateTransactions -
func (*IntermediateTransactionHandlerStub) CreateAllInterMiniBlocks ¶
func (ith *IntermediateTransactionHandlerStub) CreateAllInterMiniBlocks() []*block.MiniBlock
CreateAllInterMiniBlocks -
func (*IntermediateTransactionHandlerStub) CreateBlockStarted ¶
func (ith *IntermediateTransactionHandlerStub) CreateBlockStarted()
CreateBlockStarted -
func (*IntermediateTransactionHandlerStub) CreateMarshalledData ¶
func (ith *IntermediateTransactionHandlerStub) CreateMarshalledData(txHashes [][]byte) ([][]byte, error)
CreateMarshalledData -
func (*IntermediateTransactionHandlerStub) GetAllCurrentFinishedTxs ¶
func (ith *IntermediateTransactionHandlerStub) GetAllCurrentFinishedTxs() map[string]data.TransactionHandler
GetAllCurrentFinishedTxs -
func (*IntermediateTransactionHandlerStub) GetCreatedInShardMiniBlock ¶
func (ith *IntermediateTransactionHandlerStub) GetCreatedInShardMiniBlock() *block.MiniBlock
GetCreatedInShardMiniBlock -
func (*IntermediateTransactionHandlerStub) GetIntermediateTransactions ¶
func (ith *IntermediateTransactionHandlerStub) GetIntermediateTransactions() []data.TransactionHandler
GetIntermediateTransactions -
func (*IntermediateTransactionHandlerStub) GetNumOfCrossInterMbsAndTxs ¶
func (ith *IntermediateTransactionHandlerStub) GetNumOfCrossInterMbsAndTxs() (int, int)
GetNumOfCrossInterMbsAndTxs -
func (*IntermediateTransactionHandlerStub) InitProcessedResults ¶
func (ith *IntermediateTransactionHandlerStub) InitProcessedResults(key []byte)
InitProcessedResults -
func (*IntermediateTransactionHandlerStub) IsInterfaceNil ¶
func (ith *IntermediateTransactionHandlerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*IntermediateTransactionHandlerStub) RemoveProcessedResults ¶
func (ith *IntermediateTransactionHandlerStub) RemoveProcessedResults(key []byte) [][]byte
RemoveProcessedResults -
func (*IntermediateTransactionHandlerStub) SaveCurrentIntermediateTxToStorage ¶
func (ith *IntermediateTransactionHandlerStub) SaveCurrentIntermediateTxToStorage()
SaveCurrentIntermediateTxToStorage -
func (*IntermediateTransactionHandlerStub) VerifyInterMiniBlocks ¶
func (ith *IntermediateTransactionHandlerStub) VerifyInterMiniBlocks(body *block.Body) error
VerifyInterMiniBlocks -
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 MarshalizerStub ¶
type MarshalizerStub struct { MarshalCalled func(obj interface{}) ([]byte, error) UnmarshalCalled func(obj interface{}, buff []byte) error }
MarshalizerStub -
func (*MarshalizerStub) IsInterfaceNil ¶
func (ms *MarshalizerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*MarshalizerStub) Marshal ¶
func (ms *MarshalizerStub) Marshal(obj interface{}) ([]byte, error)
Marshal -
func (*MarshalizerStub) Unmarshal ¶
func (ms *MarshalizerStub) Unmarshal(obj interface{}, buff []byte) error
Unmarshal -
type MessageHandlerStub ¶
type MessageHandlerStub struct { ConnectedPeersOnTopicCalled func(topic string) []core.PeerID SendToConnectedPeerCalled func(topic string, buff []byte, peerID core.PeerID) error }
MessageHandlerStub -
func (*MessageHandlerStub) ConnectedPeersOnTopic ¶
func (mhs *MessageHandlerStub) ConnectedPeersOnTopic(topic string) []core.PeerID
ConnectedPeersOnTopic -
func (*MessageHandlerStub) IsInterfaceNil ¶
func (mhs *MessageHandlerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*MessageHandlerStub) SendToConnectedPeer ¶
func (mhs *MessageHandlerStub) SendToConnectedPeer(topic string, buff []byte, peerID core.PeerID) error
SendToConnectedPeer -
type MessageSignVerifierMock ¶
type MessageSignVerifierMock struct { }
MessageSignVerifierMock -
func (*MessageSignVerifierMock) IsInterfaceNil ¶
func (m *MessageSignVerifierMock) IsInterfaceNil() bool
IsInterfaceNil -
type MiniBlocksProviderStub ¶
type MiniBlocksProviderStub struct { GetMiniBlocksCalled func(hashes [][]byte) ([]*block.MiniblockAndHash, [][]byte) GetMiniBlocksFromPoolCalled func(hashes [][]byte) ([]*block.MiniblockAndHash, [][]byte) GetMiniBlocksFromStorerCalled func(hashes [][]byte) ([]*block.MiniblockAndHash, [][]byte) }
MiniBlocksProviderStub -
func (*MiniBlocksProviderStub) GetMiniBlocks ¶
func (mbps *MiniBlocksProviderStub) GetMiniBlocks(hashes [][]byte) ([]*block.MiniblockAndHash, [][]byte)
GetMiniBlocks -
func (*MiniBlocksProviderStub) GetMiniBlocksFromPool ¶
func (mbps *MiniBlocksProviderStub) GetMiniBlocksFromPool(hashes [][]byte) ([]*block.MiniblockAndHash, [][]byte)
GetMiniBlocksFromPool -
func (*MiniBlocksProviderStub) GetMiniBlocksFromStorer ¶
func (mbps *MiniBlocksProviderStub) GetMiniBlocksFromStorer(hashes [][]byte) ([]*block.MiniblockAndHash, [][]byte)
GetMiniBlocksFromStorer -
func (*MiniBlocksProviderStub) IsInterfaceNil ¶
func (mbps *MiniBlocksProviderStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type NetworkConnectionWatcherStub ¶
type NetworkConnectionWatcherStub struct {
IsConnectedToTheNetworkCalled func() bool
}
NetworkConnectionWatcherStub -
func (*NetworkConnectionWatcherStub) IsConnectedToTheNetwork ¶
func (cws *NetworkConnectionWatcherStub) IsConnectedToTheNetwork() bool
IsConnectedToTheNetwork -
func (*NetworkConnectionWatcherStub) IsInterfaceNil ¶
func (cws *NetworkConnectionWatcherStub) IsInterfaceNil() bool
IsInterfaceNil -
type NodeInfoMock ¶
type NodeInfoMock struct {
// contains filtered or unexported fields
}
NodeInfoMock -
func NewNodeInfo ¶
func NewNodeInfo(address []byte, pubKey []byte, shardId uint32, initialRating uint32) *NodeInfoMock
NewNodeInfo -
func (*NodeInfoMock) GetInitialRating ¶
func (n *NodeInfoMock) GetInitialRating() uint32
GetInitialRating -
type NodesConfigProviderStub ¶
type NodesConfigProviderStub struct { MinNumberOfNodesCalled func() uint32 MinNumberOfNodesWithHysteresisCalled func() uint32 }
NodesConfigProviderStub -
func (*NodesConfigProviderStub) IsInterfaceNil ¶
func (n *NodesConfigProviderStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*NodesConfigProviderStub) MinNumberOfNodes ¶
func (n *NodesConfigProviderStub) MinNumberOfNodes() uint32
MinNumberOfNodes -
func (*NodesConfigProviderStub) MinNumberOfNodesWithHysteresis ¶
func (n *NodesConfigProviderStub) MinNumberOfNodesWithHysteresis() uint32
MinNumberOfNodesWithHysteresis -
type NodesCoordinatorStub ¶
type NodesCoordinatorStub struct {
GetValidatorWithPublicKeyCalled func(publicKey []byte) (validator nodesCoordinator.Validator, shardId uint32, err error)
}
NodesCoordinatorStub -
func (*NodesCoordinatorStub) GetValidatorWithPublicKey ¶
func (nc *NodesCoordinatorStub) GetValidatorWithPublicKey(publicKey []byte) (validator nodesCoordinator.Validator, shardId uint32, err error)
GetValidatorWithPublicKey -
func (*NodesCoordinatorStub) IsInterfaceNil ¶
func (nc *NodesCoordinatorStub) IsInterfaceNil() bool
IsInterfaceNil -
type ObjectsContainerStub ¶
type ObjectsContainerStub struct { GetCalled func(key string) (interface{}, error) AddCalled func(key string, val interface{}) error ReplaceCalled func(key string, val interface{}) error RemoveCalled func(key string) LenCalled func() int }
ObjectsContainerStub -
func (*ObjectsContainerStub) Add ¶
func (ocs *ObjectsContainerStub) Add(key string, val interface{}) error
Add -
func (*ObjectsContainerStub) Get ¶
func (ocs *ObjectsContainerStub) Get(key string) (interface{}, error)
Get -
func (*ObjectsContainerStub) Replace ¶
func (ocs *ObjectsContainerStub) Replace(key string, val interface{}) error
Replace -
type P2PAntifloodHandlerStub ¶
type P2PAntifloodHandlerStub struct { CanProcessMessageCalled func(message p2p.MessageP2P, fromConnectedPeer core.PeerID) error CanProcessMessagesOnTopicCalled func(peer core.PeerID, topic string, numMessages uint32, totalSize uint64, sequence []byte) error ApplyConsensusSizeCalled func(size int) SetDebuggerCalled func(debugger process.AntifloodDebugger) error BlacklistPeerCalled func(peer core.PeerID, reason string, duration time.Duration) IsOriginatorEligibleForTopicCalled func(pid core.PeerID, topic string) error }
P2PAntifloodHandlerStub -
func (*P2PAntifloodHandlerStub) ApplyConsensusSize ¶
func (p2pahs *P2PAntifloodHandlerStub) ApplyConsensusSize(size int)
ApplyConsensusSize -
func (*P2PAntifloodHandlerStub) BlacklistPeer ¶
func (p2pahs *P2PAntifloodHandlerStub) BlacklistPeer(peer core.PeerID, reason string, duration time.Duration)
BlacklistPeer -
func (*P2PAntifloodHandlerStub) CanProcessMessage ¶
func (p2pahs *P2PAntifloodHandlerStub) CanProcessMessage(message p2p.MessageP2P, fromConnectedPeer core.PeerID) error
CanProcessMessage -
func (*P2PAntifloodHandlerStub) CanProcessMessagesOnTopic ¶
func (p2pahs *P2PAntifloodHandlerStub) CanProcessMessagesOnTopic(peer core.PeerID, topic string, numMessages uint32, totalSize uint64, sequence []byte) error
CanProcessMessagesOnTopic -
func (*P2PAntifloodHandlerStub) Close ¶
func (p2pahs *P2PAntifloodHandlerStub) Close() error
Close -
func (*P2PAntifloodHandlerStub) IsInterfaceNil ¶
func (p2pahs *P2PAntifloodHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*P2PAntifloodHandlerStub) IsOriginatorEligibleForTopic ¶
func (p2pahs *P2PAntifloodHandlerStub) IsOriginatorEligibleForTopic(pid core.PeerID, topic string) error
IsOriginatorEligibleForTopic -
func (*P2PAntifloodHandlerStub) SetDebugger ¶
func (p2pahs *P2PAntifloodHandlerStub) SetDebugger(debugger process.AntifloodDebugger) error
SetDebugger -
type PauseHandlerStub ¶
PauseHandlerStub -
func (*PauseHandlerStub) IsInterfaceNil ¶
func (p *PauseHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*PauseHandlerStub) IsPaused ¶
func (p *PauseHandlerStub) IsPaused(token []byte) bool
IsPaused -
type PayableHandlerStub ¶
type PayableHandlerStub struct {
IsPayableCalled func(sndAddress []byte, recvAdress []byte) (bool, error)
}
PayableHandlerStub -
func (*PayableHandlerStub) IsInterfaceNil ¶
func (p *PayableHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
type PeerBlackListHandlerStub ¶
type PeerBlackListHandlerStub struct { UpsertCalled func(pid core.PeerID, span time.Duration) error HasCalled func(pid core.PeerID) bool SweepCalled func() }
PeerBlackListHandlerStub -
func (*PeerBlackListHandlerStub) Has ¶
func (pblhs *PeerBlackListHandlerStub) Has(pid core.PeerID) bool
Has -
func (*PeerBlackListHandlerStub) IsInterfaceNil ¶
func (pblhs *PeerBlackListHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
type PeerChangesHandler ¶
type PeerChangesHandler struct { PeerChangesCalled func() []block.PeerData VerifyPeerChangesCalled func(peerChanges []block.PeerData) error }
PeerChangesHandler -
func (*PeerChangesHandler) IsInterfaceNil ¶
func (p *PeerChangesHandler) IsInterfaceNil() bool
IsInterfaceNil -
func (*PeerChangesHandler) PeerChanges ¶
func (p *PeerChangesHandler) PeerChanges() []block.PeerData
PeerChanges -
func (*PeerChangesHandler) VerifyPeerChanges ¶
func (p *PeerChangesHandler) VerifyPeerChanges(peerChanges []block.PeerData) error
VerifyPeerChanges -
type PeerShardMapperStub ¶
type PeerShardMapperStub struct { GetLastKnownPeerIDCalled func(pk []byte) (core.PeerID, bool) GetPeerInfoCalled func(pid core.PeerID) core.P2PPeerInfo UpdatePeerIdPublicKeyCalled func(pid core.PeerID, pk []byte) UpdatePublicKeyShardIdCalled func(pk []byte, shardId uint32) PutPeerIdShardIdCalled func(pid core.PeerID, shardId uint32) UpdatePeerIDPublicKeyPairCalled func(pid core.PeerID, pk []byte) PutPeerIdSubTypeCalled func(pid core.PeerID, peerSubType core.P2PPeerSubType) }
PeerShardMapperStub -
func (*PeerShardMapperStub) GetLastKnownPeerID ¶
func (psms *PeerShardMapperStub) GetLastKnownPeerID(pk []byte) (core.PeerID, bool)
GetLastKnownPeerID -
func (*PeerShardMapperStub) GetPeerInfo ¶
func (psms *PeerShardMapperStub) GetPeerInfo(pid core.PeerID) core.P2PPeerInfo
GetPeerInfo -
func (*PeerShardMapperStub) IsInterfaceNil ¶
func (psms *PeerShardMapperStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*PeerShardMapperStub) PutPeerIdShardId ¶
func (psms *PeerShardMapperStub) PutPeerIdShardId(pid core.PeerID, shardId uint32)
PutPeerIdShardId -
func (*PeerShardMapperStub) PutPeerIdSubType ¶
func (psms *PeerShardMapperStub) PutPeerIdSubType(pid core.PeerID, peerSubType core.P2PPeerSubType)
PutPeerIdSubType -
func (*PeerShardMapperStub) UpdatePeerIDPublicKeyPair ¶
func (psms *PeerShardMapperStub) UpdatePeerIDPublicKeyPair(pid core.PeerID, pk []byte)
UpdatePeerIDPublicKeyPair -
func (*PeerShardMapperStub) UpdatePeerIdPublicKey ¶
func (psms *PeerShardMapperStub) UpdatePeerIdPublicKey(pid core.PeerID, pk []byte)
UpdatePeerIdPublicKey -
func (*PeerShardMapperStub) UpdatePublicKeyShardId ¶
func (psms *PeerShardMapperStub) UpdatePublicKeyShardId(pk []byte, shardId uint32)
UpdatePublicKeyShardId -
type PeerShardResolverStub ¶
type PeerShardResolverStub struct {
GetPeerInfoCalled func(pid core.PeerID) core.P2PPeerInfo
}
PeerShardResolverStub -
func (*PeerShardResolverStub) GetPeerInfo ¶
func (psrs *PeerShardResolverStub) GetPeerInfo(pid core.PeerID) core.P2PPeerInfo
GetPeerInfo -
func (*PeerShardResolverStub) IsInterfaceNil ¶
func (psrs *PeerShardResolverStub) IsInterfaceNil() bool
IsInterfaceNil -
type PeerSignatureHandlerStub ¶
type PeerSignatureHandlerStub struct { VerifyPeerSignatureCalled func(pk []byte, pid core.PeerID, signature []byte) error GetPeerSignatureCalled func(key crypto.PrivateKey, pid []byte) ([]byte, error) }
PeerSignatureHandlerStub -
func (*PeerSignatureHandlerStub) GetPeerSignature ¶
func (pshs *PeerSignatureHandlerStub) GetPeerSignature(key crypto.PrivateKey, pid []byte) ([]byte, error)
GetPeerSignature -
func (*PeerSignatureHandlerStub) IsInterfaceNil ¶
func (pshs *PeerSignatureHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*PeerSignatureHandlerStub) VerifyPeerSignature ¶
func (pshs *PeerSignatureHandlerStub) VerifyPeerSignature(pk []byte, pid core.PeerID, signature []byte) error
VerifyPeerSignature -
type PendingMiniBlocksHandlerStub ¶
type PendingMiniBlocksHandlerStub struct { AddProcessedHeaderCalled func(handler data.HeaderHandler) error RevertHeaderCalled func(handler data.HeaderHandler) error GetPendingMiniBlocksCalled func(shardID uint32) [][]byte SetPendingMiniBlocksCalled func(shardID uint32, mbHashes [][]byte) }
PendingMiniBlocksHandlerStub -
func (*PendingMiniBlocksHandlerStub) AddProcessedHeader ¶
func (p *PendingMiniBlocksHandlerStub) AddProcessedHeader(handler data.HeaderHandler) error
AddProcessedHeader -
func (*PendingMiniBlocksHandlerStub) GetPendingMiniBlocks ¶
func (p *PendingMiniBlocksHandlerStub) GetPendingMiniBlocks(shardID uint32) [][]byte
GetPendingMiniBlocks -
func (*PendingMiniBlocksHandlerStub) IsInterfaceNil ¶
func (p *PendingMiniBlocksHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*PendingMiniBlocksHandlerStub) RevertHeader ¶
func (p *PendingMiniBlocksHandlerStub) RevertHeader(handler data.HeaderHandler) error
RevertHeader -
func (*PendingMiniBlocksHandlerStub) SetPendingMiniBlocks ¶
func (p *PendingMiniBlocksHandlerStub) SetPendingMiniBlocks(shardID uint32, mbHashes [][]byte)
SetPendingMiniBlocks -
type PreProcessorContainerMock ¶
type PreProcessorContainerMock struct { GetCalled func(key block.Type) (process.PreProcessor, error) KeysCalled func() []block.Type }
PreProcessorContainerMock -
func (*PreProcessorContainerMock) Add ¶
func (ppcm *PreProcessorContainerMock) Add(_ block.Type, _ process.PreProcessor) error
Add -
func (*PreProcessorContainerMock) AddMultiple ¶
func (ppcm *PreProcessorContainerMock) AddMultiple(_ []block.Type, _ []process.PreProcessor) error
AddMultiple -
func (*PreProcessorContainerMock) Get ¶
func (ppcm *PreProcessorContainerMock) Get(key block.Type) (process.PreProcessor, error)
Get -
func (*PreProcessorContainerMock) IsInterfaceNil ¶
func (ppcm *PreProcessorContainerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*PreProcessorContainerMock) Keys ¶
func (ppcm *PreProcessorContainerMock) Keys() []block.Type
Keys -
func (*PreProcessorContainerMock) Remove ¶
func (ppcm *PreProcessorContainerMock) Remove(_ block.Type)
Remove -
func (*PreProcessorContainerMock) Replace ¶
func (ppcm *PreProcessorContainerMock) Replace(_ block.Type, _ process.PreProcessor) error
Replace -
type PreProcessorMock ¶
type PreProcessorMock struct { CreateBlockStartedCalled func() IsDataPreparedCalled func(requestedTxs int, haveTime func() time.Duration) error RemoveBlockDataFromPoolsCalled func(body *block.Body, miniBlockPool storage.Cacher) error RemoveTxsFromPoolsCalled func(body *block.Body) error RestoreBlockDataIntoPoolsCalled func(body *block.Body, miniBlockPool storage.Cacher) (int, error) SaveTxsToStorageCalled func(body *block.Body) error ProcessBlockTransactionsCalled func(header data.HeaderHandler, body *block.Body, haveTime func() bool) error RequestBlockTransactionsCalled func(body *block.Body) int CreateMarshalledDataCalled func(txHashes [][]byte) ([][]byte, error) RequestTransactionsForMiniBlockCalled func(miniBlock *block.MiniBlock) int ProcessMiniBlockCalled func(miniBlock *block.MiniBlock, haveTime func() bool, haveAdditionalTime func() bool, scheduledMode bool, partialMbExecutionMode bool, indexOfLastTxProcessed int, preProcessorExecutionInfoHandler process.PreProcessorExecutionInfoHandler) ([][]byte, int, bool, error) CreateAndProcessMiniBlocksCalled func(haveTime func() bool) (block.MiniBlockSlice, error) GetAllCurrentUsedTxsCalled func() map[string]data.TransactionHandler AddTxsFromMiniBlocksCalled func(miniBlocks block.MiniBlockSlice) AddTransactionsCalled func(txHandlers []data.TransactionHandler) }
PreProcessorMock -
func (*PreProcessorMock) AddTransactions ¶
func (ppm *PreProcessorMock) AddTransactions(txHandlers []data.TransactionHandler)
AddTransactions -
func (*PreProcessorMock) AddTxsFromMiniBlocks ¶
func (ppm *PreProcessorMock) AddTxsFromMiniBlocks(miniBlocks block.MiniBlockSlice)
AddTxsFromMiniBlocks -
func (*PreProcessorMock) CreateAndProcessMiniBlocks ¶
func (ppm *PreProcessorMock) CreateAndProcessMiniBlocks(haveTime func() bool, _ []byte) (block.MiniBlockSlice, error)
CreateAndProcessMiniBlocks creates miniblocks from storage and processes the reward transactions added into the miniblocks as long as it has time
func (*PreProcessorMock) CreateBlockStarted ¶
func (ppm *PreProcessorMock) CreateBlockStarted()
CreateBlockStarted -
func (*PreProcessorMock) CreateMarshalledData ¶
func (ppm *PreProcessorMock) CreateMarshalledData(txHashes [][]byte) ([][]byte, error)
CreateMarshalledData -
func (*PreProcessorMock) GetAllCurrentUsedTxs ¶
func (ppm *PreProcessorMock) GetAllCurrentUsedTxs() map[string]data.TransactionHandler
GetAllCurrentUsedTxs -
func (*PreProcessorMock) IsDataPrepared ¶
func (ppm *PreProcessorMock) IsDataPrepared(requestedTxs int, haveTime func() time.Duration) error
IsDataPrepared -
func (*PreProcessorMock) IsInterfaceNil ¶
func (ppm *PreProcessorMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*PreProcessorMock) ProcessBlockTransactions ¶
func (ppm *PreProcessorMock) ProcessBlockTransactions(header data.HeaderHandler, body *block.Body, haveTime func() bool) error
ProcessBlockTransactions -
func (*PreProcessorMock) ProcessMiniBlock ¶
func (ppm *PreProcessorMock) ProcessMiniBlock( miniBlock *block.MiniBlock, haveTime func() bool, haveAdditionalTime func() bool, scheduledMode bool, partialMbExecutionMode bool, indexOfLastTxProcessed int, preProcessorExecutionInfoHandler process.PreProcessorExecutionInfoHandler, ) ([][]byte, int, bool, error)
ProcessMiniBlock -
func (*PreProcessorMock) RemoveBlockDataFromPools ¶
func (ppm *PreProcessorMock) RemoveBlockDataFromPools(body *block.Body, miniBlockPool storage.Cacher) error
RemoveBlockDataFromPools -
func (*PreProcessorMock) RemoveTxsFromPools ¶
func (ppm *PreProcessorMock) RemoveTxsFromPools(body *block.Body) error
RemoveTxsFromPools -
func (*PreProcessorMock) RequestBlockTransactions ¶
func (ppm *PreProcessorMock) RequestBlockTransactions(body *block.Body) int
RequestBlockTransactions -
func (*PreProcessorMock) RequestTransactionsForMiniBlock ¶
func (ppm *PreProcessorMock) RequestTransactionsForMiniBlock(miniBlock *block.MiniBlock) int
RequestTransactionsForMiniBlock -
func (*PreProcessorMock) RestoreBlockDataIntoPools ¶
func (ppm *PreProcessorMock) RestoreBlockDataIntoPools(body *block.Body, miniBlockPool storage.Cacher) (int, error)
RestoreBlockDataIntoPools -
func (*PreProcessorMock) SaveTxsToStorage ¶
func (ppm *PreProcessorMock) SaveTxsToStorage(body *block.Body) error
SaveTxsToStorage -
type ProtobufMarshalizerMock ¶
type ProtobufMarshalizerMock struct { }
ProtobufMarshalizerMock implements marshaling with protobuf
func (*ProtobufMarshalizerMock) IsInterfaceNil ¶
func (x *ProtobufMarshalizerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ProtobufMarshalizerMock) Marshal ¶
func (x *ProtobufMarshalizerMock) Marshal(obj interface{}) ([]byte, error)
Marshal does the actual serialization of an object through protobuf
func (*ProtobufMarshalizerMock) Unmarshal ¶
func (x *ProtobufMarshalizerMock) Unmarshal(obj interface{}, buff []byte) error
Unmarshal does the actual deserialization of an object through protobuf
type QuotaStatusHandlerStub ¶
type QuotaStatusHandlerStub struct { ResetStatisticsCalled func() AddQuotaCalled func(pid core.PeerID, numReceivedMessages uint32, sizeReceivedMessages uint64, numProcessedMessages uint32, sizeProcessedMessages uint64) }
QuotaStatusHandlerStub -
func (*QuotaStatusHandlerStub) AddQuota ¶
func (qshs *QuotaStatusHandlerStub) AddQuota( pid core.PeerID, numReceived uint32, sizeReceived uint64, numProcessed uint32, sizeProcessed uint64, )
AddQuota -
func (*QuotaStatusHandlerStub) IsInterfaceNil ¶
func (qshs *QuotaStatusHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*QuotaStatusHandlerStub) ResetStatistics ¶
func (qshs *QuotaStatusHandlerStub) ResetStatistics()
ResetStatistics -
type RaterMock ¶
type RaterMock struct { StartRating uint32 MinRating uint32 MaxRating uint32 Chance uint32 IncreaseProposer int32 DecreaseProposer int32 IncreaseValidator int32 DecreaseValidator int32 MetaIncreaseProposer int32 MetaDecreaseProposer int32 MetaIncreaseValidator int32 MetaDecreaseValidator int32 GetRatingCalled func(string) uint32 GetStartRatingCalled func() uint32 GetSignedBlocksThresholdCalled func() float32 ComputeIncreaseProposerCalled func(shardId uint32, rating uint32) uint32 ComputeDecreaseProposerCalled func(shardId uint32, rating uint32, consecutiveMissedBlocks uint32) uint32 RevertIncreaseProposerCalled func(shardId uint32, rating uint32, nrReverts uint32) uint32 ComputeIncreaseValidatorCalled func(shardId uint32, rating uint32) uint32 ComputeDecreaseValidatorCalled func(shardId uint32, rating uint32) uint32 GetChancesCalled func(val uint32) uint32 }
RaterMock -
func (*RaterMock) ComputeDecreaseProposer ¶
func (rm *RaterMock) ComputeDecreaseProposer(shardId uint32, currentRating uint32, consecutiveMisses uint32) uint32
ComputeDecreaseProposer -
func (*RaterMock) ComputeDecreaseValidator ¶
ComputeDecreaseValidator -
func (*RaterMock) ComputeIncreaseProposer ¶
ComputeIncreaseProposer -
func (*RaterMock) ComputeIncreaseValidator ¶
ComputeIncreaseValidator -
func (*RaterMock) GetSignedBlocksThreshold ¶
GetSignedBlocksThreshold -
type RatingReaderMock ¶
RatingReaderMock -
func (*RatingReaderMock) GetRating ¶
func (rrm *RatingReaderMock) GetRating(pk string) uint32
GetRating -
func (*RatingReaderMock) IsInterfaceNil ¶
func (rrm *RatingReaderMock) IsInterfaceNil() bool
IsInterfaceNil -
type RatingStepMock ¶
type RatingStepMock struct { ProposerIncreaseRatingStepProperty int32 ProposerDecreaseRatingStepProperty int32 ValidatorIncreaseRatingStepProperty int32 ValidatorDecreaseRatingStepProperty int32 ConsecutiveMissedBlocksPenaltyProperty float32 }
RatingStepMock will store information about ratingsComputation specific for a shard or metachain
func (*RatingStepMock) ConsecutiveMissedBlocksPenalty ¶
func (rd *RatingStepMock) ConsecutiveMissedBlocksPenalty() float32
ConsecutiveMissedBlocksPenalty will return the penalty increase for consecutive block misses
func (*RatingStepMock) ProposerDecreaseRatingStep ¶
func (rd *RatingStepMock) ProposerDecreaseRatingStep() int32
ProposerDecreaseRatingStep will return the rating step decrease for proposer
func (*RatingStepMock) ProposerIncreaseRatingStep ¶
func (rd *RatingStepMock) ProposerIncreaseRatingStep() int32
ProposerIncreaseRatingStep will return the rating step increase for validator
func (*RatingStepMock) ValidatorDecreaseRatingStep ¶
func (rd *RatingStepMock) ValidatorDecreaseRatingStep() int32
ValidatorDecreaseRatingStep will return the rating step decrease for validator
func (*RatingStepMock) ValidatorIncreaseRatingStep ¶
func (rd *RatingStepMock) ValidatorIncreaseRatingStep() int32
ValidatorIncreaseRatingStep will return the rating step increase for validator
type RatingsInfoMock ¶
type RatingsInfoMock struct { StartRatingProperty uint32 MaxRatingProperty uint32 MinRatingProperty uint32 SignedBlocksThresholdProperty float32 MetaRatingsStepDataProperty process.RatingsStepHandler ShardRatingsStepDataProperty process.RatingsStepHandler SelectionChancesProperty []process.SelectionChance }
RatingsInfoMock -
func (*RatingsInfoMock) IsInterfaceNil ¶
func (rd *RatingsInfoMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*RatingsInfoMock) MetaChainRatingsStepHandler ¶
func (rd *RatingsInfoMock) MetaChainRatingsStepHandler() process.RatingsStepHandler
MetaChainRatingsStepHandler -
func (*RatingsInfoMock) SelectionChances ¶
func (rd *RatingsInfoMock) SelectionChances() []process.SelectionChance
SelectionChances -
func (*RatingsInfoMock) ShardChainRatingsStepHandler ¶
func (rd *RatingsInfoMock) ShardChainRatingsStepHandler() process.RatingsStepHandler
ShardChainRatingsStepHandler -
func (*RatingsInfoMock) SignedBlocksThreshold ¶
func (rd *RatingsInfoMock) SignedBlocksThreshold() float32
SignedBlocksThreshold -
type RequestedItemsHandlerStub ¶
type RequestedItemsHandlerStub struct { AddCalled func(key string) error HasCalled func(key string) bool SweepCalled func() }
RequestedItemsHandlerStub -
func (*RequestedItemsHandlerStub) Add ¶
func (rihs *RequestedItemsHandlerStub) Add(key string) error
Add -
func (*RequestedItemsHandlerStub) Has ¶
func (rihs *RequestedItemsHandlerStub) Has(key string) bool
Has -
func (*RequestedItemsHandlerStub) IsInterfaceNil ¶
func (rihs *RequestedItemsHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
type ResolverStub ¶
type ResolverStub struct {
ProcessReceivedMessageCalled func(message p2p.MessageP2P) error
}
ResolverStub -
func (*ResolverStub) IsInterfaceNil ¶
func (rs *ResolverStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ResolverStub) ProcessReceivedMessage ¶
func (rs *ResolverStub) ProcessReceivedMessage(message p2p.MessageP2P, _ core.PeerID) error
ProcessReceivedMessage -
type ResolversContainerStub ¶
type ResolversContainerStub struct { GetCalled func(key string) (dataRetriever.Resolver, error) AddCalled func(key string, val dataRetriever.Resolver) error ReplaceCalled func(key string, val dataRetriever.Resolver) error RemoveCalled func(key string) LenCalled func() int }
ResolversContainerStub -
func (*ResolversContainerStub) Add ¶
func (rcs *ResolversContainerStub) Add(key string, val dataRetriever.Resolver) error
Add -
func (*ResolversContainerStub) AddMultiple ¶
func (rcs *ResolversContainerStub) AddMultiple(_ []string, _ []dataRetriever.Resolver) error
AddMultiple -
func (*ResolversContainerStub) Get ¶
func (rcs *ResolversContainerStub) Get(key string) (dataRetriever.Resolver, error)
Get -
func (*ResolversContainerStub) IsInterfaceNil ¶
func (rcs *ResolversContainerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ResolversContainerStub) Remove ¶
func (rcs *ResolversContainerStub) Remove(key string)
Remove -
func (*ResolversContainerStub) Replace ¶
func (rcs *ResolversContainerStub) Replace(key string, val dataRetriever.Resolver) error
Replace -
type RewardsHandlerMock ¶
type RewardsHandlerMock struct { MaxInflationRateCalled func() float64 MinInflationRateCalled func() float64 LeaderPercentageCalled func() float64 ProtocolSustainabilityPercentageCalled func() float64 ProtocolSustainabilityAddressCalled func() string RewardsTopUpGradientPointCalled func() *big.Int RewardsTopUpFactorCalled func() float64 }
RewardsHandlerMock -
func (*RewardsHandlerMock) IsInterfaceNil ¶
func (rhm *RewardsHandlerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*RewardsHandlerMock) LeaderPercentage ¶
func (rhm *RewardsHandlerMock) LeaderPercentage() float64
LeaderPercentage -
func (*RewardsHandlerMock) MaxInflationRate ¶
func (rhm *RewardsHandlerMock) MaxInflationRate(uint32) float64
MaxInflationRate -
func (*RewardsHandlerMock) MinInflationRate ¶
func (rhm *RewardsHandlerMock) MinInflationRate() float64
MinInflationRate -
func (*RewardsHandlerMock) ProtocolSustainabilityAddress ¶
func (rhm *RewardsHandlerMock) ProtocolSustainabilityAddress() string
ProtocolSustainabilityAddress will return the protocol sustainability address
func (*RewardsHandlerMock) ProtocolSustainabilityPercentage ¶
func (rhm *RewardsHandlerMock) ProtocolSustainabilityPercentage() float64
ProtocolSustainabilityPercentage will return the protocol sustainability percentage value
func (*RewardsHandlerMock) RewardsTopUpFactor ¶
func (rhm *RewardsHandlerMock) RewardsTopUpFactor() float64
RewardsTopUpFactor -
func (*RewardsHandlerMock) RewardsTopUpGradientPoint ¶
func (rhm *RewardsHandlerMock) RewardsTopUpGradientPoint() *big.Int
RewardsTopUpGradientPoint -
type RoundHandlerMock ¶
type RoundHandlerMock struct { RoundIndex int64 RoundTimeStamp time.Time RoundTimeDuration time.Duration BeforeGenesisCalled func() bool }
RoundHandlerMock -
func (*RoundHandlerMock) BeforeGenesis ¶
func (rndm *RoundHandlerMock) BeforeGenesis() bool
BeforeGenesis -
func (*RoundHandlerMock) IsInterfaceNil ¶
func (rndm *RoundHandlerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*RoundHandlerMock) RemainingTime ¶
RemainingTime -
func (*RoundHandlerMock) TimeDuration ¶
func (rndm *RoundHandlerMock) TimeDuration() time.Duration
TimeDuration -
func (*RoundHandlerMock) TimeStamp ¶
func (rndm *RoundHandlerMock) TimeStamp() time.Time
TimeStamp -
func (*RoundHandlerMock) UpdateRound ¶
func (rndm *RoundHandlerMock) UpdateRound(genesisRoundTimeStamp time.Time, timeStamp time.Time)
UpdateRound -
type RoundStub ¶
type RoundStub struct { IndexCalled func() int64 TimeDurationCalled func() time.Duration TimeStampCalled func() time.Time UpdateRoundCalled func(time.Time, time.Time) RemainingTimeCalled func(time.Time, time.Duration) time.Duration }
RoundStub -
func (*RoundStub) RemainingTime ¶
RemainingTime -
type SCToProtocolStub ¶
SCToProtocolStub -
func (*SCToProtocolStub) IsInterfaceNil ¶
func (s *SCToProtocolStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*SCToProtocolStub) UpdateProtocol ¶
func (s *SCToProtocolStub) UpdateProtocol(body *block.Body, nonce uint64) error
UpdateProtocol -
type ScQueryStub ¶
type ScQueryStub struct { ExecuteQueryCalled func(query *process.SCQuery) (*vmcommon.VMOutput, common.BlockInfo, error) ComputeScCallGasLimitHandler func(tx *transaction.Transaction) (uint64, error) CloseCalled func() error }
ScQueryStub -
func (*ScQueryStub) ComputeScCallGasLimit ¶
func (s *ScQueryStub) ComputeScCallGasLimit(tx *transaction.Transaction) (uint64, error)
ComputeScCallGasLimit -
func (*ScQueryStub) ExecuteQuery ¶
func (s *ScQueryStub) ExecuteQuery(query *process.SCQuery) (*vmcommon.VMOutput, common.BlockInfo, error)
ExecuteQuery -
type ShardCoordinatorStub ¶
type ShardCoordinatorStub struct { NumberOfShardsCalled func() uint32 ComputeIdCalled func(address []byte) uint32 SelfIdCalled func() uint32 SameShardCalled func(firstAddress, secondAddress []byte) bool CommunicationIdentifierCalled func(destShardID uint32) string }
ShardCoordinatorStub -
func (*ShardCoordinatorStub) CommunicationIdentifier ¶
func (coordinator *ShardCoordinatorStub) CommunicationIdentifier(destShardID uint32) string
CommunicationIdentifier -
func (*ShardCoordinatorStub) ComputeId ¶
func (coordinator *ShardCoordinatorStub) ComputeId(address []byte) uint32
ComputeId -
func (*ShardCoordinatorStub) IsInterfaceNil ¶
func (coordinator *ShardCoordinatorStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ShardCoordinatorStub) NumberOfShards ¶
func (coordinator *ShardCoordinatorStub) NumberOfShards() uint32
NumberOfShards -
func (*ShardCoordinatorStub) SameShard ¶
func (coordinator *ShardCoordinatorStub) SameShard(firstAddress, secondAddress []byte) bool
SameShard -
func (*ShardCoordinatorStub) SelfId ¶
func (coordinator *ShardCoordinatorStub) SelfId() uint32
SelfId -
type ShardIdHasMapMock ¶
type ShardIdHasMapMock struct { LoadCalled func(shardId uint32) ([]byte, bool) StoreCalled func(shardId uint32, hash []byte) RangeCalled func(f func(shardId uint32, hash []byte) bool) DeleteCalled func(shardId uint32) }
ShardIdHasMapMock -
func (*ShardIdHasMapMock) IsInterfaceNil ¶
func (sihsm *ShardIdHasMapMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ShardIdHasMapMock) Load ¶
func (sihsm *ShardIdHasMapMock) Load(shardId uint32) ([]byte, bool)
Load -
func (*ShardIdHasMapMock) Range ¶
func (sihsm *ShardIdHasMapMock) Range(f func(shardId uint32, hash []byte) bool)
Range -
func (*ShardIdHasMapMock) Store ¶
func (sihsm *ShardIdHasMapMock) Store(shardId uint32, hash []byte)
Store -
type SignaturesHandlerStub ¶
type SignaturesHandlerStub struct {
VerifyCalled func(payload []byte, pid core.PeerID, signature []byte) error
}
SignaturesHandlerStub -
func (*SignaturesHandlerStub) IsInterfaceNil ¶
func (s *SignaturesHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
type SignerMock ¶
type SignerMock struct { SignStub func(private crypto.PrivateKey, msg []byte) ([]byte, error) VerifyStub func(public crypto.PublicKey, msg []byte, sig []byte) error }
SignerMock -
func (*SignerMock) IsInterfaceNil ¶
func (s *SignerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type SingleSignKeyGenMock ¶
type SingleSignKeyGenMock struct { PublicKeyFromByteArrayCalled func(b []byte) (crypto.PublicKey, error) SuiteCalled func() crypto.Suite }
SingleSignKeyGenMock -
func (*SingleSignKeyGenMock) CheckPublicKeyValid ¶
func (sskgm *SingleSignKeyGenMock) CheckPublicKeyValid(_ []byte) error
CheckPublicKeyValid -
func (*SingleSignKeyGenMock) GeneratePair ¶
func (sskgm *SingleSignKeyGenMock) GeneratePair() (crypto.PrivateKey, crypto.PublicKey)
GeneratePair -
func (*SingleSignKeyGenMock) IsInterfaceNil ¶
func (sskgm *SingleSignKeyGenMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*SingleSignKeyGenMock) PrivateKeyFromByteArray ¶
func (sskgm *SingleSignKeyGenMock) PrivateKeyFromByteArray(_ []byte) (crypto.PrivateKey, error)
PrivateKeyFromByteArray -
func (*SingleSignKeyGenMock) PublicKeyFromByteArray ¶
func (sskgm *SingleSignKeyGenMock) PublicKeyFromByteArray(b []byte) (crypto.PublicKey, error)
PublicKeyFromByteArray -
func (*SingleSignKeyGenMock) Suite ¶
func (sskgm *SingleSignKeyGenMock) Suite() crypto.Suite
Suite -
type SingleSignPublicKey ¶
type SingleSignPublicKey struct { SuiteCalled func() crypto.Suite PointCalled func() crypto.Point }
SingleSignPublicKey -
func (*SingleSignPublicKey) IsInterfaceNil ¶
func (sspk *SingleSignPublicKey) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*SingleSignPublicKey) ToByteArray ¶
func (sspk *SingleSignPublicKey) ToByteArray() ([]byte, error)
ToByteArray -
type StatusComponentsMock ¶
type StatusComponentsMock struct {
Outport outport.OutportHandler
}
StatusComponentsMock -
func (*StatusComponentsMock) IsInterfaceNil ¶
func (scm *StatusComponentsMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*StatusComponentsMock) OutportHandler ¶
func (scm *StatusComponentsMock) OutportHandler() outport.OutportHandler
OutportHandler -
type StorageBootstrapperMock ¶
type StorageBootstrapperMock struct {
LoadFromStorageCalled func() error
}
StorageBootstrapperMock -
func (*StorageBootstrapperMock) GetHighestBlockNonce ¶
func (sbm *StorageBootstrapperMock) GetHighestBlockNonce() uint64
GetHighestBlockNonce -
func (*StorageBootstrapperMock) IsInterfaceNil ¶
func (sbm *StorageBootstrapperMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*StorageBootstrapperMock) LoadFromStorage ¶
func (sbm *StorageBootstrapperMock) LoadFromStorage() error
LoadFromStorage -
type StorerMock ¶
type StorerMock struct {
// contains filtered or unexported fields
}
StorerMock -
func (*StorerMock) GetBulkFromEpoch ¶
func (sm *StorerMock) GetBulkFromEpoch(_ [][]byte, _ uint32) ([]data.KeyValuePair, error)
GetBulkFromEpoch -
func (*StorerMock) GetFromEpoch ¶
func (sm *StorerMock) GetFromEpoch(key []byte, _ uint32) ([]byte, error)
GetFromEpoch -
func (*StorerMock) GetOldestEpoch ¶
func (sm *StorerMock) GetOldestEpoch() (uint32, error)
GetOldestEpoch -
func (*StorerMock) IsInterfaceNil ¶
func (sm *StorerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*StorerMock) PutInEpoch ¶
func (sm *StorerMock) PutInEpoch(key, data []byte, _ uint32) error
PutInEpoch -
func (*StorerMock) RangeKeys ¶
func (sm *StorerMock) RangeKeys(_ func(key []byte, val []byte) bool)
RangeKeys -
func (*StorerMock) RemoveFromCurrentEpoch ¶
func (sm *StorerMock) RemoveFromCurrentEpoch(key []byte) error
RemoveFromCurrentEpoch -
func (*StorerMock) SearchFirst ¶
func (sm *StorerMock) SearchFirst(_ []byte) ([]byte, error)
SearchFirst -
type SyncStarterStub ¶
type SyncStarterStub struct {
SyncBlockCalled func() error
}
SyncStarterStub -
type SyncTimerMock ¶
type SyncTimerMock struct { ClockOffsetCalled func() time.Duration CurrentTimeCalled func() time.Time }
SyncTimerMock mocks the implementation for a SyncTimer
func (*SyncTimerMock) ClockOffset ¶
func (stm *SyncTimerMock) ClockOffset() time.Duration
ClockOffset method gets the current time offset
func (*SyncTimerMock) CurrentTime ¶
func (stm *SyncTimerMock) CurrentTime() time.Time
CurrentTime method gets the current time on which is added the current offset
func (*SyncTimerMock) FormattedCurrentTime ¶
func (stm *SyncTimerMock) FormattedCurrentTime() string
FormattedCurrentTime method gets the formatted current time on which is added a given offset
func (*SyncTimerMock) IsInterfaceNil ¶
func (stm *SyncTimerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*SyncTimerMock) StartSyncingTime ¶
func (stm *SyncTimerMock) StartSyncingTime()
StartSyncingTime method does the time synchronization at every syncPeriod time elapsed. This should be started as a go routine
type TopicAntiFloodStub ¶
type TopicAntiFloodStub struct { IncreaseLoadCalled func(pid core.PeerID, topic string, numMessages uint32) error ResetForTopicCalled func(topic string) SetMaxMessagesForTopicCalled func(topic string, num uint32) }
TopicAntiFloodStub -
func (*TopicAntiFloodStub) IncreaseLoad ¶
IncreaseLoad -
func (*TopicAntiFloodStub) IsInterfaceNil ¶
func (t *TopicAntiFloodStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*TopicAntiFloodStub) ResetForNotRegisteredTopics ¶
func (t *TopicAntiFloodStub) ResetForNotRegisteredTopics()
ResetForNotRegisteredTopics -
func (*TopicAntiFloodStub) ResetForTopic ¶
func (t *TopicAntiFloodStub) ResetForTopic(topic string)
ResetForTopic -
func (*TopicAntiFloodStub) SetMaxMessagesForTopic ¶
func (t *TopicAntiFloodStub) SetMaxMessagesForTopic(topic string, num uint32)
SetMaxMessagesForTopic -
type TopicHandlerStub ¶
type TopicHandlerStub struct { HasTopicCalled func(name string) bool CreateTopicCalled func(name string, createChannelForTopic bool) error RegisterMessageProcessorCalled func(topic string, identifier string, handler p2p.MessageProcessor) error IDCalled func() core.PeerID }
TopicHandlerStub -
func (*TopicHandlerStub) CreateTopic ¶
func (stub *TopicHandlerStub) CreateTopic(name string, createChannelForTopic bool) error
CreateTopic -
func (*TopicHandlerStub) HasTopic ¶
func (stub *TopicHandlerStub) HasTopic(name string) bool
HasTopic -
func (*TopicHandlerStub) IsInterfaceNil ¶
func (stub *TopicHandlerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*TopicHandlerStub) RegisterMessageProcessor ¶
func (stub *TopicHandlerStub) RegisterMessageProcessor(topic string, identifier string, handler p2p.MessageProcessor) error
RegisterMessageProcessor -
type TransactionInterceptorMock ¶
type TransactionInterceptorMock struct { IsChecked bool IsVerified bool RcvShardVal uint32 SndShardVal uint32 IsAddressedToOtherShardsVal bool Tx *transaction.Transaction // contains filtered or unexported fields }
TransactionInterceptorMock -
func (*TransactionInterceptorMock) Check ¶
func (tim *TransactionInterceptorMock) Check() bool
Check -
func (*TransactionInterceptorMock) GetTransaction ¶
func (tim *TransactionInterceptorMock) GetTransaction() *transaction.Transaction
GetTransaction -
func (*TransactionInterceptorMock) Hash ¶
func (tim *TransactionInterceptorMock) Hash() []byte
Hash -
func (*TransactionInterceptorMock) IsAddressedToOtherShards ¶
func (tim *TransactionInterceptorMock) IsAddressedToOtherShards() bool
IsAddressedToOtherShards -
func (*TransactionInterceptorMock) IsInterfaceNil ¶
func (tim *TransactionInterceptorMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*TransactionInterceptorMock) PubkeyConverter ¶
func (tim *TransactionInterceptorMock) PubkeyConverter() core.PubkeyConverter
PubkeyConverter -
func (*TransactionInterceptorMock) RcvShard ¶
func (tim *TransactionInterceptorMock) RcvShard() uint32
RcvShard -
func (*TransactionInterceptorMock) SetHash ¶
func (tim *TransactionInterceptorMock) SetHash(hash []byte)
SetHash -
func (*TransactionInterceptorMock) SetPubkeyConverter ¶
func (tim *TransactionInterceptorMock) SetPubkeyConverter(converter core.PubkeyConverter)
SetPubkeyConverter -
func (*TransactionInterceptorMock) SndShard ¶
func (tim *TransactionInterceptorMock) SndShard() uint32
SndShard -
func (*TransactionInterceptorMock) VerifySig ¶
func (tim *TransactionInterceptorMock) VerifySig() bool
VerifySig -
type TransactionPoolMock ¶
type TransactionPoolMock struct { RegisterTransactionHandlerCalled func(transactionHandler func(txHash []byte)) RemoveTransactionsFromPoolCalled func(txHashes [][]byte, destShardID uint32) MiniPoolTxStoreCalled func(shardID uint32) (c storage.Cacher) }
TransactionPoolMock -
func (*TransactionPoolMock) MiniPoolTxStore ¶
func (tpm *TransactionPoolMock) MiniPoolTxStore(shardID uint32) (c storage.Cacher)
MiniPoolTxStore -
func (*TransactionPoolMock) RegisterTransactionHandler ¶
func (tpm *TransactionPoolMock) RegisterTransactionHandler(transactionHandler func(txHash []byte))
RegisterTransactionHandler -
func (*TransactionPoolMock) RemoveTransactionsFromPool ¶
func (tpm *TransactionPoolMock) RemoveTransactionsFromPool(txHashes [][]byte, destShardID uint32)
RemoveTransactionsFromPool -
type TransactionSimulatorStub ¶
type TransactionSimulatorStub struct {
ProcessTxCalled func(tx *transaction.Transaction, currentHeader data.HeaderHandler) (*txSimData.SimulationResultsWithVMOutput, error)
}
TransactionSimulatorStub -
func (*TransactionSimulatorStub) IsInterfaceNil ¶
func (tss *TransactionSimulatorStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*TransactionSimulatorStub) ProcessTx ¶
func (tss *TransactionSimulatorStub) ProcessTx(tx *transaction.Transaction, currentHeader data.HeaderHandler) (*txSimData.SimulationResultsWithVMOutput, error)
ProcessTx -
type TxForCurrentBlockStub ¶
type TxForCurrentBlockStub struct { CleanCalled func() GetTxCalled func(txHash []byte) (data.TransactionHandler, error) AddTxCalled func(txHash []byte, tx data.TransactionHandler) }
TxForCurrentBlockStub -
func (*TxForCurrentBlockStub) AddTx ¶
func (t *TxForCurrentBlockStub) AddTx(txHash []byte, tx data.TransactionHandler)
AddTx -
func (*TxForCurrentBlockStub) GetTx ¶
func (t *TxForCurrentBlockStub) GetTx(txHash []byte) (data.TransactionHandler, error)
GetTx -
func (*TxForCurrentBlockStub) IsInterfaceNil ¶
func (t *TxForCurrentBlockStub) IsInterfaceNil() bool
IsInterfaceNil -
type TxLogsProcessorStub ¶
type TxLogsProcessorStub struct { GetLogCalled func(txHash []byte) (data.LogHandler, error) SaveLogCalled func(txHash []byte, tx data.TransactionHandler, vmLogs []*vmcommon.LogEntry) error GetAllCurrentLogsCalled func() []*data.LogData }
TxLogsProcessorStub -
func (*TxLogsProcessorStub) GetAllCurrentLogs ¶
func (txls *TxLogsProcessorStub) GetAllCurrentLogs() []*data.LogData
GetAllCurrentLogs -
func (*TxLogsProcessorStub) GetLog ¶
func (txls *TxLogsProcessorStub) GetLog(txHash []byte) (data.LogHandler, error)
GetLog -
func (*TxLogsProcessorStub) IsInterfaceNil ¶
func (txls *TxLogsProcessorStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*TxLogsProcessorStub) SaveLog ¶
func (txls *TxLogsProcessorStub) SaveLog(txHash []byte, tx data.TransactionHandler, vmLogs []*vmcommon.LogEntry) error
SaveLog -
type TxValidatorHandlerStub ¶
type TxValidatorHandlerStub struct { SenderShardIdCalled func() uint32 ReceiverShardIdCalled func() uint32 NonceCalled func() uint64 SenderAddressCalled func() []byte FeeCalled func() *big.Int }
TxValidatorHandlerStub -
func (*TxValidatorHandlerStub) ReceiverShardId ¶
func (tvhs *TxValidatorHandlerStub) ReceiverShardId() uint32
ReceiverShardId -
func (*TxValidatorHandlerStub) SenderAddress ¶
func (tvhs *TxValidatorHandlerStub) SenderAddress() []byte
SenderAddress -
func (*TxValidatorHandlerStub) SenderShardId ¶
func (tvhs *TxValidatorHandlerStub) SenderShardId() uint32
SenderShardId -
type TxValidatorStub ¶
type TxValidatorStub struct { CheckTxValidityCalled func(interceptedTx process.InterceptedTransactionHandler) error CheckTxWhiteListCalled func(data process.InterceptedData) error RejectedTxsCalled func() uint64 }
TxValidatorStub -
func (*TxValidatorStub) CheckTxValidity ¶
func (t *TxValidatorStub) CheckTxValidity(interceptedTx process.InterceptedTransactionHandler) error
CheckTxValidity -
func (*TxValidatorStub) CheckTxWhiteList ¶
func (t *TxValidatorStub) CheckTxWhiteList(data process.InterceptedData) error
CheckTxWhiteList -
func (*TxValidatorStub) IsInterfaceNil ¶
func (t *TxValidatorStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type Uint64ByteSliceConverterMock ¶
type Uint64ByteSliceConverterMock struct { ToByteSliceCalled func(uint64) []byte ToUint64Called func([]byte) (uint64, error) }
Uint64ByteSliceConverterMock converts byte slice to/from uint64
func (*Uint64ByteSliceConverterMock) IsInterfaceNil ¶
func (u *Uint64ByteSliceConverterMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*Uint64ByteSliceConverterMock) ToByteSlice ¶
func (u *Uint64ByteSliceConverterMock) ToByteSlice(p uint64) []byte
ToByteSlice is a mock implementation for Uint64ByteSliceConverter
type Uint64SyncMapCacherStub ¶
type Uint64SyncMapCacherStub struct { ClearCalled func() GetCalled func(nonce uint64) (dataRetriever.ShardIdHashMap, bool) MergeCalled func(nonce uint64, src dataRetriever.ShardIdHashMap) RemoveCalled func(nonce uint64, shardId uint32) RegisterHandlerCalled func(handler func(nonce uint64, shardId uint32, value []byte)) HasCalled func(nonce uint64, shardId uint32) bool UnRegisterHandlerCalled func(func(key []byte, value interface{})) }
Uint64SyncMapCacherStub -
func (*Uint64SyncMapCacherStub) Get ¶
func (usmcs *Uint64SyncMapCacherStub) Get(nonce uint64) (dataRetriever.ShardIdHashMap, bool)
Get -
func (*Uint64SyncMapCacherStub) Has ¶
func (usmcs *Uint64SyncMapCacherStub) Has(nonce uint64, shardId uint32) bool
Has -
func (*Uint64SyncMapCacherStub) IsInterfaceNil ¶
func (usmcs *Uint64SyncMapCacherStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*Uint64SyncMapCacherStub) Merge ¶
func (usmcs *Uint64SyncMapCacherStub) Merge(nonce uint64, src dataRetriever.ShardIdHashMap)
Merge -
func (*Uint64SyncMapCacherStub) RegisterHandler ¶
func (usmcs *Uint64SyncMapCacherStub) RegisterHandler(handler func(nonce uint64, shardId uint32, value []byte))
RegisterHandler -
func (*Uint64SyncMapCacherStub) Remove ¶
func (usmcs *Uint64SyncMapCacherStub) Remove(nonce uint64, shardId uint32)
Remove -
func (*Uint64SyncMapCacherStub) UnRegisterHandler ¶
func (usmcs *Uint64SyncMapCacherStub) UnRegisterHandler(handler func(key []byte, value interface{}))
UnRegisterHandler -
type VMContainerMock ¶
type VMContainerMock struct { GetCalled func(key []byte) (vmcommon.VMExecutionHandler, error) AddCalled func(key []byte, val vmcommon.VMExecutionHandler) error AddMultipleCalled func(keys [][]byte, preprocessors []vmcommon.VMExecutionHandler) error ReplaceCalled func(key []byte, val vmcommon.VMExecutionHandler) error RemoveCalled func(key []byte) LenCalled func() int KeysCalled func() [][]byte CloseCalled func() error }
VMContainerMock -
func (*VMContainerMock) Add ¶
func (v *VMContainerMock) Add(key []byte, val vmcommon.VMExecutionHandler) error
Add -
func (*VMContainerMock) AddMultiple ¶
func (v *VMContainerMock) AddMultiple(keys [][]byte, vms []vmcommon.VMExecutionHandler) error
AddMultiple -
func (*VMContainerMock) Get ¶
func (v *VMContainerMock) Get(key []byte) (vmcommon.VMExecutionHandler, error)
Get -
func (*VMContainerMock) IsInterfaceNil ¶
func (v *VMContainerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*VMContainerMock) Replace ¶
func (v *VMContainerMock) Replace(key []byte, val vmcommon.VMExecutionHandler) error
Replace -
type VMExecutionHandlerStub ¶
type VMExecutionHandlerStub struct { GetVersionCalled func() string RunSmartContractCreateCalled func(input *vmcommon.ContractCreateInput) (*vmcommon.VMOutput, error) RunSmartContractCallCalled func(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error) GasScheduleChangeCalled func(gasSchedule map[string]map[string]uint64) CloseCalled func() error }
VMExecutionHandlerStub -
func (*VMExecutionHandlerStub) GasScheduleChange ¶
func (vm *VMExecutionHandlerStub) GasScheduleChange(gasSchedule map[string]map[string]uint64)
GasScheduleChange -
func (*VMExecutionHandlerStub) GetVersion ¶
func (vm *VMExecutionHandlerStub) GetVersion() string
GetVersion -
func (*VMExecutionHandlerStub) IsInterfaceNil ¶
func (vm *VMExecutionHandlerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*VMExecutionHandlerStub) RunSmartContractCall ¶
func (vm *VMExecutionHandlerStub) RunSmartContractCall(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error)
RunSmartContractCall computes the result of a smart contract call and how the system must change after the execution
func (*VMExecutionHandlerStub) RunSmartContractCreate ¶
func (vm *VMExecutionHandlerStub) RunSmartContractCreate(input *vmcommon.ContractCreateInput) (*vmcommon.VMOutput, error)
RunSmartContractCreate --
type ValidatorSettingsStub ¶
type ValidatorSettingsStub struct { }
ValidatorSettingsStub -
func (*ValidatorSettingsStub) GenesisNodePrice ¶
func (v *ValidatorSettingsStub) GenesisNodePrice() *big.Int
GenesisNodePrice -
func (*ValidatorSettingsStub) IsInterfaceNil ¶
func (v *ValidatorSettingsStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*ValidatorSettingsStub) UnBondPeriod ¶
func (v *ValidatorSettingsStub) UnBondPeriod() uint64
UnBondPeriod -
type ValidityAttesterStub ¶
type ValidityAttesterStub struct { CheckBlockAgainstRoundHandlerCalled func(headerHandler data.HeaderHandler) error CheckBlockAgainstFinalCalled func(headerHandler data.HeaderHandler) error CheckBlockAgainstWhitelistCalled func(interceptedData process.InterceptedData) bool }
ValidityAttesterStub -
func (*ValidityAttesterStub) CheckBlockAgainstFinal ¶
func (vas *ValidityAttesterStub) CheckBlockAgainstFinal(headerHandler data.HeaderHandler) error
CheckBlockAgainstFinal -
func (*ValidityAttesterStub) CheckBlockAgainstRoundHandler ¶
func (vas *ValidityAttesterStub) CheckBlockAgainstRoundHandler(headerHandler data.HeaderHandler) error
CheckBlockAgainstRoundHandler -
func (*ValidityAttesterStub) CheckBlockAgainstWhitelist ¶
func (vas *ValidityAttesterStub) CheckBlockAgainstWhitelist(interceptedData process.InterceptedData) bool
CheckBlockAgainstWhitelist -
func (*ValidityAttesterStub) IsInterfaceNil ¶
func (vas *ValidityAttesterStub) IsInterfaceNil() bool
IsInterfaceNil -
Source Files ¶
- accountsDBSyncerStub.go
- antifloodDebuggerStub.go
- argumentsParserMock.go
- blockNotarizerHandlerMock.go
- blockNotifierHandlerStub.go
- blockSizeThrottlerStub.go
- blockTrackerHandlerMock.go
- blockTrackerMock.go
- bootstrapComponentsMock.go
- bootstrapStorerMock.go
- bootstrapperStub.go
- builtInFunctionStub.go
- chunkProcessorStub.go
- closerStub.go
- coordinatorStub.go
- coreComponentsMock.go
- cryptoComponentsMock.go
- currentNetworkEpochSetterStub.go
- dataComponentsMock.go
- dcdtRoleHandlerStub.go
- endOfEpochTriggerStub.go
- epochEconomicsStub.go
- epochStartDataCreatorStub.go
- epochStartNotifierStub.go
- feeAccumulatorStub.go
- finalityAttesterStub.go
- floodPreventerStub.go
- forkDetectorMock.go
- gasHandlerMock.go
- getHdrHandlerStub.go
- hasherStub.go
- headerIntegrityVerifierStub.go
- headerSigVerifierStub.go
- headersCacherStub.go
- interceptedDataFactoryStub.go
- interceptedDataVerifierMock.go
- interceptedDebugHandlerStub.go
- interceptedTrieNodeStub.go
- interceptedTxHandlerStub.go
- interceptorProcessorStub.go
- interceptorThrottlerStub.go
- interimProcessorContainerMock.go
- intermProcesorContainerStub.go
- intermProcessorStub.go
- intermediateTransactionHandlerMock.go
- marshalizerMock.go
- marshalizerStub.go
- messageHandlerStub.go
- messageSignVerifierMock.go
- miniBlocksProviderStub.go
- multipleShardsCoordinatorMock.go
- networkConnectionWatcherStub.go
- nodeInfoMock.go
- nodesConfigProviderStub.go
- nodesCoordinatorStub.go
- nonceHashConverterMock.go
- objectsContainerStub.go
- oneShardCoordinatorMock.go
- p2pAntifloodHandlerStub.go
- pauseHandlerStub.go
- payableHandlerStub.go
- peerBlackListHandlerStub.go
- peerChangesHandler.go
- peerShardMapperStub.go
- peerShardResolverStub.go
- peerSignatureHandlerStub.go
- pendingMiniBlocksHandlerStub.go
- preProcessorContainerMock.go
- preprocessorMock.go
- protobufMock.go
- quotaStatusHandlerStub.go
- raterMock.go
- ratingReaderMock.go
- ratingStepMock.go
- ratingsInfoMock.go
- requestedItemsHandlerStub.go
- resolverStub.go
- resolversContainerStub.go
- rewardsHandlerMock.go
- roundStub.go
- rounderMock.go
- scQueryStub.go
- scToProtocolHandlerMock.go
- shardCoordinatorStub.go
- shardIdHashMapMock.go
- signaturesHandlerStub.go
- signerMock.go
- singleSignMock.go
- statusComponentsMock.go
- storageBootstrapperMock.go
- storerMock.go
- syncStarterStub.go
- syncTimerMock.go
- topicFloodPreventerStub.go
- topicHandlerStub.go
- transactionInterceptorMock.go
- transactionPoolMock.go
- transactionSimulatorStub.go
- txForCurrentBlockStub.go
- txLogsProcessorStub.go
- txValidatorHandlerStub.go
- txValidatorStub.go
- uint64ByteSliceConverterMock.go
- uint64SyncMapCacherStub.go
- validatorSettingsStub.go
- vmContainerMock.go
- vmExecutionHandlerStub.go