Documentation ¶
Index ¶
- func NewCountingDB() *countingDB
- func NewMultiShardsCoordinatorMock(numShard uint32) *multipleShardsCoordinatorMock
- func NewNetworkShardingCollectorMock() *networkShardingCollectorMock
- func NewNodesHandlerMock(initialNodesSetup genesis.InitialNodesHandler) (*nodesHandlerMock, error)
- func NewTestBootstrapperMock() *testBootstrapperMock
- type AccountsDBSyncerStub
- type BlackListHandlerStub
- type BlockProcessorMock
- func (bpm *BlockProcessorMock) Close() error
- func (bpm *BlockProcessorMock) CommitBlock(header data.HeaderHandler, body data.BodyHandler) error
- func (bpm *BlockProcessorMock) CreateBlock(initialHdrData data.HeaderHandler, haveTime func() bool) (data.HeaderHandler, data.BodyHandler, error)
- func (bpm *BlockProcessorMock) CreateNewHeader(round uint64, nonce uint64) (data.HeaderHandler, error)
- func (bpm *BlockProcessorMock) DecodeBlockBody(dta []byte) data.BodyHandler
- func (bpm *BlockProcessorMock) DecodeBlockHeader(dta []byte) data.HeaderHandler
- func (bpm *BlockProcessorMock) IsInterfaceNil() bool
- func (bpm *BlockProcessorMock) MarshalizedDataToBroadcast(header data.HeaderHandler, body data.BodyHandler) (map[uint32][]byte, map[string][][]byte, error)
- func (bpm *BlockProcessorMock) NonceOfFirstCommittedBlock() core.OptionalUint64
- func (bpm *BlockProcessorMock) ProcessBlock(header data.HeaderHandler, body data.BodyHandler, ...) error
- func (bpm *BlockProcessorMock) ProcessScheduledBlock(header data.HeaderHandler, body data.BodyHandler, ...) error
- func (bpm *BlockProcessorMock) PruneStateOnRollback(currHeader data.HeaderHandler, currHeaderHash []byte, ...)
- func (bpm *BlockProcessorMock) RestoreBlockBodyIntoPools(body data.BodyHandler) error
- func (bpm *BlockProcessorMock) RestoreBlockIntoPools(header data.HeaderHandler, body data.BodyHandler) error
- func (bpm *BlockProcessorMock) RevertCurrentBlock()
- func (bpm *BlockProcessorMock) RevertStateToBlock(header data.HeaderHandler, rootHash []byte) error
- func (bpm *BlockProcessorMock) SetNumProcessedObj(_ uint64)
- 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 BlockTrackerStub
- func (bts *BlockTrackerStub) AddCrossNotarizedHeader(shardID uint32, crossNotarizedHeader data.HeaderHandler, ...)
- func (bts *BlockTrackerStub) AddSelfNotarizedHeader(shardID uint32, selfNotarizedHeader data.HeaderHandler, ...)
- func (bts *BlockTrackerStub) AddTrackedHeader(header data.HeaderHandler, hash []byte)
- func (bts *BlockTrackerStub) CheckBlockAgainstFinal(headerHandler data.HeaderHandler) error
- func (bts *BlockTrackerStub) CheckBlockAgainstRoundHandler(headerHandler data.HeaderHandler) error
- func (bts *BlockTrackerStub) CheckBlockAgainstWhitelist(interceptedData process.InterceptedData) bool
- func (bts *BlockTrackerStub) CleanupHeadersBehindNonce(shardID uint32, selfNotarizedNonce uint64, crossNotarizedNonce uint64)
- func (bts *BlockTrackerStub) CleanupInvalidCrossHeaders(_ uint32, _ uint64)
- func (bts *BlockTrackerStub) ComputeLongestChain(shardID uint32, header data.HeaderHandler) ([]data.HeaderHandler, [][]byte)
- func (bts *BlockTrackerStub) ComputeLongestMetaChainFromLastNotarized() ([]data.HeaderHandler, [][]byte, error)
- func (bts *BlockTrackerStub) ComputeLongestShardsChainsFromLastNotarized() ([]data.HeaderHandler, [][]byte, map[uint32][]data.HeaderHandler, error)
- func (bts *BlockTrackerStub) DisplayTrackedHeaders()
- func (bts *BlockTrackerStub) GetCrossNotarizedHeader(shardID uint32, offset uint64) (data.HeaderHandler, []byte, error)
- func (bts *BlockTrackerStub) GetLastCrossNotarizedHeader(shardID uint32) (data.HeaderHandler, []byte, error)
- func (bts *BlockTrackerStub) GetLastCrossNotarizedHeadersForAllShards() (map[uint32]data.HeaderHandler, error)
- func (bts *BlockTrackerStub) GetLastSelfNotarizedHeader(shardID uint32) (data.HeaderHandler, []byte, error)
- func (bts *BlockTrackerStub) GetSelfNotarizedHeader(shardID uint32, offset uint64) (data.HeaderHandler, []byte, error)
- func (bts *BlockTrackerStub) GetTrackedHeaders(shardID uint32) ([]data.HeaderHandler, [][]byte)
- func (bts *BlockTrackerStub) GetTrackedHeadersForAllShards() map[uint32][]data.HeaderHandler
- func (bts *BlockTrackerStub) GetTrackedHeadersWithNonce(shardID uint32, nonce uint64) ([]data.HeaderHandler, [][]byte)
- func (bts *BlockTrackerStub) IsInterfaceNil() bool
- func (bts *BlockTrackerStub) IsShardStuck(shardId uint32) bool
- func (bts *BlockTrackerStub) RegisterCrossNotarizedHeadersHandler(...)
- func (bts *BlockTrackerStub) RegisterFinalMetachainHeadersHandler(...)
- func (bts *BlockTrackerStub) RegisterSelfNotarizedFromCrossHeadersHandler(...)
- func (bts *BlockTrackerStub) RegisterSelfNotarizedHeadersHandler(...)
- func (bts *BlockTrackerStub) RemoveLastNotarizedHeaders()
- func (bts *BlockTrackerStub) RestoreToGenesis()
- func (bts *BlockTrackerStub) ShouldAddHeader(headerHandler data.HeaderHandler) bool
- func (bts *BlockTrackerStub) 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(_ int64) error
- type CoreComponentsStub
- func (ccs *CoreComponentsStub) APIEconomicsData() process.EconomicsDataHandler
- func (ccs *CoreComponentsStub) AddressPubKeyConverter() core.PubkeyConverter
- func (ccs *CoreComponentsStub) AlarmScheduler() core.TimersScheduler
- func (ccs *CoreComponentsStub) ChainID() string
- func (ccs *CoreComponentsStub) ChanStopNodeProcess() chan endProcess.ArgEndProcess
- func (ccs *CoreComponentsStub) CheckSubcomponents() error
- func (ccs *CoreComponentsStub) Close() error
- func (ccs *CoreComponentsStub) Create() error
- func (ccs *CoreComponentsStub) EconomicsData() process.EconomicsDataHandler
- func (ccs *CoreComponentsStub) EnableEpochsHandler() common.EnableEpochsHandler
- func (ccs *CoreComponentsStub) EnableRoundsHandler() process.EnableRoundsHandler
- func (ccs *CoreComponentsStub) EncodedAddressLen() uint32
- func (ccs *CoreComponentsStub) EpochNotifier() process.EpochNotifier
- func (ccs *CoreComponentsStub) EpochStartNotifierWithConfirm() factory.EpochStartNotifierWithConfirm
- func (ccs *CoreComponentsStub) GenesisNodesSetup() sharding.GenesisNodesSetupHandler
- func (ccs *CoreComponentsStub) GenesisTime() time.Time
- func (ccs *CoreComponentsStub) HardforkTriggerPubKey() []byte
- func (ccs *CoreComponentsStub) Hasher() hashing.Hasher
- func (ccs *CoreComponentsStub) InternalMarshalizer() marshal.Marshalizer
- func (ccs *CoreComponentsStub) IsInterfaceNil() bool
- func (ccs *CoreComponentsStub) MinTransactionVersion() uint32
- func (ccs *CoreComponentsStub) NodeTypeProvider() core.NodeTypeProviderHandler
- func (ccs *CoreComponentsStub) NodesShuffler() nodesCoordinator.NodesShuffler
- func (ccs *CoreComponentsStub) PathHandler() storage.PathManagerHandler
- func (ccs *CoreComponentsStub) ProcessStatusHandler() common.ProcessStatusHandler
- func (ccs *CoreComponentsStub) Rater() sharding.PeerAccountListAndRatingHandler
- func (ccs *CoreComponentsStub) RatingsData() process.RatingsInfoHandler
- func (ccs *CoreComponentsStub) RoundHandler() consensus.RoundHandler
- func (ccs *CoreComponentsStub) RoundNotifier() process.RoundNotifier
- func (ccs *CoreComponentsStub) SetInternalMarshalizer(m marshal.Marshalizer) error
- func (ccs *CoreComponentsStub) String() string
- func (ccs *CoreComponentsStub) SyncTimer() ntp.SyncTimer
- func (ccs *CoreComponentsStub) TxMarshalizer() marshal.Marshalizer
- func (ccs *CoreComponentsStub) TxSignHasher() hashing.Hasher
- func (ccs *CoreComponentsStub) TxVersionChecker() process.TxVersionCheckerHandler
- func (ccs *CoreComponentsStub) Uint64ByteSliceConverter() typeConverters.Uint64ByteSliceConverter
- func (ccs *CoreComponentsStub) ValidatorPubKeyConverter() core.PubkeyConverter
- func (ccs *CoreComponentsStub) VmMarshalizer() marshal.Marshalizer
- func (ccs *CoreComponentsStub) WasmVMChangeLocker() common.Locker
- func (ccs *CoreComponentsStub) Watchdog() core.WatchdogTimer
- type CryptoComponentsStub
- func (ccs *CryptoComponentsStub) BlockSignKeyGen() crypto.KeyGenerator
- func (ccs *CryptoComponentsStub) BlockSigner() crypto.SingleSigner
- func (ccs *CryptoComponentsStub) CheckSubcomponents() error
- func (ccs *CryptoComponentsStub) Clone() interface{}
- func (ccs *CryptoComponentsStub) Close() error
- func (ccs *CryptoComponentsStub) ConsensusSigningHandler() consensus.SigningHandler
- func (ccs *CryptoComponentsStub) Create() error
- func (ccs *CryptoComponentsStub) GetMultiSigner(epoch uint32) (crypto.MultiSigner, error)
- func (ccs *CryptoComponentsStub) IsInterfaceNil() bool
- func (ccs *CryptoComponentsStub) KeysHandler() consensus.KeysHandler
- func (ccs *CryptoComponentsStub) ManagedPeersHolder() common.ManagedPeersHolder
- func (ccs *CryptoComponentsStub) MessageSignVerifier() vm.MessageSignVerifier
- func (ccs *CryptoComponentsStub) MultiSignerContainer() cryptoCommon.MultiSignerContainer
- func (ccs *CryptoComponentsStub) P2pKeyGen() crypto.KeyGenerator
- func (ccs *CryptoComponentsStub) P2pPrivateKey() crypto.PrivateKey
- func (ccs *CryptoComponentsStub) P2pPublicKey() crypto.PublicKey
- func (ccs *CryptoComponentsStub) P2pSingleSigner() crypto.SingleSigner
- func (ccs *CryptoComponentsStub) PeerSignatureHandler() crypto.PeerSignatureHandler
- func (ccs *CryptoComponentsStub) PrivateKey() crypto.PrivateKey
- func (ccs *CryptoComponentsStub) PublicKey() crypto.PublicKey
- func (ccs *CryptoComponentsStub) PublicKeyBytes() []byte
- func (ccs *CryptoComponentsStub) PublicKeyString() string
- func (ccs *CryptoComponentsStub) SetMultiSignerContainer(ms cryptoCommon.MultiSignerContainer) error
- func (ccs *CryptoComponentsStub) String() string
- func (ccs *CryptoComponentsStub) TxSignKeyGen() crypto.KeyGenerator
- func (ccs *CryptoComponentsStub) TxSingleSigner() crypto.SingleSigner
- type CurrentNetworkEpochProviderStub
- type DataComponentsStub
- func (dcs *DataComponentsStub) Blockchain() data.ChainHandler
- func (dcs *DataComponentsStub) CheckSubcomponents() error
- func (dcs *DataComponentsStub) Clone() interface{}
- func (dcs *DataComponentsStub) Close() error
- func (dcs *DataComponentsStub) Create() error
- func (dcs *DataComponentsStub) Datapool() dataRetriever.PoolsHolder
- func (dcs *DataComponentsStub) EconomicsHandler() factory.EconomicsHandler
- func (dcs *DataComponentsStub) IsInterfaceNil() bool
- func (dcs *DataComponentsStub) MiniBlocksProvider() factory.MiniBlockProvider
- func (dcs *DataComponentsStub) SetBlockchain(chain data.ChainHandler) error
- func (dcs *DataComponentsStub) StorageService() dataRetriever.StorageService
- func (dcs *DataComponentsStub) String() string
- 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) NotifyEpochChangeConfirmed(epoch uint32)
- 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(round uint64)
- func (e *EpochStartTriggerStub) GetRoundsPerEpoch() uint64
- 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) ReceivedHeader(header 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) SetEpoch(_ uint32)
- func (e *EpochStartTriggerStub) SetFinalityAttestingRound(_ uint64)
- func (e *EpochStartTriggerStub) SetMinRoundsBetweenEpochs(_ uint64)
- func (e *EpochStartTriggerStub) SetProcessed(header data.HeaderHandler, _ data.BodyHandler)
- func (e *EpochStartTriggerStub) SetRoundsPerEpoch(_ uint64)
- func (e *EpochStartTriggerStub) SetTrigger(_ epochStart.TriggerHandler)
- func (e *EpochStartTriggerStub) Update(round uint64, nonce uint64)
- type ExportFactoryHandlerStub
- type ExportHandlerStub
- type ForkDetectorStub
- func (fdm *ForkDetectorStub) AddHeader(header data.HeaderHandler, hash []byte, state process.BlockHeaderState, ...) error
- func (fdm *ForkDetectorStub) CheckFork() *process.ForkInfo
- func (fdm *ForkDetectorStub) GetHighestFinalBlockHash() []byte
- func (fdm *ForkDetectorStub) GetHighestFinalBlockNonce() uint64
- func (fdm *ForkDetectorStub) GetNotarizedHeaderHash(nonce uint64) []byte
- func (fdm *ForkDetectorStub) IsInterfaceNil() bool
- func (fdm *ForkDetectorStub) ProbableHighestNonce() uint64
- func (fdm *ForkDetectorStub) RemoveHeader(nonce uint64, hash []byte)
- func (fdm *ForkDetectorStub) ResetFork()
- func (fdm *ForkDetectorStub) ResetProbableHighestNonce()
- func (fdm *ForkDetectorStub) RestoreToGenesis()
- func (fdm *ForkDetectorStub) SetFinalToLastCheckpoint()
- func (fdm *ForkDetectorStub) 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) 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) RemoveGasRefunded(hashes [][]byte)
- func (ghm *GasHandlerMock) SetGasPenalized(gasPenalized uint64, hash []byte)
- func (ghm *GasHandlerMock) SetGasProvided(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) TotalGasProvidedWithScheduled() uint64
- func (ghm *GasHandlerMock) TotalGasRefunded() uint64
- type GasScheduleNotifierMock
- func (g *GasScheduleNotifierMock) ChangeGasSchedule(gasSchedule map[string]map[string]uint64)
- func (g *GasScheduleNotifierMock) IsInterfaceNil() bool
- func (g *GasScheduleNotifierMock) LatestGasSchedule() map[string]map[string]uint64
- func (g *GasScheduleNotifierMock) RegisterNotifyHandler(handler core.GasScheduleSubscribeHandler)
- func (g *GasScheduleNotifierMock) UnRegisterAll()
- 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 HeaderValidatorStub
- type HeadersCacherStub
- func (hcs *HeadersCacherStub) AddHeader(headerHash []byte, header data.HeaderHandler)
- func (hcs *HeadersCacherStub) Clear()
- func (hcs *HeadersCacherStub) GetHeaderByHash(hash []byte) (data.HeaderHandler, error)
- func (hcs *HeadersCacherStub) GetHeadersByNonceAndShardId(hdrNonce uint64, shardId uint32) ([]data.HeaderHandler, [][]byte, error)
- func (hcs *HeadersCacherStub) GetNumHeaders(shardId uint32) int
- func (hcs *HeadersCacherStub) IsInterfaceNil() bool
- func (hcs *HeadersCacherStub) Keys(shardId uint32) []uint64
- func (hcs *HeadersCacherStub) Len() int
- func (hcs *HeadersCacherStub) MaxSize() int
- func (hcs *HeadersCacherStub) Nonces(shardId uint32) []uint64
- func (hcs *HeadersCacherStub) RegisterHandler(handler func(headerHandler data.HeaderHandler, headerHash []byte))
- func (hcs *HeadersCacherStub) RemoveHeaderByHash(headerHash []byte)
- func (hcs *HeadersCacherStub) RemoveHeaderByNonceAndShardId(hdrNonce uint64, shardId uint32)
- type HeartbeatMonitorStub
- type ImportStartHandlerStub
- func (ish *ImportStartHandlerStub) IsAfterExportBeforeImport() bool
- func (ish *ImportStartHandlerStub) IsInterfaceNil() bool
- func (ish *ImportStartHandlerStub) ResetStartImport() error
- func (ish *ImportStartHandlerStub) SetStartImport() error
- func (ish *ImportStartHandlerStub) ShouldStartImport() bool
- type 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 IntermediateTransactionHandlerMock
- func (ith *IntermediateTransactionHandlerMock) AddIntermediateTransactions(txs []data.TransactionHandler) error
- func (ith *IntermediateTransactionHandlerMock) Clean()
- 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 KeyGenMock
- func (keyGen *KeyGenMock) CheckPublicKeyValid(_ []byte) error
- func (keyGen *KeyGenMock) GeneratePair() (crypto.PrivateKey, crypto.PublicKey)
- func (keyGen *KeyGenMock) IsInterfaceNil() bool
- func (keyGen *KeyGenMock) PrivateKeyFromByteArray(buff []byte) (crypto.PrivateKey, error)
- func (keyGen *KeyGenMock) PublicKeyFromByteArray(buff []byte) (crypto.PublicKey, error)
- func (keyGen *KeyGenMock) Suite() crypto.Suite
- type LatestStorageDataProviderStub
- func (l *LatestStorageDataProviderStub) Get() (storage.LatestDataFromStorage, error)
- func (l *LatestStorageDataProviderStub) GetParentDirAndLastEpoch() (string, uint32, error)
- func (l *LatestStorageDataProviderStub) GetParentDirectory() string
- func (l *LatestStorageDataProviderStub) GetShardsFromDirectory(path string) ([]string, error)
- func (l *LatestStorageDataProviderStub) IsInterfaceNil() bool
- type ListIndexUpdaterStub
- 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 MockDB
- func (MockDB) Close() error
- func (MockDB) Destroy() error
- func (MockDB) DestroyClosed() error
- func (MockDB) Get(_ []byte) ([]byte, error)
- func (MockDB) Has(_ []byte) error
- func (s MockDB) IsInterfaceNil() bool
- func (MockDB) Put(_, _ []byte) error
- func (MockDB) RangeKeys(_ func(key []byte, val []byte) bool)
- func (MockDB) Remove(_ []byte) error
- type NetworkComponentsStub
- func (ncs *NetworkComponentsStub) CheckSubcomponents() error
- func (ncs *NetworkComponentsStub) Close() error
- func (ncs *NetworkComponentsStub) Create() error
- func (ncs *NetworkComponentsStub) FullArchiveNetworkMessenger() p2p.Messenger
- func (ncs *NetworkComponentsStub) FullArchivePreferredPeersHolderHandler() factory.PreferredPeersHolderHandler
- func (ncs *NetworkComponentsStub) InputAntiFloodHandler() factory.P2PAntifloodHandler
- func (ncs *NetworkComponentsStub) IsInterfaceNil() bool
- func (ncs *NetworkComponentsStub) NetworkMessenger() p2p.Messenger
- func (ncs *NetworkComponentsStub) OutputAntiFloodHandler() factory.P2PAntifloodHandler
- func (ncs *NetworkComponentsStub) PeerBlackListHandler() process.PeerBlackListCacher
- func (ncs *NetworkComponentsStub) PeerHonestyHandler() factory.PeerHonestyHandler
- func (ncs *NetworkComponentsStub) PeersRatingHandler() p2p.PeersRatingHandler
- func (ncs *NetworkComponentsStub) PeersRatingMonitor() p2p.PeersRatingMonitor
- func (ncs *NetworkComponentsStub) PreferredPeersHolderHandler() factory.PreferredPeersHolderHandler
- func (ncs *NetworkComponentsStub) PubKeyCacher() process.TimeCacher
- func (ncs *NetworkComponentsStub) String() string
- type NilAntifloodHandler
- func (nah *NilAntifloodHandler) ApplyConsensusSize(_ int)
- func (nah *NilAntifloodHandler) BlacklistPeer(_ core.PeerID, _ string, _ time.Duration)
- func (nah *NilAntifloodHandler) CanProcessMessage(_ p2p.MessageP2P, _ core.PeerID) error
- func (nah *NilAntifloodHandler) CanProcessMessagesOnTopic(_ core.PeerID, _ string, _ uint32, _ uint64, _ []byte) error
- func (nah *NilAntifloodHandler) Close() error
- func (nah *NilAntifloodHandler) IsInterfaceNil() bool
- func (nah *NilAntifloodHandler) IsOriginatorEligibleForTopic(_ core.PeerID, _ string) error
- func (nah *NilAntifloodHandler) ResetForTopic(_ string)
- func (nah *NilAntifloodHandler) SetDebugger(_ process.AntifloodDebugger) error
- func (nah *NilAntifloodHandler) SetMaxMessagesForTopic(_ string, _ uint32)
- func (nah *NilAntifloodHandler) SetPeerValidatorMapper(_ process.PeerValidatorMapper) error
- func (nah *NilAntifloodHandler) SetTopicsForAll(_ ...string)
- type NodeInfoMock
- type NodesCoordinatorCacheStub
- type OneSCExecutorMockVM
- func (vm *OneSCExecutorMockVM) Close() error
- func (vm *OneSCExecutorMockVM) GasScheduleChange(_ map[string]map[string]uint64)
- func (vm *OneSCExecutorMockVM) GetVersion() string
- func (vm *OneSCExecutorMockVM) IsInterfaceNil() bool
- func (vm *OneSCExecutorMockVM) RunSmartContractCall(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error)
- func (vm *OneSCExecutorMockVM) RunSmartContractCreate(input *vmcommon.ContractCreateInput) (*vmcommon.VMOutput, error)
- type P2PAntifloodHandlerStub
- func (stub *P2PAntifloodHandlerStub) ApplyConsensusSize(size int)
- func (stub *P2PAntifloodHandlerStub) BlacklistPeer(peer core.PeerID, reason string, duration time.Duration)
- func (stub *P2PAntifloodHandlerStub) CanProcessMessage(message p2p.MessageP2P, fromConnectedPeer core.PeerID) error
- func (stub *P2PAntifloodHandlerStub) CanProcessMessagesOnTopic(peer core.PeerID, topic string, numMessages uint32, totalSize uint64, ...) error
- func (stub *P2PAntifloodHandlerStub) Close() error
- func (stub *P2PAntifloodHandlerStub) IsInterfaceNil() bool
- func (stub *P2PAntifloodHandlerStub) IsOriginatorEligibleForTopic(pid core.PeerID, topic string) error
- func (stub *P2PAntifloodHandlerStub) ResetForTopic(_ string)
- func (stub *P2PAntifloodHandlerStub) SetDebugger(debugger process.AntifloodDebugger) error
- func (stub *P2PAntifloodHandlerStub) SetMaxMessagesForTopic(_ string, _ uint32)
- func (stub *P2PAntifloodHandlerStub) SetPeerValidatorMapper(validatorMapper process.PeerValidatorMapper) error
- func (stub *P2PAntifloodHandlerStub) SetTopicsForAll(_ ...string)
- type PeerBlackListCacherStub
- func (pblhs *PeerBlackListCacherStub) Add(pid core.PeerID) error
- func (pblhs *PeerBlackListCacherStub) Has(pid core.PeerID) bool
- func (pblhs *PeerBlackListCacherStub) IsInterfaceNil() bool
- func (pblhs *PeerBlackListCacherStub) Sweep()
- func (pblhs *PeerBlackListCacherStub) Upsert(pid core.PeerID, span time.Duration) error
- type PeerChangesHandler
- type PeerDenialEvaluatorStub
- type PeerHonestyHandlerStub
- type PeerShardMapperStub
- func (psms *PeerShardMapperStub) GetLastKnownPeerID(pk []byte) (core.PeerID, bool)
- func (psms *PeerShardMapperStub) GetPeerInfo(_ 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) UpdatePeerIDInfo(pid core.PeerID, pk []byte, shardID uint32)
- func (psms *PeerShardMapperStub) UpdatePeerIDPublicKeyPair(pid core.PeerID, pk []byte)
- type PeerSignatureHandler
- type PeerTypeProviderStub
- 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 PrivateKeyMock
- type ProcessComponentsStub
- func (pcs *ProcessComponentsStub) APITransactionEvaluator() factory.TransactionEvaluator
- func (pcs *ProcessComponentsStub) AccountsParser() genesis.AccountsParser
- func (pcs *ProcessComponentsStub) BlackListHandler() process.TimeCacher
- func (pcs *ProcessComponentsStub) BlockProcessor() process.BlockProcessor
- func (pcs *ProcessComponentsStub) BlockTracker() process.BlockTracker
- func (pcs *ProcessComponentsStub) BootStorer() process.BootStorer
- func (pcs *ProcessComponentsStub) CheckSubcomponents() error
- func (pcs *ProcessComponentsStub) Close() error
- func (pcs *ProcessComponentsStub) Create() error
- func (pcs *ProcessComponentsStub) CurrentEpochProvider() process.CurrentNetworkEpochProviderHandler
- func (pcs *ProcessComponentsStub) ESDTDataStorageHandlerForAPI() vmcommon.ESDTNFTStorageHandler
- func (pcs *ProcessComponentsStub) EpochStartNotifier() factory.EpochStartNotifier
- func (pcs *ProcessComponentsStub) EpochStartTrigger() epochStart.TriggerHandler
- func (pcs *ProcessComponentsStub) FallbackHeaderValidator() process.FallbackHeaderValidator
- func (pcs *ProcessComponentsStub) ForkDetector() process.ForkDetector
- func (pcs *ProcessComponentsStub) FullArchiveInterceptorsContainer() process.InterceptorsContainer
- func (pcs *ProcessComponentsStub) FullArchivePeerShardMapper() process.NetworkShardingCollector
- func (pcs *ProcessComponentsStub) HardforkTrigger() factory.HardforkTrigger
- func (pcs *ProcessComponentsStub) HeaderConstructionValidator() process.HeaderConstructionValidator
- func (pcs *ProcessComponentsStub) HeaderIntegrityVerifier() process.HeaderIntegrityVerifier
- func (pcs *ProcessComponentsStub) HeaderSigVerifier() process.InterceptedHeaderSigVerifier
- func (pcs *ProcessComponentsStub) HistoryRepository() dblookupext.HistoryRepository
- func (pcs *ProcessComponentsStub) ImportStartHandler() update.ImportStartHandler
- func (pcs *ProcessComponentsStub) InterceptorsContainer() process.InterceptorsContainer
- func (pcs *ProcessComponentsStub) IsInterfaceNil() bool
- func (pcs *ProcessComponentsStub) NodeRedundancyHandler() consensus.NodeRedundancyHandler
- func (pcs *ProcessComponentsStub) NodesCoordinator() nodesCoordinator.NodesCoordinator
- func (pcs *ProcessComponentsStub) PeerShardMapper() process.NetworkShardingCollector
- func (pcs *ProcessComponentsStub) PendingMiniBlocksHandler() process.PendingMiniBlocksHandler
- func (pcs *ProcessComponentsStub) ProcessedMiniBlocksTracker() process.ProcessedMiniBlocksTracker
- func (pcs *ProcessComponentsStub) ReceiptsRepository() factory.ReceiptsRepository
- func (pcs *ProcessComponentsStub) RequestHandler() process.RequestHandler
- func (pcs *ProcessComponentsStub) RequestedItemsHandler() dataRetriever.RequestedItemsHandler
- func (pcs *ProcessComponentsStub) RequestersFinder() dataRetriever.RequestersFinder
- func (pcs *ProcessComponentsStub) ResolversContainer() dataRetriever.ResolversContainer
- func (pcs *ProcessComponentsStub) RoundHandler() consensus.RoundHandler
- func (pcs *ProcessComponentsStub) ScheduledTxsExecutionHandler() process.ScheduledTxsExecutionHandler
- func (pcs *ProcessComponentsStub) SentSignaturesTracker() process.SentSignaturesTracker
- func (pcs *ProcessComponentsStub) ShardCoordinator() sharding.Coordinator
- func (pcs *ProcessComponentsStub) String() string
- func (pcs *ProcessComponentsStub) TxLogsProcessor() process.TransactionLogProcessorDatabase
- func (pcs *ProcessComponentsStub) TxsSenderHandler() process.TxsSenderHandler
- func (pcs *ProcessComponentsStub) ValidatorsProvider() process.ValidatorsProvider
- func (pcs *ProcessComponentsStub) ValidatorsStatistics() process.ValidatorStatisticsProcessor
- func (pcs *ProcessComponentsStub) WhiteListHandler() process.WhiteListHandler
- func (pcs *ProcessComponentsStub) WhiteListerVerifiedTxs() process.WhiteListHandler
- type PublicKeyMock
- 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 RedundancyHandlerStub
- func (rhs *RedundancyHandlerStub) AdjustInactivityIfNeeded(selfPubKey string, consensusPubKeys []string, roundIndex int64)
- func (rhs *RedundancyHandlerStub) IsInterfaceNil() bool
- func (rhs *RedundancyHandlerStub) IsMainMachineActive() bool
- func (rhs *RedundancyHandlerStub) IsRedundancyNode() bool
- func (rhs *RedundancyHandlerStub) ObserverPrivateKey() crypto.PrivateKey
- func (rhs *RedundancyHandlerStub) ResetInactivityIfNeeded(selfPubKey string, consensusMsgPubKey string, consensusMsgPeerID core.PeerID)
- type RequestedItemsHandlerStub
- type ResolversContainerStub
- func (rcs *ResolversContainerStub) Add(key string, val dataRetriever.Resolver) error
- func (rcs *ResolversContainerStub) AddMultiple(_ []string, _ []dataRetriever.Resolver) error
- func (rcs *ResolversContainerStub) Close() error
- func (rcs *ResolversContainerStub) Get(key string) (dataRetriever.Resolver, error)
- func (rcs *ResolversContainerStub) IsInterfaceNil() bool
- func (rcs *ResolversContainerStub) Iterate(handler func(key string, resolver dataRetriever.Resolver) bool)
- func (rcs *ResolversContainerStub) Len() int
- func (rcs *ResolversContainerStub) Remove(key string)
- func (rcs *ResolversContainerStub) Replace(key string, val dataRetriever.Resolver) error
- func (rcs *ResolversContainerStub) ResolverKeys() string
- type RoundHandlerMock
- func (mock *RoundHandlerMock) BeforeGenesis() bool
- func (mock *RoundHandlerMock) Index() int64
- func (mock *RoundHandlerMock) IsInterfaceNil() bool
- func (mock *RoundHandlerMock) RemainingTime(_ time.Time, _ time.Duration) time.Duration
- func (mock *RoundHandlerMock) TimeDuration() time.Duration
- func (mock *RoundHandlerMock) TimeStamp() time.Time
- func (mock *RoundHandlerMock) UpdateRound(time.Time, time.Time)
- type SCToProtocolStub
- type ScQueryStub
- type ShuffledOutHandlerStub
- type SignerMock
- type SmartContractParserStub
- func (scps *SmartContractParserStub) GetDeployedSCAddresses(scType string) (map[string]struct{}, error)
- func (scps *SmartContractParserStub) InitialSmartContracts() []genesis.InitialSmartContractHandler
- func (scps *SmartContractParserStub) InitialSmartContractsSplitOnOwnersShards(shardCoordinator sharding.Coordinator) (map[uint32][]genesis.InitialSmartContractHandler, error)
- func (scps *SmartContractParserStub) IsInterfaceNil() bool
- type SoftwareVersionCheckerMock
- type StatusComponentsStub
- func (scs *StatusComponentsStub) CheckSubcomponents() error
- func (scs *StatusComponentsStub) Close() error
- func (scs *StatusComponentsStub) Create() error
- func (scs *StatusComponentsStub) IsInterfaceNil() bool
- func (scs *StatusComponentsStub) ManagedPeersMonitor() common.ManagedPeersMonitor
- func (scs *StatusComponentsStub) OutportHandler() outport.OutportHandler
- func (scs *StatusComponentsStub) SoftwareVersionChecker() statistics.SoftwareVersionChecker
- type StorageBootstrapperMock
- 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(_ string)
- func (t *TopicAntiFloodStub) SetMaxMessagesForTopic(_ string, _ uint32)
- type TransactionCoordinatorMock
- func (tcm *TransactionCoordinatorMock) AddIntermediateTransactions(mapSCRs map[block.Type][]data.TransactionHandler) error
- func (tcm *TransactionCoordinatorMock) AddTransactions(txHandlers []data.TransactionHandler, blockType block.Type)
- func (tcm *TransactionCoordinatorMock) AddTxsFromMiniBlocks(miniBlocks block.MiniBlockSlice)
- func (tcm *TransactionCoordinatorMock) ComputeTransactionType(tx data.TransactionHandler) (process.TransactionType, process.TransactionType)
- func (tcm *TransactionCoordinatorMock) CreateBlockStarted()
- func (tcm *TransactionCoordinatorMock) CreateMarshalizedData(body *block.Body) map[string][][]byte
- func (tcm *TransactionCoordinatorMock) CreateMbsAndProcessCrossShardTransactionsDstMe(header data.HeaderHandler, ...) (block.MiniBlockSlice, uint32, bool, error)
- func (tcm *TransactionCoordinatorMock) CreateMbsAndProcessTransactionsFromMe(haveTime func() bool, _ []byte) block.MiniBlockSlice
- func (tcm *TransactionCoordinatorMock) CreatePostProcessMiniBlocks() block.MiniBlockSlice
- func (tcm *TransactionCoordinatorMock) CreateReceiptsHash() ([]byte, error)
- func (tcm *TransactionCoordinatorMock) GetAllCurrentLogs() []*data.LogData
- func (tcm *TransactionCoordinatorMock) GetAllCurrentUsedTxs(blockType block.Type) map[string]data.TransactionHandler
- func (tcm *TransactionCoordinatorMock) GetAllIntermediateTxs() map[block.Type]map[string]data.TransactionHandler
- func (tcm *TransactionCoordinatorMock) GetCreatedInShardMiniBlocks() []*block.MiniBlock
- func (tcm *TransactionCoordinatorMock) IsDataPreparedForProcessing(haveTime func() time.Duration) error
- func (tcm *TransactionCoordinatorMock) IsInterfaceNil() bool
- func (tcm *TransactionCoordinatorMock) ProcessBlockTransaction(header data.HeaderHandler, body *block.Body, haveTime func() time.Duration) error
- func (tcm *TransactionCoordinatorMock) RemoveBlockDataFromPool(body *block.Body) error
- func (tcm *TransactionCoordinatorMock) RemoveTxsFromPool(body *block.Body) error
- func (tcm *TransactionCoordinatorMock) RequestBlockTransactions(body *block.Body)
- func (tcm *TransactionCoordinatorMock) RequestMiniBlocksAndTransactions(header data.HeaderHandler)
- func (tcm *TransactionCoordinatorMock) RestoreBlockDataFromStorage(body *block.Body) (int, error)
- func (tcm *TransactionCoordinatorMock) SaveTxsToStorage(body *block.Body)
- func (tcm *TransactionCoordinatorMock) VerifyCreatedBlockTransactions(hdr data.HeaderHandler, body *block.Body) error
- func (tcm *TransactionCoordinatorMock) VerifyCreatedMiniBlocks(hdr data.HeaderHandler, body *block.Body) error
- type TxForCurrentBlockStub
- type TxLogProcessorMock
- 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 Uint64ByteSliceConverterMock
- type UnitOpenerStub
- type VMContainerMock
- func (vmc *VMContainerMock) Add(key []byte, val vmcommon.VMExecutionHandler) error
- func (vmc *VMContainerMock) AddMultiple(keys [][]byte, vms []vmcommon.VMExecutionHandler) error
- func (vmc *VMContainerMock) Close() error
- func (vmc *VMContainerMock) Get(key []byte) (vmcommon.VMExecutionHandler, error)
- func (vmc *VMContainerMock) IsInterfaceNil() bool
- func (vmc *VMContainerMock) Keys() [][]byte
- func (vmc *VMContainerMock) Len() int
- func (vmc *VMContainerMock) Remove(key []byte)
- func (vmc *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 ValidatorInfoSyncerStub
- type VmMachinesContainerFactoryMock
- func (v *VmMachinesContainerFactoryMock) BlockChainHookImpl() process.BlockChainHookWithAccountsAdapter
- func (v *VmMachinesContainerFactoryMock) Close() error
- func (v *VmMachinesContainerFactoryMock) Create() (process.VirtualMachinesContainer, error)
- func (v *VmMachinesContainerFactoryMock) IsInterfaceNil() bool
- type WatchdogMock
- func (w *WatchdogMock) IsInterfaceNil() bool
- func (w *WatchdogMock) Reset(alarmID string)
- func (w *WatchdogMock) Set(callback func(alarmID string), duration time.Duration, alarmID string)
- func (w *WatchdogMock) SetDefault(duration time.Duration, alarmID string)
- func (w *WatchdogMock) Stop(alarmID string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCountingDB ¶
func NewCountingDB() *countingDB
NewCountingDB returns a new instance of countingDB
func NewMultiShardsCoordinatorMock ¶
func NewMultiShardsCoordinatorMock(numShard uint32) *multipleShardsCoordinatorMock
NewMultiShardsCoordinatorMock -
func NewNetworkShardingCollectorMock ¶
func NewNetworkShardingCollectorMock() *networkShardingCollectorMock
NewNetworkShardingCollectorMock -
func NewNodesHandlerMock ¶
func NewNodesHandlerMock( initialNodesSetup genesis.InitialNodesHandler, ) (*nodesHandlerMock, error)
NewNodesHandlerMock -
func NewTestBootstrapperMock ¶
func NewTestBootstrapperMock() *testBootstrapperMock
NewTestBootstrapperMock -
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 BlackListHandlerStub ¶
type BlackListHandlerStub struct { AddCalled func(key string) error AddWithSpanCalled func(key string, span time.Duration) error HasCalled func(key string) bool SweepCalled func() }
BlackListHandlerStub -
func (*BlackListHandlerStub) AddWithSpan ¶
func (blhs *BlackListHandlerStub) AddWithSpan(key string, span time.Duration) error
AddWithSpan -
func (*BlackListHandlerStub) IsInterfaceNil ¶
func (blhs *BlackListHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
type BlockProcessorMock ¶
type BlockProcessorMock struct { NumCommitBlockCalled uint32 Marshalizer marshal.Marshalizer ProcessBlockCalled func(header data.HeaderHandler, body data.BodyHandler, haveTime func() time.Duration) error ProcessScheduledBlockCalled func(header data.HeaderHandler, body data.BodyHandler, haveTime func() time.Duration) error CommitBlockCalled func(header data.HeaderHandler, body data.BodyHandler) error RevertCurrentBlockCalled func() CreateBlockCalled func(initialHdrData data.HeaderHandler, haveTime func() bool) (data.HeaderHandler, data.BodyHandler, error) RestoreBlockIntoPoolsCalled func(header data.HeaderHandler, body data.BodyHandler) error RestoreBlockBodyIntoPoolsCalled func(body data.BodyHandler) error MarshalizedDataToBroadcastCalled func(header data.HeaderHandler, body data.BodyHandler) (map[uint32][]byte, map[string][][]byte, error) CreateNewHeaderCalled func(round uint64, nonce uint64) (data.HeaderHandler, error) PruneStateOnRollbackCalled func(currHeader data.HeaderHandler, currHeaderHash []byte, prevHeader data.HeaderHandler, prevHeaderHash []byte) RevertStateToBlockCalled func(header data.HeaderHandler, rootHash []byte) error }
BlockProcessorMock mocks the implementation for a blockProcessor
func (*BlockProcessorMock) CommitBlock ¶
func (bpm *BlockProcessorMock) CommitBlock(header data.HeaderHandler, body data.BodyHandler) error
CommitBlock mocks the commit of a block
func (*BlockProcessorMock) CreateBlock ¶
func (bpm *BlockProcessorMock) CreateBlock(initialHdrData data.HeaderHandler, haveTime func() bool) (data.HeaderHandler, data.BodyHandler, error)
CreateBlock -
func (*BlockProcessorMock) CreateNewHeader ¶
func (bpm *BlockProcessorMock) CreateNewHeader(round uint64, nonce uint64) (data.HeaderHandler, error)
CreateNewHeader -
func (*BlockProcessorMock) DecodeBlockBody ¶
func (bpm *BlockProcessorMock) DecodeBlockBody(dta []byte) data.BodyHandler
DecodeBlockBody method decodes block body from a given byte array
func (*BlockProcessorMock) DecodeBlockHeader ¶
func (bpm *BlockProcessorMock) DecodeBlockHeader(dta []byte) data.HeaderHandler
DecodeBlockHeader method decodes block header from a given byte array
func (*BlockProcessorMock) IsInterfaceNil ¶
func (bpm *BlockProcessorMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*BlockProcessorMock) MarshalizedDataToBroadcast ¶
func (bpm *BlockProcessorMock) MarshalizedDataToBroadcast(header data.HeaderHandler, body data.BodyHandler) (map[uint32][]byte, map[string][][]byte, error)
MarshalizedDataToBroadcast -
func (*BlockProcessorMock) NonceOfFirstCommittedBlock ¶
func (bpm *BlockProcessorMock) NonceOfFirstCommittedBlock() core.OptionalUint64
NonceOfFirstCommittedBlock -
func (*BlockProcessorMock) ProcessBlock ¶
func (bpm *BlockProcessorMock) ProcessBlock(header data.HeaderHandler, body data.BodyHandler, haveTime func() time.Duration) error
ProcessBlock mocks processing a block
func (*BlockProcessorMock) ProcessScheduledBlock ¶
func (bpm *BlockProcessorMock) ProcessScheduledBlock(header data.HeaderHandler, body data.BodyHandler, haveTime func() time.Duration) error
ProcessScheduledBlock mocks processing a scheduled block
func (*BlockProcessorMock) PruneStateOnRollback ¶
func (bpm *BlockProcessorMock) PruneStateOnRollback(currHeader data.HeaderHandler, currHeaderHash []byte, prevHeader data.HeaderHandler, prevHeaderHash []byte)
PruneStateOnRollback recreates the state tries to the root hashes indicated by the provided header
func (*BlockProcessorMock) RestoreBlockBodyIntoPools ¶
func (bpm *BlockProcessorMock) RestoreBlockBodyIntoPools(body data.BodyHandler) error
RestoreBlockBodyIntoPools -
func (*BlockProcessorMock) RestoreBlockIntoPools ¶
func (bpm *BlockProcessorMock) RestoreBlockIntoPools(header data.HeaderHandler, body data.BodyHandler) error
RestoreBlockIntoPools -
func (*BlockProcessorMock) RevertCurrentBlock ¶
func (bpm *BlockProcessorMock) RevertCurrentBlock()
RevertCurrentBlock mocks revert of the current block
func (*BlockProcessorMock) RevertStateToBlock ¶
func (bpm *BlockProcessorMock) RevertStateToBlock(header data.HeaderHandler, rootHash []byte) error
RevertStateToBlock recreates the state tries to the root hashes indicated by the provided header
func (*BlockProcessorMock) SetNumProcessedObj ¶
func (bpm *BlockProcessorMock) SetNumProcessedObj(_ uint64)
SetNumProcessedObj -
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 BlockTrackerStub ¶
type BlockTrackerStub 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) IsShardStuckCalled func(shardId uint32) bool ShouldSkipMiniBlocksCreationFromSelfCalled func() 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 }
BlockTrackerStub -
func (*BlockTrackerStub) AddCrossNotarizedHeader ¶
func (bts *BlockTrackerStub) AddCrossNotarizedHeader(shardID uint32, crossNotarizedHeader data.HeaderHandler, crossNotarizedHeaderHash []byte)
AddCrossNotarizedHeader -
func (*BlockTrackerStub) AddSelfNotarizedHeader ¶
func (bts *BlockTrackerStub) AddSelfNotarizedHeader(shardID uint32, selfNotarizedHeader data.HeaderHandler, selfNotarizedHeaderHash []byte)
AddSelfNotarizedHeader -
func (*BlockTrackerStub) AddTrackedHeader ¶
func (bts *BlockTrackerStub) AddTrackedHeader(header data.HeaderHandler, hash []byte)
AddTrackedHeader -
func (*BlockTrackerStub) CheckBlockAgainstFinal ¶
func (bts *BlockTrackerStub) CheckBlockAgainstFinal(headerHandler data.HeaderHandler) error
CheckBlockAgainstFinal -
func (*BlockTrackerStub) CheckBlockAgainstRoundHandler ¶
func (bts *BlockTrackerStub) CheckBlockAgainstRoundHandler(headerHandler data.HeaderHandler) error
CheckBlockAgainstRoundHandler -
func (*BlockTrackerStub) CheckBlockAgainstWhitelist ¶
func (bts *BlockTrackerStub) CheckBlockAgainstWhitelist(interceptedData process.InterceptedData) bool
CheckBlockAgainstWhitelist -
func (*BlockTrackerStub) CleanupHeadersBehindNonce ¶
func (bts *BlockTrackerStub) CleanupHeadersBehindNonce(shardID uint32, selfNotarizedNonce uint64, crossNotarizedNonce uint64)
CleanupHeadersBehindNonce -
func (*BlockTrackerStub) CleanupInvalidCrossHeaders ¶
func (bts *BlockTrackerStub) CleanupInvalidCrossHeaders(_ uint32, _ uint64)
CleanupInvalidCrossHeaders -
func (*BlockTrackerStub) ComputeLongestChain ¶
func (bts *BlockTrackerStub) ComputeLongestChain(shardID uint32, header data.HeaderHandler) ([]data.HeaderHandler, [][]byte)
ComputeLongestChain -
func (*BlockTrackerStub) ComputeLongestMetaChainFromLastNotarized ¶
func (bts *BlockTrackerStub) ComputeLongestMetaChainFromLastNotarized() ([]data.HeaderHandler, [][]byte, error)
ComputeLongestMetaChainFromLastNotarized -
func (*BlockTrackerStub) ComputeLongestShardsChainsFromLastNotarized ¶
func (bts *BlockTrackerStub) ComputeLongestShardsChainsFromLastNotarized() ([]data.HeaderHandler, [][]byte, map[uint32][]data.HeaderHandler, error)
ComputeLongestShardsChainsFromLastNotarized -
func (*BlockTrackerStub) DisplayTrackedHeaders ¶
func (bts *BlockTrackerStub) DisplayTrackedHeaders()
DisplayTrackedHeaders -
func (*BlockTrackerStub) GetCrossNotarizedHeader ¶
func (bts *BlockTrackerStub) GetCrossNotarizedHeader(shardID uint32, offset uint64) (data.HeaderHandler, []byte, error)
GetCrossNotarizedHeader -
func (*BlockTrackerStub) GetLastCrossNotarizedHeader ¶
func (bts *BlockTrackerStub) GetLastCrossNotarizedHeader(shardID uint32) (data.HeaderHandler, []byte, error)
GetLastCrossNotarizedHeader -
func (*BlockTrackerStub) GetLastCrossNotarizedHeadersForAllShards ¶
func (bts *BlockTrackerStub) GetLastCrossNotarizedHeadersForAllShards() (map[uint32]data.HeaderHandler, error)
GetLastCrossNotarizedHeadersForAllShards -
func (*BlockTrackerStub) GetLastSelfNotarizedHeader ¶
func (bts *BlockTrackerStub) GetLastSelfNotarizedHeader(shardID uint32) (data.HeaderHandler, []byte, error)
GetLastSelfNotarizedHeader -
func (*BlockTrackerStub) GetSelfNotarizedHeader ¶
func (bts *BlockTrackerStub) GetSelfNotarizedHeader(shardID uint32, offset uint64) (data.HeaderHandler, []byte, error)
GetSelfNotarizedHeader -
func (*BlockTrackerStub) GetTrackedHeaders ¶
func (bts *BlockTrackerStub) GetTrackedHeaders(shardID uint32) ([]data.HeaderHandler, [][]byte)
GetTrackedHeaders -
func (*BlockTrackerStub) GetTrackedHeadersForAllShards ¶
func (bts *BlockTrackerStub) GetTrackedHeadersForAllShards() map[uint32][]data.HeaderHandler
GetTrackedHeadersForAllShards -
func (*BlockTrackerStub) GetTrackedHeadersWithNonce ¶
func (bts *BlockTrackerStub) GetTrackedHeadersWithNonce(shardID uint32, nonce uint64) ([]data.HeaderHandler, [][]byte)
GetTrackedHeadersWithNonce -
func (*BlockTrackerStub) IsInterfaceNil ¶
func (bts *BlockTrackerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*BlockTrackerStub) IsShardStuck ¶
func (bts *BlockTrackerStub) IsShardStuck(shardId uint32) bool
IsShardStuck -
func (*BlockTrackerStub) RegisterCrossNotarizedHeadersHandler ¶
func (bts *BlockTrackerStub) RegisterCrossNotarizedHeadersHandler(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte))
RegisterCrossNotarizedHeadersHandler -
func (*BlockTrackerStub) RegisterFinalMetachainHeadersHandler ¶
func (bts *BlockTrackerStub) RegisterFinalMetachainHeadersHandler(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte))
RegisterFinalMetachainHeadersHandler -
func (*BlockTrackerStub) RegisterSelfNotarizedFromCrossHeadersHandler ¶
func (bts *BlockTrackerStub) RegisterSelfNotarizedFromCrossHeadersHandler(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte))
RegisterSelfNotarizedFromCrossHeadersHandler -
func (*BlockTrackerStub) RegisterSelfNotarizedHeadersHandler ¶
func (bts *BlockTrackerStub) RegisterSelfNotarizedHeadersHandler(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte))
RegisterSelfNotarizedHeadersHandler -
func (*BlockTrackerStub) RemoveLastNotarizedHeaders ¶
func (bts *BlockTrackerStub) RemoveLastNotarizedHeaders()
RemoveLastNotarizedHeaders -
func (*BlockTrackerStub) RestoreToGenesis ¶
func (bts *BlockTrackerStub) RestoreToGenesis()
RestoreToGenesis -
func (*BlockTrackerStub) ShouldAddHeader ¶
func (bts *BlockTrackerStub) ShouldAddHeader(headerHandler data.HeaderHandler) bool
ShouldAddHeader -
func (*BlockTrackerStub) ShouldSkipMiniBlocksCreationFromSelf ¶
func (bts *BlockTrackerStub) 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 }
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(_ int64) error
SaveLastRound -
type CoreComponentsStub ¶
type CoreComponentsStub struct { InternalMarshalizerField marshal.Marshalizer TxMarshalizerField marshal.Marshalizer VmMarshalizerField marshal.Marshalizer HasherField hashing.Hasher TxSignHasherField hashing.Hasher Uint64ByteSliceConverterField typeConverters.Uint64ByteSliceConverter AddressPubKeyConverterField core.PubkeyConverter ValidatorPubKeyConverterField core.PubkeyConverter PathHandlerField storage.PathManagerHandler ChainIdCalled func() string MinTransactionVersionCalled func() uint32 StatusHandlerField core.AppStatusHandler WatchdogField core.WatchdogTimer AlarmSchedulerField core.TimersScheduler SyncTimerField ntp.SyncTimer RoundHandlerField consensus.RoundHandler EconomicsDataField process.EconomicsDataHandler APIEconomicsHandler process.EconomicsDataHandler RatingsDataField process.RatingsInfoHandler RaterField sharding.PeerAccountListAndRatingHandler GenesisNodesSetupField sharding.GenesisNodesSetupHandler NodesShufflerField nodesCoordinator.NodesShuffler EpochNotifierField process.EpochNotifier RoundNotifierField process.RoundNotifier EnableRoundsHandlerField process.EnableRoundsHandler EpochStartNotifierWithConfirmField factory.EpochStartNotifierWithConfirm ChanStopNodeProcessField chan endProcess.ArgEndProcess GenesisTimeField time.Time TxVersionCheckField process.TxVersionCheckerHandler NodeTypeProviderField core.NodeTypeProviderHandler WasmVMChangeLockerInternal common.Locker ProcessStatusHandlerInternal common.ProcessStatusHandler HardforkTriggerPubKeyField []byte EnableEpochsHandlerField common.EnableEpochsHandler }
CoreComponentsStub -
func (*CoreComponentsStub) APIEconomicsData ¶
func (ccs *CoreComponentsStub) APIEconomicsData() process.EconomicsDataHandler
APIEconomicsData -
func (*CoreComponentsStub) AddressPubKeyConverter ¶
func (ccs *CoreComponentsStub) AddressPubKeyConverter() core.PubkeyConverter
AddressPubKeyConverter -
func (*CoreComponentsStub) AlarmScheduler ¶
func (ccs *CoreComponentsStub) AlarmScheduler() core.TimersScheduler
AlarmScheduler -
func (*CoreComponentsStub) ChanStopNodeProcess ¶
func (ccs *CoreComponentsStub) ChanStopNodeProcess() chan endProcess.ArgEndProcess
ChanStopNodeProcess -
func (*CoreComponentsStub) CheckSubcomponents ¶
func (ccs *CoreComponentsStub) CheckSubcomponents() error
CheckSubcomponents -
func (*CoreComponentsStub) EconomicsData ¶
func (ccs *CoreComponentsStub) EconomicsData() process.EconomicsDataHandler
EconomicsData -
func (*CoreComponentsStub) EnableEpochsHandler ¶
func (ccs *CoreComponentsStub) EnableEpochsHandler() common.EnableEpochsHandler
EnableEpochsHandler -
func (*CoreComponentsStub) EnableRoundsHandler ¶
func (ccs *CoreComponentsStub) EnableRoundsHandler() process.EnableRoundsHandler
EnableRoundsHandler -
func (*CoreComponentsStub) EncodedAddressLen ¶
func (ccs *CoreComponentsStub) EncodedAddressLen() uint32
EncodedAddressLen -
func (*CoreComponentsStub) EpochNotifier ¶
func (ccs *CoreComponentsStub) EpochNotifier() process.EpochNotifier
EpochNotifier -
func (*CoreComponentsStub) EpochStartNotifierWithConfirm ¶
func (ccs *CoreComponentsStub) EpochStartNotifierWithConfirm() factory.EpochStartNotifierWithConfirm
EpochStartNotifierWithConfirm -
func (*CoreComponentsStub) GenesisNodesSetup ¶
func (ccs *CoreComponentsStub) GenesisNodesSetup() sharding.GenesisNodesSetupHandler
GenesisNodesSetup -
func (*CoreComponentsStub) GenesisTime ¶
func (ccs *CoreComponentsStub) GenesisTime() time.Time
GenesisTime -
func (*CoreComponentsStub) HardforkTriggerPubKey ¶
func (ccs *CoreComponentsStub) HardforkTriggerPubKey() []byte
HardforkTriggerPubKey -
func (*CoreComponentsStub) InternalMarshalizer ¶
func (ccs *CoreComponentsStub) InternalMarshalizer() marshal.Marshalizer
InternalMarshalizer -
func (*CoreComponentsStub) IsInterfaceNil ¶
func (ccs *CoreComponentsStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*CoreComponentsStub) MinTransactionVersion ¶
func (ccs *CoreComponentsStub) MinTransactionVersion() uint32
MinTransactionVersion -
func (*CoreComponentsStub) NodeTypeProvider ¶
func (ccs *CoreComponentsStub) NodeTypeProvider() core.NodeTypeProviderHandler
NodeTypeProvider -
func (*CoreComponentsStub) NodesShuffler ¶
func (ccs *CoreComponentsStub) NodesShuffler() nodesCoordinator.NodesShuffler
NodesShuffler -
func (*CoreComponentsStub) PathHandler ¶
func (ccs *CoreComponentsStub) PathHandler() storage.PathManagerHandler
PathHandler -
func (*CoreComponentsStub) ProcessStatusHandler ¶
func (ccs *CoreComponentsStub) ProcessStatusHandler() common.ProcessStatusHandler
ProcessStatusHandler -
func (*CoreComponentsStub) Rater ¶
func (ccs *CoreComponentsStub) Rater() sharding.PeerAccountListAndRatingHandler
Rater -
func (*CoreComponentsStub) RatingsData ¶
func (ccs *CoreComponentsStub) RatingsData() process.RatingsInfoHandler
RatingsData -
func (*CoreComponentsStub) RoundHandler ¶
func (ccs *CoreComponentsStub) RoundHandler() consensus.RoundHandler
RoundHandler -
func (*CoreComponentsStub) RoundNotifier ¶ added in v1.6.0
func (ccs *CoreComponentsStub) RoundNotifier() process.RoundNotifier
RoundNotifier -
func (*CoreComponentsStub) SetInternalMarshalizer ¶
func (ccs *CoreComponentsStub) SetInternalMarshalizer(m marshal.Marshalizer) error
SetInternalMarshalizer -
func (*CoreComponentsStub) SyncTimer ¶
func (ccs *CoreComponentsStub) SyncTimer() ntp.SyncTimer
SyncTimer -
func (*CoreComponentsStub) TxMarshalizer ¶
func (ccs *CoreComponentsStub) TxMarshalizer() marshal.Marshalizer
TxMarshalizer -
func (*CoreComponentsStub) TxSignHasher ¶
func (ccs *CoreComponentsStub) TxSignHasher() hashing.Hasher
TxSignHasher -
func (*CoreComponentsStub) TxVersionChecker ¶
func (ccs *CoreComponentsStub) TxVersionChecker() process.TxVersionCheckerHandler
TxVersionChecker -
func (*CoreComponentsStub) Uint64ByteSliceConverter ¶
func (ccs *CoreComponentsStub) Uint64ByteSliceConverter() typeConverters.Uint64ByteSliceConverter
Uint64ByteSliceConverter -
func (*CoreComponentsStub) ValidatorPubKeyConverter ¶
func (ccs *CoreComponentsStub) ValidatorPubKeyConverter() core.PubkeyConverter
ValidatorPubKeyConverter -
func (*CoreComponentsStub) VmMarshalizer ¶
func (ccs *CoreComponentsStub) VmMarshalizer() marshal.Marshalizer
VmMarshalizer -
func (*CoreComponentsStub) WasmVMChangeLocker ¶
func (ccs *CoreComponentsStub) WasmVMChangeLocker() common.Locker
WasmVMChangeLocker -
func (*CoreComponentsStub) Watchdog ¶
func (ccs *CoreComponentsStub) Watchdog() core.WatchdogTimer
Watchdog -
type CryptoComponentsStub ¶
type CryptoComponentsStub struct { PubKey crypto.PublicKey PublicKeyCalled func() crypto.PublicKey PrivKey crypto.PrivateKey P2pPubKey crypto.PublicKey P2pPrivKey crypto.PrivateKey PubKeyBytes []byte PubKeyString string BlockSig crypto.SingleSigner TxSig crypto.SingleSigner P2pSig crypto.SingleSigner MultiSigContainer cryptoCommon.MultiSignerContainer PeerSignHandler crypto.PeerSignatureHandler BlKeyGen crypto.KeyGenerator TxKeyGen crypto.KeyGenerator P2PKeyGen crypto.KeyGenerator MsgSigVerifier vm.MessageSignVerifier ManagedPeersHolderField common.ManagedPeersHolder KeysHandlerField consensus.KeysHandler KeysHandlerCalled func() consensus.KeysHandler SigHandler consensus.SigningHandler // contains filtered or unexported fields }
CryptoComponentsStub -
func (*CryptoComponentsStub) BlockSignKeyGen ¶
func (ccs *CryptoComponentsStub) BlockSignKeyGen() crypto.KeyGenerator
BlockSignKeyGen -
func (*CryptoComponentsStub) BlockSigner ¶
func (ccs *CryptoComponentsStub) BlockSigner() crypto.SingleSigner
BlockSigner -
func (*CryptoComponentsStub) CheckSubcomponents ¶
func (ccs *CryptoComponentsStub) CheckSubcomponents() error
CheckSubcomponents -
func (*CryptoComponentsStub) ConsensusSigningHandler ¶ added in v1.6.0
func (ccs *CryptoComponentsStub) ConsensusSigningHandler() consensus.SigningHandler
ConsensusSigningHandler -
func (*CryptoComponentsStub) GetMultiSigner ¶
func (ccs *CryptoComponentsStub) GetMultiSigner(epoch uint32) (crypto.MultiSigner, error)
GetMultiSigner -
func (*CryptoComponentsStub) IsInterfaceNil ¶
func (ccs *CryptoComponentsStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*CryptoComponentsStub) KeysHandler ¶ added in v1.6.0
func (ccs *CryptoComponentsStub) KeysHandler() consensus.KeysHandler
KeysHandler -
func (*CryptoComponentsStub) ManagedPeersHolder ¶ added in v1.6.0
func (ccs *CryptoComponentsStub) ManagedPeersHolder() common.ManagedPeersHolder
ManagedPeersHolder -
func (*CryptoComponentsStub) MessageSignVerifier ¶
func (ccs *CryptoComponentsStub) MessageSignVerifier() vm.MessageSignVerifier
MessageSignVerifier -
func (*CryptoComponentsStub) MultiSignerContainer ¶
func (ccs *CryptoComponentsStub) MultiSignerContainer() cryptoCommon.MultiSignerContainer
MultiSignerContainer -
func (*CryptoComponentsStub) P2pKeyGen ¶
func (ccs *CryptoComponentsStub) P2pKeyGen() crypto.KeyGenerator
P2pKeyGen -
func (*CryptoComponentsStub) P2pPrivateKey ¶
func (ccs *CryptoComponentsStub) P2pPrivateKey() crypto.PrivateKey
P2pPrivateKey -
func (*CryptoComponentsStub) P2pPublicKey ¶
func (ccs *CryptoComponentsStub) P2pPublicKey() crypto.PublicKey
P2pPublicKey -
func (*CryptoComponentsStub) P2pSingleSigner ¶
func (ccs *CryptoComponentsStub) P2pSingleSigner() crypto.SingleSigner
P2pSingleSigner -
func (*CryptoComponentsStub) PeerSignatureHandler ¶
func (ccs *CryptoComponentsStub) PeerSignatureHandler() crypto.PeerSignatureHandler
PeerSignatureHandler -
func (*CryptoComponentsStub) PrivateKey ¶
func (ccs *CryptoComponentsStub) PrivateKey() crypto.PrivateKey
PrivateKey -
func (*CryptoComponentsStub) PublicKey ¶
func (ccs *CryptoComponentsStub) PublicKey() crypto.PublicKey
PublicKey -
func (*CryptoComponentsStub) PublicKeyBytes ¶
func (ccs *CryptoComponentsStub) PublicKeyBytes() []byte
PublicKeyBytes -
func (*CryptoComponentsStub) PublicKeyString ¶
func (ccs *CryptoComponentsStub) PublicKeyString() string
PublicKeyString -
func (*CryptoComponentsStub) SetMultiSignerContainer ¶
func (ccs *CryptoComponentsStub) SetMultiSignerContainer(ms cryptoCommon.MultiSignerContainer) error
SetMultiSignerContainer -
func (*CryptoComponentsStub) TxSignKeyGen ¶
func (ccs *CryptoComponentsStub) TxSignKeyGen() crypto.KeyGenerator
TxSignKeyGen -
func (*CryptoComponentsStub) TxSingleSigner ¶
func (ccs *CryptoComponentsStub) TxSingleSigner() crypto.SingleSigner
TxSingleSigner -
type CurrentNetworkEpochProviderStub ¶
type CurrentNetworkEpochProviderStub struct { SetNetworkEpochAtBootstrapCalled func(epoch uint32) EpochIsActiveInNetworkCalled func(epoch uint32) bool EpochConfirmedCalled func(epoch uint32, timestamp uint64) }
CurrentNetworkEpochProviderStub -
func (*CurrentNetworkEpochProviderStub) EpochConfirmed ¶
func (cneps *CurrentNetworkEpochProviderStub) EpochConfirmed(epoch uint32, timestamp uint64)
EpochConfirmed -
func (*CurrentNetworkEpochProviderStub) EpochIsActiveInNetwork ¶
func (cneps *CurrentNetworkEpochProviderStub) EpochIsActiveInNetwork(epoch uint32) bool
EpochIsActiveInNetwork -
func (*CurrentNetworkEpochProviderStub) IsInterfaceNil ¶
func (cneps *CurrentNetworkEpochProviderStub) IsInterfaceNil() bool
IsInterfaceNil -
type DataComponentsStub ¶
type DataComponentsStub struct { BlockChain data.ChainHandler Store dataRetriever.StorageService DataPool dataRetriever.PoolsHolder MbProvider factory.MiniBlockProvider EconomicsData factory.EconomicsHandler // contains filtered or unexported fields }
DataComponentsStub -
func (*DataComponentsStub) Blockchain ¶
func (dcs *DataComponentsStub) Blockchain() data.ChainHandler
Blockchain -
func (*DataComponentsStub) CheckSubcomponents ¶
func (dcs *DataComponentsStub) CheckSubcomponents() error
CheckSubcomponents -
func (*DataComponentsStub) Datapool ¶
func (dcs *DataComponentsStub) Datapool() dataRetriever.PoolsHolder
Datapool -
func (*DataComponentsStub) EconomicsHandler ¶
func (dcs *DataComponentsStub) EconomicsHandler() factory.EconomicsHandler
EconomicsHandler -
func (*DataComponentsStub) IsInterfaceNil ¶
func (dcs *DataComponentsStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*DataComponentsStub) MiniBlocksProvider ¶
func (dcs *DataComponentsStub) MiniBlocksProvider() factory.MiniBlockProvider
MiniBlocksProvider -
func (*DataComponentsStub) SetBlockchain ¶
func (dcs *DataComponentsStub) SetBlockchain(chain data.ChainHandler) error
SetBlockchain -
func (*DataComponentsStub) StorageService ¶
func (dcs *DataComponentsStub) 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) NotifyEpochChangeConfirmedCalled func(epoch uint32) // contains filtered or unexported fields }
EpochStartNotifierStub -
func (*EpochStartNotifierStub) IsInterfaceNil ¶
func (esnm *EpochStartNotifierStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*EpochStartNotifierStub) NotifyAll ¶
func (esnm *EpochStartNotifierStub) NotifyAll(hdr data.HeaderHandler)
NotifyAll -
func (*EpochStartNotifierStub) NotifyAllPrepare ¶
func (esnm *EpochStartNotifierStub) NotifyAllPrepare(metaHdr data.HeaderHandler, body data.BodyHandler)
NotifyAllPrepare -
func (*EpochStartNotifierStub) NotifyEpochChangeConfirmed ¶
func (esnm *EpochStartNotifierStub) NotifyEpochChangeConfirmed(epoch uint32)
NotifyEpochChangeConfirmed -
func (*EpochStartNotifierStub) 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(round uint64) 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 }
EpochStartTriggerStub -
func (*EpochStartTriggerStub) EpochFinalityAttestingRound ¶
func (e *EpochStartTriggerStub) EpochFinalityAttestingRound() uint64
EpochFinalityAttestingRound -
func (*EpochStartTriggerStub) EpochStartMetaHdrHash ¶
func (e *EpochStartTriggerStub) EpochStartMetaHdrHash() []byte
EpochStartMetaHdrHash -
func (*EpochStartTriggerStub) EpochStartRound ¶
func (e *EpochStartTriggerStub) EpochStartRound() uint64
EpochStartRound -
func (*EpochStartTriggerStub) ForceEpochStart ¶
func (e *EpochStartTriggerStub) ForceEpochStart(round uint64)
ForceEpochStart -
func (*EpochStartTriggerStub) GetRoundsPerEpoch ¶
func (e *EpochStartTriggerStub) GetRoundsPerEpoch() uint64
GetRoundsPerEpoch -
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) ReceivedHeader ¶
func (e *EpochStartTriggerStub) ReceivedHeader(header data.HeaderHandler)
ReceivedHeader -
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) SetEpoch ¶
func (e *EpochStartTriggerStub) SetEpoch(_ uint32)
SetEpoch -
func (*EpochStartTriggerStub) SetFinalityAttestingRound ¶
func (e *EpochStartTriggerStub) SetFinalityAttestingRound(_ uint64)
SetFinalityAttestingRound -
func (*EpochStartTriggerStub) SetMinRoundsBetweenEpochs ¶
func (e *EpochStartTriggerStub) SetMinRoundsBetweenEpochs(_ uint64)
SetMinRoundsBetweenEpochs -
func (*EpochStartTriggerStub) SetProcessed ¶
func (e *EpochStartTriggerStub) SetProcessed(header data.HeaderHandler, _ data.BodyHandler)
SetProcessed -
func (*EpochStartTriggerStub) SetRoundsPerEpoch ¶
func (e *EpochStartTriggerStub) SetRoundsPerEpoch(_ uint64)
SetRoundsPerEpoch -
func (*EpochStartTriggerStub) SetTrigger ¶
func (e *EpochStartTriggerStub) SetTrigger(_ epochStart.TriggerHandler)
SetTrigger -
func (*EpochStartTriggerStub) Update ¶
func (e *EpochStartTriggerStub) Update(round uint64, nonce uint64)
Update -
type ExportFactoryHandlerStub ¶
type ExportFactoryHandlerStub struct {
CreateCalled func() (update.ExportHandler, error)
}
ExportFactoryHandlerStub -
func (*ExportFactoryHandlerStub) Create ¶
func (e *ExportFactoryHandlerStub) Create() (update.ExportHandler, error)
Create -
func (*ExportFactoryHandlerStub) IsInterfaceNil ¶
func (e *ExportFactoryHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
type ExportHandlerStub ¶
ExportHandlerStub -
func (*ExportHandlerStub) ExportAll ¶
func (e *ExportHandlerStub) ExportAll(epoch uint32) error
ExportAll -
func (*ExportHandlerStub) IsInterfaceNil ¶
func (e *ExportHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
type ForkDetectorStub ¶
type ForkDetectorStub 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 RestoreToGenesisCalled func() SetRollBackNonceCalled func(nonce uint64) ResetProbableHighestNonceCalled func() SetFinalToLastCheckpointCalled func() }
ForkDetectorStub is a mock implementation for the ForkDetector interface
func (*ForkDetectorStub) AddHeader ¶
func (fdm *ForkDetectorStub) AddHeader( header data.HeaderHandler, hash []byte, state process.BlockHeaderState, selfNotarizedHeaders []data.HeaderHandler, selfNotarizedHeadersHashes [][]byte, ) error
AddHeader is a mock implementation for AddHeader
func (*ForkDetectorStub) CheckFork ¶
func (fdm *ForkDetectorStub) CheckFork() *process.ForkInfo
CheckFork is a mock implementation for CheckFork
func (*ForkDetectorStub) GetHighestFinalBlockHash ¶
func (fdm *ForkDetectorStub) GetHighestFinalBlockHash() []byte
GetHighestFinalBlockHash -
func (*ForkDetectorStub) GetHighestFinalBlockNonce ¶
func (fdm *ForkDetectorStub) GetHighestFinalBlockNonce() uint64
GetHighestFinalBlockNonce is a mock implementation for GetHighestFinalBlockNonce
func (*ForkDetectorStub) GetNotarizedHeaderHash ¶
func (fdm *ForkDetectorStub) GetNotarizedHeaderHash(nonce uint64) []byte
GetNotarizedHeaderHash -
func (*ForkDetectorStub) IsInterfaceNil ¶
func (fdm *ForkDetectorStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ForkDetectorStub) ProbableHighestNonce ¶
func (fdm *ForkDetectorStub) ProbableHighestNonce() uint64
ProbableHighestNonce is a mock implementation for ProbableHighestNonce
func (*ForkDetectorStub) RemoveHeader ¶
func (fdm *ForkDetectorStub) RemoveHeader(nonce uint64, hash []byte)
RemoveHeader is a mock implementation for RemoveHeader
func (*ForkDetectorStub) ResetProbableHighestNonce ¶
func (fdm *ForkDetectorStub) ResetProbableHighestNonce()
ResetProbableHighestNonce -
func (*ForkDetectorStub) RestoreToGenesis ¶
func (fdm *ForkDetectorStub) RestoreToGenesis()
RestoreToGenesis -
func (*ForkDetectorStub) SetFinalToLastCheckpoint ¶
func (fdm *ForkDetectorStub) SetFinalToLastCheckpoint()
SetFinalToLastCheckpoint -
func (*ForkDetectorStub) SetRollBackNonce ¶
func (fdm *ForkDetectorStub) SetRollBackNonce(nonce uint64)
SetRollBackNonce -
type GasHandlerMock ¶
type GasHandlerMock struct { InitCalled func() SetGasProvidedCalled func(gasProvided uint64, hash []byte) SetGasRefundedCalled func(gasRefunded uint64, hash []byte) SetGasPenalizedCalled func(gasPenalized uint64, hash []byte) GasProvidedCalled func(hash []byte) uint64 GasRefundedCalled func(hash []byte) uint64 GasPenalizedCalled func(hash []byte) uint64 TotalGasProvidedCalled func() uint64 TotalGasProvidedWithScheduledCalled func() uint64 TotalGasRefundedCalled func() uint64 TotalGasPenalizedCalled func() uint64 RemoveGasProvidedCalled func(hashes [][]byte) RemoveGasRefundedCalled func(hashes [][]byte) RemoveGasPenalizedCalled func(hashes [][]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) 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) RemoveGasRefunded ¶
func (ghm *GasHandlerMock) RemoveGasRefunded(hashes [][]byte)
RemoveGasRefunded -
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) 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) TotalGasProvidedWithScheduled ¶
func (ghm *GasHandlerMock) TotalGasProvidedWithScheduled() uint64
TotalGasProvidedWithScheduled -
func (*GasHandlerMock) TotalGasRefunded ¶
func (ghm *GasHandlerMock) TotalGasRefunded() uint64
TotalGasRefunded -
type GasScheduleNotifierMock ¶
type GasScheduleNotifierMock struct { GasSchedule map[string]map[string]uint64 Handlers []core.GasScheduleSubscribeHandler }
GasScheduleNotifierMock -
func NewGasScheduleNotifierMock ¶
func NewGasScheduleNotifierMock(gasSchedule map[string]map[string]uint64) *GasScheduleNotifierMock
NewGasScheduleNotifierMock -
func (*GasScheduleNotifierMock) ChangeGasSchedule ¶
func (g *GasScheduleNotifierMock) ChangeGasSchedule(gasSchedule map[string]map[string]uint64)
ChangeGasSchedule -
func (*GasScheduleNotifierMock) IsInterfaceNil ¶
func (g *GasScheduleNotifierMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*GasScheduleNotifierMock) LatestGasSchedule ¶
func (g *GasScheduleNotifierMock) LatestGasSchedule() map[string]map[string]uint64
LatestGasSchedule -
func (*GasScheduleNotifierMock) RegisterNotifyHandler ¶
func (g *GasScheduleNotifierMock) RegisterNotifyHandler(handler core.GasScheduleSubscribeHandler)
RegisterNotifyHandler -
func (*GasScheduleNotifierMock) UnRegisterAll ¶
func (g *GasScheduleNotifierMock) UnRegisterAll()
UnRegisterAll -
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 { VerifyRandSeedAndLeaderSignatureCalled func(header data.HeaderHandler) error VerifySignatureCalled func(header data.HeaderHandler) error VerifyRandSeedCalled func(header data.HeaderHandler) error VerifyLeaderSignatureCalled 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 HeaderValidatorStub ¶
type HeaderValidatorStub struct {
IsHeaderConstructionValidCalled func(currHdr, prevHdr data.HeaderHandler) error
}
HeaderValidatorStub -
func (*HeaderValidatorStub) IsHeaderConstructionValid ¶
func (hvs *HeaderValidatorStub) IsHeaderConstructionValid(currHdr, prevHdr data.HeaderHandler) error
IsHeaderConstructionValid -
func (*HeaderValidatorStub) IsInterfaceNil ¶
func (hvs *HeaderValidatorStub) IsInterfaceNil() bool
IsInterfaceNil returns if underlying object is true
type HeadersCacherStub ¶
type HeadersCacherStub struct { AddCalled func(headerHash []byte, header data.HeaderHandler) RemoveHeaderByHashCalled func(headerHash []byte) RemoveHeaderByNonceAndShardIdCalled func(hdrNonce uint64, shardId uint32) GetHeaderByNonceAndShardIdCalled func(hdrNonce uint64, shardId uint32) ([]data.HeaderHandler, [][]byte, error) GetHeaderByHashCalled func(hash []byte) (data.HeaderHandler, error) ClearCalled func() KeysCalled func(shardId uint32) []uint64 LenCalled func() int MaxSizeCalled func() int RegisterHandlerCalled func(handler func(headerHandler data.HeaderHandler, headerHash []byte)) GetNumHeadersCalled func(shardId uint32) int NoncesCalled func(shardId uint32) []uint64 }
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 ¶ added in v1.6.0
func (hcs *HeadersCacherStub) GetNumHeaders(shardId uint32) int
GetNumHeaders -
func (*HeadersCacherStub) IsInterfaceNil ¶
func (hcs *HeadersCacherStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*HeadersCacherStub) Nonces ¶ added in v1.6.0
func (hcs *HeadersCacherStub) Nonces(shardId uint32) []uint64
Nonces -
func (*HeadersCacherStub) RegisterHandler ¶
func (hcs *HeadersCacherStub) RegisterHandler(handler func(headerHandler data.HeaderHandler, headerHash []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 HeartbeatMonitorStub ¶
type HeartbeatMonitorStub struct {
GetHeartbeatsCalled func() []heartbeatData.PubKeyHeartbeat
}
HeartbeatMonitorStub -
func (*HeartbeatMonitorStub) GetHeartbeats ¶
func (hbms *HeartbeatMonitorStub) GetHeartbeats() []heartbeatData.PubKeyHeartbeat
GetHeartbeats -
func (*HeartbeatMonitorStub) IsInterfaceNil ¶
func (hbms *HeartbeatMonitorStub) IsInterfaceNil() bool
IsInterfaceNil -
type ImportStartHandlerStub ¶
type ImportStartHandlerStub struct { SetStartImportCalled func() error ResetStartImportCalled func() error ShouldStartImportCalled func() bool IsAfterExportBeforeImportCalled func() bool }
ImportStartHandlerStub -
func (*ImportStartHandlerStub) IsAfterExportBeforeImport ¶
func (ish *ImportStartHandlerStub) IsAfterExportBeforeImport() bool
IsAfterExportBeforeImport -
func (*ImportStartHandlerStub) IsInterfaceNil ¶
func (ish *ImportStartHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*ImportStartHandlerStub) ResetStartImport ¶
func (ish *ImportStartHandlerStub) ResetStartImport() error
ResetStartImport -
func (*ImportStartHandlerStub) SetStartImport ¶
func (ish *ImportStartHandlerStub) SetStartImport() error
SetStartImport -
func (*ImportStartHandlerStub) ShouldStartImport ¶
func (ish *ImportStartHandlerStub) ShouldStartImport() bool
ShouldStartImport -
type 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 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) // contains filtered or unexported fields }
IntermediateTransactionHandlerMock -
func (*IntermediateTransactionHandlerMock) AddIntermediateTransactions ¶
func (ith *IntermediateTransactionHandlerMock) AddIntermediateTransactions(txs []data.TransactionHandler) error
AddIntermediateTransactions -
func (*IntermediateTransactionHandlerMock) Clean ¶
func (ith *IntermediateTransactionHandlerMock) Clean()
Clean -
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 KeyGenMock ¶
type KeyGenMock struct { }
KeyGenMock -
func (*KeyGenMock) CheckPublicKeyValid ¶
func (keyGen *KeyGenMock) CheckPublicKeyValid(_ []byte) error
CheckPublicKeyValid -
func (*KeyGenMock) GeneratePair ¶
func (keyGen *KeyGenMock) GeneratePair() (crypto.PrivateKey, crypto.PublicKey)
GeneratePair -
func (*KeyGenMock) IsInterfaceNil ¶
func (keyGen *KeyGenMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*KeyGenMock) PrivateKeyFromByteArray ¶
func (keyGen *KeyGenMock) PrivateKeyFromByteArray(buff []byte) (crypto.PrivateKey, error)
PrivateKeyFromByteArray -
func (*KeyGenMock) PublicKeyFromByteArray ¶
func (keyGen *KeyGenMock) PublicKeyFromByteArray(buff []byte) (crypto.PublicKey, error)
PublicKeyFromByteArray -
type LatestStorageDataProviderStub ¶
type LatestStorageDataProviderStub struct { GetCalled func() (storage.LatestDataFromStorage, error) GetParentDirAndLastEpochCalled func() (string, uint32, error) GetShardsFromDirectoryCalled func(path string) ([]string, error) GetParentDirectoryCalled func() string }
LatestStorageDataProviderStub -
func (*LatestStorageDataProviderStub) Get ¶
func (l *LatestStorageDataProviderStub) Get() (storage.LatestDataFromStorage, error)
Get -
func (*LatestStorageDataProviderStub) GetParentDirAndLastEpoch ¶
func (l *LatestStorageDataProviderStub) GetParentDirAndLastEpoch() (string, uint32, error)
GetParentDirAndLastEpoch -
func (*LatestStorageDataProviderStub) GetParentDirectory ¶
func (l *LatestStorageDataProviderStub) GetParentDirectory() string
GetParentDirectory -
func (*LatestStorageDataProviderStub) GetShardsFromDirectory ¶
func (l *LatestStorageDataProviderStub) GetShardsFromDirectory(path string) ([]string, error)
GetShardsFromDirectory --
func (*LatestStorageDataProviderStub) IsInterfaceNil ¶
func (l *LatestStorageDataProviderStub) IsInterfaceNil() bool
IsInterfaceNil --
type ListIndexUpdaterStub ¶
type ListIndexUpdaterStub struct {
UpdateListAndIndexCalled func(pubKey string, shardID uint32, list string, index uint32) error
}
ListIndexUpdaterStub -
func (*ListIndexUpdaterStub) IsInterfaceNil ¶
func (lius *ListIndexUpdaterStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ListIndexUpdaterStub) UpdateListAndIndex ¶
func (lius *ListIndexUpdaterStub) UpdateListAndIndex(pubKey string, shardID uint32, list string, index uint32) error
UpdateListAndIndex -
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 MockDB ¶
type MockDB struct { }
MockDB -
func (MockDB) IsInterfaceNil ¶
IsInterfaceNil returns true if there is no value under the interface
type NetworkComponentsStub ¶
type NetworkComponentsStub struct { Messenger p2p.Messenger MessengerCalled func() p2p.Messenger InputAntiFlood factory.P2PAntifloodHandler OutputAntiFlood factory.P2PAntifloodHandler PeerBlackList process.PeerBlackListCacher PeerHonesty factory.PeerHonestyHandler PreferredPeersHolder factory.PreferredPeersHolderHandler PeersRatingHandlerField p2p.PeersRatingHandler PeersRatingMonitorField p2p.PeersRatingMonitor FullArchiveNetworkMessengerField p2p.Messenger FullArchivePreferredPeersHolder factory.PreferredPeersHolderHandler }
NetworkComponentsStub -
func (*NetworkComponentsStub) CheckSubcomponents ¶
func (ncs *NetworkComponentsStub) CheckSubcomponents() error
CheckSubcomponents -
func (*NetworkComponentsStub) FullArchiveNetworkMessenger ¶ added in v1.6.0
func (ncs *NetworkComponentsStub) FullArchiveNetworkMessenger() p2p.Messenger
FullArchiveNetworkMessenger -
func (*NetworkComponentsStub) FullArchivePreferredPeersHolderHandler ¶ added in v1.6.0
func (ncs *NetworkComponentsStub) FullArchivePreferredPeersHolderHandler() factory.PreferredPeersHolderHandler
FullArchivePreferredPeersHolderHandler -
func (*NetworkComponentsStub) InputAntiFloodHandler ¶
func (ncs *NetworkComponentsStub) InputAntiFloodHandler() factory.P2PAntifloodHandler
InputAntiFloodHandler -
func (*NetworkComponentsStub) IsInterfaceNil ¶
func (ncs *NetworkComponentsStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*NetworkComponentsStub) NetworkMessenger ¶
func (ncs *NetworkComponentsStub) NetworkMessenger() p2p.Messenger
NetworkMessenger -
func (*NetworkComponentsStub) OutputAntiFloodHandler ¶
func (ncs *NetworkComponentsStub) OutputAntiFloodHandler() factory.P2PAntifloodHandler
OutputAntiFloodHandler -
func (*NetworkComponentsStub) PeerBlackListHandler ¶
func (ncs *NetworkComponentsStub) PeerBlackListHandler() process.PeerBlackListCacher
PeerBlackListHandler -
func (*NetworkComponentsStub) PeerHonestyHandler ¶
func (ncs *NetworkComponentsStub) PeerHonestyHandler() factory.PeerHonestyHandler
PeerHonestyHandler -
func (*NetworkComponentsStub) PeersRatingHandler ¶
func (ncs *NetworkComponentsStub) PeersRatingHandler() p2p.PeersRatingHandler
PeersRatingHandler -
func (*NetworkComponentsStub) PeersRatingMonitor ¶ added in v1.6.0
func (ncs *NetworkComponentsStub) PeersRatingMonitor() p2p.PeersRatingMonitor
PeersRatingMonitor -
func (*NetworkComponentsStub) PreferredPeersHolderHandler ¶
func (ncs *NetworkComponentsStub) PreferredPeersHolderHandler() factory.PreferredPeersHolderHandler
PreferredPeersHolderHandler -
func (*NetworkComponentsStub) PubKeyCacher ¶
func (ncs *NetworkComponentsStub) PubKeyCacher() process.TimeCacher
PubKeyCacher -
type NilAntifloodHandler ¶
type NilAntifloodHandler struct { }
NilAntifloodHandler is an empty implementation of P2PAntifloodHandler it does nothing
func (*NilAntifloodHandler) ApplyConsensusSize ¶
func (nah *NilAntifloodHandler) ApplyConsensusSize(_ int)
ApplyConsensusSize does nothing
func (*NilAntifloodHandler) BlacklistPeer ¶
BlacklistPeer does nothing
func (*NilAntifloodHandler) CanProcessMessage ¶
func (nah *NilAntifloodHandler) CanProcessMessage(_ p2p.MessageP2P, _ core.PeerID) error
CanProcessMessage will always return nil, allowing messages to go to interceptors
func (*NilAntifloodHandler) CanProcessMessagesOnTopic ¶
func (nah *NilAntifloodHandler) CanProcessMessagesOnTopic(_ core.PeerID, _ string, _ uint32, _ uint64, _ []byte) error
CanProcessMessagesOnTopic will always return nil, allowing messages to go to interceptors
func (*NilAntifloodHandler) Close ¶
func (nah *NilAntifloodHandler) Close() error
Close does nothing
func (*NilAntifloodHandler) IsInterfaceNil ¶
func (nah *NilAntifloodHandler) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*NilAntifloodHandler) IsOriginatorEligibleForTopic ¶
func (nah *NilAntifloodHandler) IsOriginatorEligibleForTopic(_ core.PeerID, _ string) error
IsOriginatorEligibleForTopic returns nil
func (*NilAntifloodHandler) ResetForTopic ¶
func (nah *NilAntifloodHandler) ResetForTopic(_ string)
ResetForTopic won't do anything
func (*NilAntifloodHandler) SetDebugger ¶
func (nah *NilAntifloodHandler) SetDebugger(_ process.AntifloodDebugger) error
SetDebugger returns nil
func (*NilAntifloodHandler) SetMaxMessagesForTopic ¶
func (nah *NilAntifloodHandler) SetMaxMessagesForTopic(_ string, _ uint32)
SetMaxMessagesForTopic won't do anything
func (*NilAntifloodHandler) SetPeerValidatorMapper ¶
func (nah *NilAntifloodHandler) SetPeerValidatorMapper(_ process.PeerValidatorMapper) error
SetPeerValidatorMapper -
func (*NilAntifloodHandler) SetTopicsForAll ¶
func (nah *NilAntifloodHandler) SetTopicsForAll(_ ...string)
SetTopicsForAll -
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 NodesCoordinatorCacheStub ¶
type NodesCoordinatorCacheStub struct { PutCalled func(key []byte, value interface{}) (evicted bool) GetCalled func(key []byte) (value interface{}, ok bool) }
NodesCoordinatorCacheStub -
func (*NodesCoordinatorCacheStub) Get ¶
func (rm *NodesCoordinatorCacheStub) Get(key []byte) (value interface{}, ok bool)
Get -
func (*NodesCoordinatorCacheStub) Put ¶
func (rm *NodesCoordinatorCacheStub) Put(key []byte, value interface{}) (evicted bool)
Put -
type OneSCExecutorMockVM ¶
type OneSCExecutorMockVM struct { GasForOperation uint64 // contains filtered or unexported fields }
OneSCExecutorMockVM contains one hardcoded SC with the following behaviour (written in golang): ------------------------------------- var a int
func init(initial int){ a = initial }
func Add(value int){ a += value }
func Get() int{ return a }
-------------------------------------
func NewOneSCExecutorMockVM ¶
func NewOneSCExecutorMockVM(blockchainHook vmcommon.BlockchainHook, hasher hashing.Hasher) (*OneSCExecutorMockVM, error)
NewOneSCExecutorMockVM -
func (*OneSCExecutorMockVM) GasScheduleChange ¶
func (vm *OneSCExecutorMockVM) GasScheduleChange(_ map[string]map[string]uint64)
GasScheduleChange -
func (*OneSCExecutorMockVM) GetVersion ¶
func (vm *OneSCExecutorMockVM) GetVersion() string
GetVersion -
func (*OneSCExecutorMockVM) IsInterfaceNil ¶
func (vm *OneSCExecutorMockVM) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*OneSCExecutorMockVM) RunSmartContractCall ¶
func (vm *OneSCExecutorMockVM) RunSmartContractCall(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error)
RunSmartContractCall -
func (*OneSCExecutorMockVM) RunSmartContractCreate ¶
func (vm *OneSCExecutorMockVM) RunSmartContractCreate(input *vmcommon.ContractCreateInput) (*vmcommon.VMOutput, error)
RunSmartContractCreate -
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 SetPeerValidatorMapperCalled func(validatorMapper process.PeerValidatorMapper) error }
P2PAntifloodHandlerStub -
func (*P2PAntifloodHandlerStub) ApplyConsensusSize ¶
func (stub *P2PAntifloodHandlerStub) ApplyConsensusSize(size int)
ApplyConsensusSize -
func (*P2PAntifloodHandlerStub) BlacklistPeer ¶
func (stub *P2PAntifloodHandlerStub) BlacklistPeer(peer core.PeerID, reason string, duration time.Duration)
BlacklistPeer -
func (*P2PAntifloodHandlerStub) CanProcessMessage ¶
func (stub *P2PAntifloodHandlerStub) CanProcessMessage(message p2p.MessageP2P, fromConnectedPeer core.PeerID) error
CanProcessMessage -
func (*P2PAntifloodHandlerStub) CanProcessMessagesOnTopic ¶
func (stub *P2PAntifloodHandlerStub) CanProcessMessagesOnTopic(peer core.PeerID, topic string, numMessages uint32, totalSize uint64, sequence []byte) error
CanProcessMessagesOnTopic -
func (*P2PAntifloodHandlerStub) IsInterfaceNil ¶
func (stub *P2PAntifloodHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*P2PAntifloodHandlerStub) IsOriginatorEligibleForTopic ¶
func (stub *P2PAntifloodHandlerStub) IsOriginatorEligibleForTopic(pid core.PeerID, topic string) error
IsOriginatorEligibleForTopic -
func (*P2PAntifloodHandlerStub) ResetForTopic ¶
func (stub *P2PAntifloodHandlerStub) ResetForTopic(_ string)
ResetForTopic -
func (*P2PAntifloodHandlerStub) SetDebugger ¶
func (stub *P2PAntifloodHandlerStub) SetDebugger(debugger process.AntifloodDebugger) error
SetDebugger -
func (*P2PAntifloodHandlerStub) SetMaxMessagesForTopic ¶
func (stub *P2PAntifloodHandlerStub) SetMaxMessagesForTopic(_ string, _ uint32)
SetMaxMessagesForTopic -
func (*P2PAntifloodHandlerStub) SetPeerValidatorMapper ¶
func (stub *P2PAntifloodHandlerStub) SetPeerValidatorMapper(validatorMapper process.PeerValidatorMapper) error
SetPeerValidatorMapper -
func (*P2PAntifloodHandlerStub) SetTopicsForAll ¶
func (stub *P2PAntifloodHandlerStub) SetTopicsForAll(_ ...string)
SetTopicsForAll -
type PeerBlackListCacherStub ¶
type PeerBlackListCacherStub struct { AddCalled func(pid core.PeerID) error UpsertCalled func(pid core.PeerID, span time.Duration) error HasCalled func(pid core.PeerID) bool SweepCalled func() }
PeerBlackListCacherStub -
func (*PeerBlackListCacherStub) Add ¶
func (pblhs *PeerBlackListCacherStub) Add(pid core.PeerID) error
Add -
func (*PeerBlackListCacherStub) Has ¶
func (pblhs *PeerBlackListCacherStub) Has(pid core.PeerID) bool
Has -
func (*PeerBlackListCacherStub) IsInterfaceNil ¶
func (pblhs *PeerBlackListCacherStub) 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 PeerDenialEvaluatorStub ¶
type PeerDenialEvaluatorStub struct { IsDeniedCalled func(pid core.PeerID) bool UpsertPeerIDClled func(pid core.PeerID, duration time.Duration) error }
PeerDenialEvaluatorStub -
func (*PeerDenialEvaluatorStub) IsDenied ¶
func (pdes *PeerDenialEvaluatorStub) IsDenied(pid core.PeerID) bool
IsDenied -
func (*PeerDenialEvaluatorStub) IsInterfaceNil ¶
func (pdes *PeerDenialEvaluatorStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*PeerDenialEvaluatorStub) UpsertPeerID ¶
UpsertPeerID -
type PeerHonestyHandlerStub ¶
PeerHonestyHandlerStub -
func (*PeerHonestyHandlerStub) ChangeScore ¶
func (phhs *PeerHonestyHandlerStub) ChangeScore(pk string, topic string, units int)
ChangeScore -
func (*PeerHonestyHandlerStub) IsInterfaceNil ¶
func (phhs *PeerHonestyHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
type PeerShardMapperStub ¶
type PeerShardMapperStub struct { GetLastKnownPeerIDCalled func(pk []byte) (core.PeerID, bool) UpdatePeerIDPublicKeyPairCalled func(pid core.PeerID, pk []byte) PutPeerIdShardIdCalled func(pid core.PeerID, shardID uint32) PutPeerIdSubTypeCalled func(pid core.PeerID, peerSubType core.P2PPeerSubType) UpdatePeerIDInfoCalled func(pid core.PeerID, pk []byte, shardID uint32) }
PeerShardMapperStub -
func (*PeerShardMapperStub) GetLastKnownPeerID ¶
func (psms *PeerShardMapperStub) GetLastKnownPeerID(pk []byte) (core.PeerID, bool)
GetLastKnownPeerID -
func (*PeerShardMapperStub) GetPeerInfo ¶
func (psms *PeerShardMapperStub) GetPeerInfo(_ 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) UpdatePeerIDInfo ¶ added in v1.6.0
func (psms *PeerShardMapperStub) UpdatePeerIDInfo(pid core.PeerID, pk []byte, shardID uint32)
UpdatePeerIDInfo -
func (*PeerShardMapperStub) UpdatePeerIDPublicKeyPair ¶
func (psms *PeerShardMapperStub) UpdatePeerIDPublicKeyPair(pid core.PeerID, pk []byte)
UpdatePeerIDPublicKeyPair -
type PeerSignatureHandler ¶
type PeerSignatureHandler struct{}
PeerSignatureHandler -
func (*PeerSignatureHandler) GetPeerSignature ¶
func (p *PeerSignatureHandler) GetPeerSignature(_ crypto.PrivateKey, _ []byte) ([]byte, error)
GetPeerSignature -
func (*PeerSignatureHandler) IsInterfaceNil ¶
func (p *PeerSignatureHandler) IsInterfaceNil() bool
IsInterfaceNil -
func (*PeerSignatureHandler) VerifyPeerSignature ¶
VerifyPeerSignature -
type PeerTypeProviderStub ¶
type PeerTypeProviderStub struct {
ComputeForPubKeyCalled func(pubKey []byte) (common.PeerType, uint32, error)
}
PeerTypeProviderStub -
func (*PeerTypeProviderStub) ComputeForPubKey ¶
ComputeForPubKey -
func (*PeerTypeProviderStub) GetAllPeerTypeInfos ¶
func (p *PeerTypeProviderStub) GetAllPeerTypeInfos() []*state.PeerTypeInfo
GetAllPeerTypeInfos -
func (*PeerTypeProviderStub) IsInterfaceNil ¶
func (p *PeerTypeProviderStub) IsInterfaceNil() bool
IsInterfaceNil -
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 PrivateKeyMock ¶
type PrivateKeyMock struct {
// contains filtered or unexported fields
}
PrivateKeyMock -
func (*PrivateKeyMock) GeneratePublic ¶
func (sk *PrivateKeyMock) GeneratePublic() crypto.PublicKey
GeneratePublic -
func (*PrivateKeyMock) IsInterfaceNil ¶
func (sk *PrivateKeyMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*PrivateKeyMock) ToByteArray ¶
func (sk *PrivateKeyMock) ToByteArray() ([]byte, error)
ToByteArray -
type ProcessComponentsStub ¶
type ProcessComponentsStub struct { NodesCoord nodesCoordinator.NodesCoordinator NodesCoordinatorCalled func() nodesCoordinator.NodesCoordinator ShardCoord sharding.Coordinator ShardCoordinatorCalled func() sharding.Coordinator IntContainer process.InterceptorsContainer FullArchiveIntContainer process.InterceptorsContainer ResContainer dataRetriever.ResolversContainer ReqFinder dataRetriever.RequestersFinder RoundHandlerField consensus.RoundHandler RoundHandlerCalled func() consensus.RoundHandler EpochTrigger epochStart.TriggerHandler EpochNotifier factory.EpochStartNotifier ForkDetect process.ForkDetector BlockProcess process.BlockProcessor BlackListHdl process.TimeCacher BootSore process.BootStorer HeaderSigVerif process.InterceptedHeaderSigVerifier HeaderIntegrVerif process.HeaderIntegrityVerifier ValidatorStatistics process.ValidatorStatisticsProcessor ValidatorProvider process.ValidatorsProvider BlockTrack process.BlockTracker PendingMiniBlocksHdl process.PendingMiniBlocksHandler ReqHandler process.RequestHandler TxLogsProcess process.TransactionLogProcessorDatabase HeaderConstructValidator process.HeaderConstructionValidator MainPeerMapper process.NetworkShardingCollector FullArchivePeerMapper process.NetworkShardingCollector TxCostSimulator factory.TransactionEvaluator FallbackHdrValidator process.FallbackHeaderValidator WhiteListHandlerInternal process.WhiteListHandler WhiteListerVerifiedTxsInternal process.WhiteListHandler HistoryRepositoryInternal dblookupext.HistoryRepository ImportStartHandlerInternal update.ImportStartHandler RequestedItemsHandlerInternal dataRetriever.RequestedItemsHandler NodeRedundancyHandlerInternal consensus.NodeRedundancyHandler AccountsParserInternal genesis.AccountsParser CurrentEpochProviderInternal process.CurrentNetworkEpochProviderHandler ScheduledTxsExecutionHandlerInternal process.ScheduledTxsExecutionHandler TxsSenderHandlerField process.TxsSenderHandler HardforkTriggerField factory.HardforkTrigger ProcessedMiniBlocksTrackerInternal process.ProcessedMiniBlocksTracker ReceiptsRepositoryInternal factory.ReceiptsRepository ESDTDataStorageHandlerForAPIInternal vmcommon.ESDTNFTStorageHandler SentSignaturesTrackerInternal process.SentSignaturesTracker }
ProcessComponentsStub -
func (*ProcessComponentsStub) APITransactionEvaluator ¶ added in v1.6.0
func (pcs *ProcessComponentsStub) APITransactionEvaluator() factory.TransactionEvaluator
APITransactionEvaluator -
func (*ProcessComponentsStub) AccountsParser ¶
func (pcs *ProcessComponentsStub) AccountsParser() genesis.AccountsParser
AccountsParser -
func (*ProcessComponentsStub) BlackListHandler ¶
func (pcs *ProcessComponentsStub) BlackListHandler() process.TimeCacher
BlackListHandler -
func (*ProcessComponentsStub) BlockProcessor ¶
func (pcs *ProcessComponentsStub) BlockProcessor() process.BlockProcessor
BlockProcessor -
func (*ProcessComponentsStub) BlockTracker ¶
func (pcs *ProcessComponentsStub) BlockTracker() process.BlockTracker
BlockTracker -
func (*ProcessComponentsStub) BootStorer ¶
func (pcs *ProcessComponentsStub) BootStorer() process.BootStorer
BootStorer -
func (*ProcessComponentsStub) CheckSubcomponents ¶
func (pcs *ProcessComponentsStub) CheckSubcomponents() error
CheckSubcomponents -
func (*ProcessComponentsStub) CurrentEpochProvider ¶
func (pcs *ProcessComponentsStub) CurrentEpochProvider() process.CurrentNetworkEpochProviderHandler
CurrentEpochProvider -
func (*ProcessComponentsStub) ESDTDataStorageHandlerForAPI ¶
func (pcs *ProcessComponentsStub) ESDTDataStorageHandlerForAPI() vmcommon.ESDTNFTStorageHandler
ESDTDataStorageHandlerForAPI -
func (*ProcessComponentsStub) EpochStartNotifier ¶
func (pcs *ProcessComponentsStub) EpochStartNotifier() factory.EpochStartNotifier
EpochStartNotifier -
func (*ProcessComponentsStub) EpochStartTrigger ¶
func (pcs *ProcessComponentsStub) EpochStartTrigger() epochStart.TriggerHandler
EpochStartTrigger -
func (*ProcessComponentsStub) FallbackHeaderValidator ¶
func (pcs *ProcessComponentsStub) FallbackHeaderValidator() process.FallbackHeaderValidator
FallbackHeaderValidator -
func (*ProcessComponentsStub) ForkDetector ¶
func (pcs *ProcessComponentsStub) ForkDetector() process.ForkDetector
ForkDetector -
func (*ProcessComponentsStub) FullArchiveInterceptorsContainer ¶ added in v1.6.0
func (pcs *ProcessComponentsStub) FullArchiveInterceptorsContainer() process.InterceptorsContainer
FullArchiveInterceptorsContainer -
func (*ProcessComponentsStub) FullArchivePeerShardMapper ¶ added in v1.6.0
func (pcs *ProcessComponentsStub) FullArchivePeerShardMapper() process.NetworkShardingCollector
FullArchivePeerShardMapper -
func (*ProcessComponentsStub) HardforkTrigger ¶
func (pcs *ProcessComponentsStub) HardforkTrigger() factory.HardforkTrigger
HardforkTrigger -
func (*ProcessComponentsStub) HeaderConstructionValidator ¶
func (pcs *ProcessComponentsStub) HeaderConstructionValidator() process.HeaderConstructionValidator
HeaderConstructionValidator -
func (*ProcessComponentsStub) HeaderIntegrityVerifier ¶
func (pcs *ProcessComponentsStub) HeaderIntegrityVerifier() process.HeaderIntegrityVerifier
HeaderIntegrityVerifier -
func (*ProcessComponentsStub) HeaderSigVerifier ¶
func (pcs *ProcessComponentsStub) HeaderSigVerifier() process.InterceptedHeaderSigVerifier
HeaderSigVerifier -
func (*ProcessComponentsStub) HistoryRepository ¶
func (pcs *ProcessComponentsStub) HistoryRepository() dblookupext.HistoryRepository
HistoryRepository -
func (*ProcessComponentsStub) ImportStartHandler ¶
func (pcs *ProcessComponentsStub) ImportStartHandler() update.ImportStartHandler
ImportStartHandler -
func (*ProcessComponentsStub) InterceptorsContainer ¶
func (pcs *ProcessComponentsStub) InterceptorsContainer() process.InterceptorsContainer
InterceptorsContainer -
func (*ProcessComponentsStub) IsInterfaceNil ¶
func (pcs *ProcessComponentsStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*ProcessComponentsStub) NodeRedundancyHandler ¶
func (pcs *ProcessComponentsStub) NodeRedundancyHandler() consensus.NodeRedundancyHandler
NodeRedundancyHandler -
func (*ProcessComponentsStub) NodesCoordinator ¶
func (pcs *ProcessComponentsStub) NodesCoordinator() nodesCoordinator.NodesCoordinator
NodesCoordinator -
func (*ProcessComponentsStub) PeerShardMapper ¶
func (pcs *ProcessComponentsStub) PeerShardMapper() process.NetworkShardingCollector
PeerShardMapper -
func (*ProcessComponentsStub) PendingMiniBlocksHandler ¶
func (pcs *ProcessComponentsStub) PendingMiniBlocksHandler() process.PendingMiniBlocksHandler
PendingMiniBlocksHandler -
func (*ProcessComponentsStub) ProcessedMiniBlocksTracker ¶
func (pcs *ProcessComponentsStub) ProcessedMiniBlocksTracker() process.ProcessedMiniBlocksTracker
ProcessedMiniBlocksTracker -
func (*ProcessComponentsStub) ReceiptsRepository ¶
func (pcs *ProcessComponentsStub) ReceiptsRepository() factory.ReceiptsRepository
ReceiptsRepository -
func (*ProcessComponentsStub) RequestHandler ¶
func (pcs *ProcessComponentsStub) RequestHandler() process.RequestHandler
RequestHandler -
func (*ProcessComponentsStub) RequestedItemsHandler ¶
func (pcs *ProcessComponentsStub) RequestedItemsHandler() dataRetriever.RequestedItemsHandler
RequestedItemsHandler -
func (*ProcessComponentsStub) RequestersFinder ¶ added in v1.6.0
func (pcs *ProcessComponentsStub) RequestersFinder() dataRetriever.RequestersFinder
RequestersFinder -
func (*ProcessComponentsStub) ResolversContainer ¶ added in v1.6.0
func (pcs *ProcessComponentsStub) ResolversContainer() dataRetriever.ResolversContainer
ResolversContainer -
func (*ProcessComponentsStub) RoundHandler ¶
func (pcs *ProcessComponentsStub) RoundHandler() consensus.RoundHandler
RoundHandler -
func (*ProcessComponentsStub) ScheduledTxsExecutionHandler ¶
func (pcs *ProcessComponentsStub) ScheduledTxsExecutionHandler() process.ScheduledTxsExecutionHandler
ScheduledTxsExecutionHandler -
func (*ProcessComponentsStub) SentSignaturesTracker ¶ added in v1.6.14
func (pcs *ProcessComponentsStub) SentSignaturesTracker() process.SentSignaturesTracker
SentSignaturesTracker -
func (*ProcessComponentsStub) ShardCoordinator ¶
func (pcs *ProcessComponentsStub) ShardCoordinator() sharding.Coordinator
ShardCoordinator -
func (*ProcessComponentsStub) TxLogsProcessor ¶
func (pcs *ProcessComponentsStub) TxLogsProcessor() process.TransactionLogProcessorDatabase
TxLogsProcessor -
func (*ProcessComponentsStub) TxsSenderHandler ¶
func (pcs *ProcessComponentsStub) TxsSenderHandler() process.TxsSenderHandler
TxsSenderHandler -
func (*ProcessComponentsStub) ValidatorsProvider ¶
func (pcs *ProcessComponentsStub) ValidatorsProvider() process.ValidatorsProvider
ValidatorsProvider -
func (*ProcessComponentsStub) ValidatorsStatistics ¶
func (pcs *ProcessComponentsStub) ValidatorsStatistics() process.ValidatorStatisticsProcessor
ValidatorsStatistics -
func (*ProcessComponentsStub) WhiteListHandler ¶
func (pcs *ProcessComponentsStub) WhiteListHandler() process.WhiteListHandler
WhiteListHandler -
func (*ProcessComponentsStub) WhiteListerVerifiedTxs ¶
func (pcs *ProcessComponentsStub) WhiteListerVerifiedTxs() process.WhiteListHandler
WhiteListerVerifiedTxs -
type PublicKeyMock ¶
type PublicKeyMock struct {
// contains filtered or unexported fields
}
PublicKeyMock -
func (*PublicKeyMock) IsInterfaceNil ¶
func (sspk *PublicKeyMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*PublicKeyMock) ToByteArray ¶
func (sspk *PublicKeyMock) ToByteArray() ([]byte, error)
ToByteArray -
type RaterMock ¶
type RaterMock struct { 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 GetChanceCalled func(rating 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 ¶
type RatingReaderMock struct { GetRatingCalled func(string) uint32 GetRatingsCalled func([]string) map[string]uint32 RatingsMap map[string]uint32 }
RatingReaderMock -
func (*RatingReaderMock) GetRating ¶
func (rrm *RatingReaderMock) GetRating(pk string) uint32
GetRating -
func (*RatingReaderMock) IsInterfaceNil ¶
func (rrm *RatingReaderMock) IsInterfaceNil() bool
IsInterfaceNil -
type RedundancyHandlerStub ¶
type RedundancyHandlerStub struct { IsRedundancyNodeCalled func() bool IsMainMachineActiveCalled func() bool ObserverPrivateKeyCalled func() crypto.PrivateKey AdjustInactivityIfNeededCalled func(selfPubKey string, consensusPubKeys []string, roundIndex int64) ResetInactivityIfNeededCalled func(selfPubKey string, consensusMsgPubKey string, consensusMsgPeerID core.PeerID) }
RedundancyHandlerStub -
func (*RedundancyHandlerStub) AdjustInactivityIfNeeded ¶
func (rhs *RedundancyHandlerStub) AdjustInactivityIfNeeded(selfPubKey string, consensusPubKeys []string, roundIndex int64)
AdjustInactivityIfNeeded -
func (*RedundancyHandlerStub) IsInterfaceNil ¶
func (rhs *RedundancyHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*RedundancyHandlerStub) IsMainMachineActive ¶
func (rhs *RedundancyHandlerStub) IsMainMachineActive() bool
IsMainMachineActive -
func (*RedundancyHandlerStub) IsRedundancyNode ¶
func (rhs *RedundancyHandlerStub) IsRedundancyNode() bool
IsRedundancyNode -
func (*RedundancyHandlerStub) ObserverPrivateKey ¶
func (rhs *RedundancyHandlerStub) ObserverPrivateKey() crypto.PrivateKey
ObserverPrivateKey -
func (*RedundancyHandlerStub) ResetInactivityIfNeeded ¶
func (rhs *RedundancyHandlerStub) ResetInactivityIfNeeded(selfPubKey string, consensusMsgPubKey string, consensusMsgPeerID core.PeerID)
ResetInactivityIfNeeded -
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 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 ResolverKeysCalled func() string IterateCalled func(handler func(key string, resolver dataRetriever.Resolver) bool) CloseCalled func() error }
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) Iterate ¶
func (rcs *ResolversContainerStub) Iterate(handler func(key string, resolver dataRetriever.Resolver) bool)
Iterate -
func (*ResolversContainerStub) Remove ¶
func (rcs *ResolversContainerStub) Remove(key string)
Remove -
func (*ResolversContainerStub) Replace ¶
func (rcs *ResolversContainerStub) Replace(key string, val dataRetriever.Resolver) error
Replace -
func (*ResolversContainerStub) ResolverKeys ¶
func (rcs *ResolversContainerStub) ResolverKeys() string
ResolverKeys -
type RoundHandlerMock ¶
type RoundHandlerMock struct { IndexField int64 TimeStampField time.Time TimeDurationField time.Duration RemainingTimeField time.Duration BeforeGenesisCalled func() bool }
RoundHandlerMock -
func (*RoundHandlerMock) BeforeGenesis ¶
func (mock *RoundHandlerMock) BeforeGenesis() bool
BeforeGenesis -
func (*RoundHandlerMock) IsInterfaceNil ¶
func (mock *RoundHandlerMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*RoundHandlerMock) RemainingTime ¶
RemainingTime -
func (*RoundHandlerMock) TimeDuration ¶
func (mock *RoundHandlerMock) TimeDuration() time.Duration
TimeDuration -
func (*RoundHandlerMock) TimeStamp ¶
func (mock *RoundHandlerMock) TimeStamp() time.Time
TimeStamp -
func (*RoundHandlerMock) UpdateRound ¶
func (mock *RoundHandlerMock) UpdateRound(time.Time, time.Time)
UpdateRound -
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, error) ComputeScCallGasLimitCalled func(tx *transaction.Transaction) (uint64, error) }
ScQueryStub -
func (*ScQueryStub) ComputeScCallGasLimit ¶
func (s *ScQueryStub) ComputeScCallGasLimit(tx *transaction.Transaction) (uint64, error)
ComputeScCallGasLimit --
func (*ScQueryStub) ExecuteQuery ¶
ExecuteQuery -
type ShuffledOutHandlerStub ¶
type ShuffledOutHandlerStub struct { ProcessCalled func(newShardID uint32) error RegisterHandlerCalled func(handler func(newShardID uint32)) CurrentShardIDCalled func() uint32 }
ShuffledOutHandlerStub -
func (*ShuffledOutHandlerStub) CurrentShardID ¶
func (s *ShuffledOutHandlerStub) CurrentShardID() uint32
CurrentShardID -
func (*ShuffledOutHandlerStub) IsInterfaceNil ¶
func (s *ShuffledOutHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*ShuffledOutHandlerStub) Process ¶
func (s *ShuffledOutHandlerStub) Process(newShardID uint32) error
Process -
func (*ShuffledOutHandlerStub) RegisterHandler ¶
func (s *ShuffledOutHandlerStub) RegisterHandler(handler func(newShardID uint32))
RegisterHandler -
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 SmartContractParserStub ¶
type SmartContractParserStub struct { InitialSmartContractsSplitOnOwnersShardsCalled func(shardCoordinator sharding.Coordinator) (map[uint32][]genesis.InitialSmartContractHandler, error) InitialSmartContractsCalled func() []genesis.InitialSmartContractHandler GetDeployedSCAddressesCalled func(scType string) (map[string]struct{}, error) }
SmartContractParserStub -
func (*SmartContractParserStub) GetDeployedSCAddresses ¶
func (scps *SmartContractParserStub) GetDeployedSCAddresses(scType string) (map[string]struct{}, error)
GetDeployedSCAddresses -
func (*SmartContractParserStub) InitialSmartContracts ¶
func (scps *SmartContractParserStub) InitialSmartContracts() []genesis.InitialSmartContractHandler
InitialSmartContracts -
func (*SmartContractParserStub) InitialSmartContractsSplitOnOwnersShards ¶
func (scps *SmartContractParserStub) InitialSmartContractsSplitOnOwnersShards(shardCoordinator sharding.Coordinator) (map[uint32][]genesis.InitialSmartContractHandler, error)
InitialSmartContractsSplitOnOwnersShards -
func (*SmartContractParserStub) IsInterfaceNil ¶
func (scps *SmartContractParserStub) IsInterfaceNil() bool
IsInterfaceNil -
type SoftwareVersionCheckerMock ¶
type SoftwareVersionCheckerMock struct { }
SoftwareVersionCheckerMock -
func (*SoftwareVersionCheckerMock) Close ¶
func (svcm *SoftwareVersionCheckerMock) Close() error
Close -
func (*SoftwareVersionCheckerMock) IsInterfaceNil ¶
func (svcm *SoftwareVersionCheckerMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*SoftwareVersionCheckerMock) StartCheckSoftwareVersion ¶
func (svcm *SoftwareVersionCheckerMock) StartCheckSoftwareVersion()
StartCheckSoftwareVersion -
type StatusComponentsStub ¶
type StatusComponentsStub struct { Outport outport.OutportHandler SoftwareVersionCheck statistics.SoftwareVersionChecker ManagedPeersMonitorField common.ManagedPeersMonitor }
StatusComponentsStub -
func (*StatusComponentsStub) CheckSubcomponents ¶
func (scs *StatusComponentsStub) CheckSubcomponents() error
CheckSubcomponents -
func (*StatusComponentsStub) IsInterfaceNil ¶
func (scs *StatusComponentsStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*StatusComponentsStub) ManagedPeersMonitor ¶ added in v1.6.0
func (scs *StatusComponentsStub) ManagedPeersMonitor() common.ManagedPeersMonitor
ManagedPeersMonitor -
func (*StatusComponentsStub) OutportHandler ¶
func (scs *StatusComponentsStub) OutportHandler() outport.OutportHandler
OutportHandler -
func (*StatusComponentsStub) SoftwareVersionChecker ¶
func (scs *StatusComponentsStub) SoftwareVersionChecker() statistics.SoftwareVersionChecker
SoftwareVersionChecker -
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 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
}
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(_ string)
ResetForTopic -
func (*TopicAntiFloodStub) SetMaxMessagesForTopic ¶
func (t *TopicAntiFloodStub) SetMaxMessagesForTopic(_ string, _ uint32)
SetMaxMessagesForTopic -
type TransactionCoordinatorMock ¶
type TransactionCoordinatorMock struct { ComputeTransactionTypeCalled func(tx data.TransactionHandler) (process.TransactionType, process.TransactionType) RequestMiniBlocksAndTransactionsCalled func(header data.HeaderHandler) RequestBlockTransactionsCalled func(body *block.Body) IsDataPreparedForProcessingCalled func(haveTime func() time.Duration) error SaveTxsToStorageCalled func(body *block.Body) RestoreBlockDataFromStorageCalled func(body *block.Body) (int, error) RemoveBlockDataFromPoolCalled func(body *block.Body) error RemoveTxsFromPoolCalled func(body *block.Body) error ProcessBlockTransactionCalled func(header data.HeaderHandler, body *block.Body, haveTime func() time.Duration) error CreateBlockStartedCalled func() CreateMbsAndProcessCrossShardTransactionsDstMeCalled func(header data.HeaderHandler, processedMiniBlocksInfo map[string]*processedMb.ProcessedMiniBlockInfo, haveTime func() bool, haveAdditionalTime func() bool, scheduledMode bool) (block.MiniBlockSlice, uint32, bool, error) CreateMbsAndProcessTransactionsFromMeCalled func(haveTime func() bool) block.MiniBlockSlice CreateMarshalizedDataCalled func(body *block.Body) map[string][][]byte GetCreatedInShardMiniBlocksCalled func() []*block.MiniBlock GetAllCurrentUsedTxsCalled func(blockType block.Type) map[string]data.TransactionHandler VerifyCreatedBlockTransactionsCalled func(hdr data.HeaderHandler, body *block.Body) error CreatePostProcessMiniBlocksCalled func() block.MiniBlockSlice VerifyCreatedMiniBlocksCalled func(hdr data.HeaderHandler, body *block.Body) error AddIntermediateTransactionsCalled func(mapSCRs map[block.Type][]data.TransactionHandler) error GetAllIntermediateTxsCalled func() map[block.Type]map[string]data.TransactionHandler AddTxsFromMiniBlocksCalled func(miniBlocks block.MiniBlockSlice) AddTransactionsCalled func(txHandlers []data.TransactionHandler, blockType block.Type) }
TransactionCoordinatorMock -
func (*TransactionCoordinatorMock) AddIntermediateTransactions ¶
func (tcm *TransactionCoordinatorMock) AddIntermediateTransactions(mapSCRs map[block.Type][]data.TransactionHandler) error
AddIntermediateTransactions -
func (*TransactionCoordinatorMock) AddTransactions ¶
func (tcm *TransactionCoordinatorMock) AddTransactions(txHandlers []data.TransactionHandler, blockType block.Type)
AddTransactions -
func (*TransactionCoordinatorMock) AddTxsFromMiniBlocks ¶
func (tcm *TransactionCoordinatorMock) AddTxsFromMiniBlocks(miniBlocks block.MiniBlockSlice)
AddTxsFromMiniBlocks -
func (*TransactionCoordinatorMock) ComputeTransactionType ¶
func (tcm *TransactionCoordinatorMock) ComputeTransactionType(tx data.TransactionHandler) (process.TransactionType, process.TransactionType)
ComputeTransactionType -
func (*TransactionCoordinatorMock) CreateBlockStarted ¶
func (tcm *TransactionCoordinatorMock) CreateBlockStarted()
CreateBlockStarted -
func (*TransactionCoordinatorMock) CreateMarshalizedData ¶
func (tcm *TransactionCoordinatorMock) CreateMarshalizedData(body *block.Body) map[string][][]byte
CreateMarshalizedData -
func (*TransactionCoordinatorMock) CreateMbsAndProcessCrossShardTransactionsDstMe ¶
func (tcm *TransactionCoordinatorMock) CreateMbsAndProcessCrossShardTransactionsDstMe( header data.HeaderHandler, processedMiniBlocksInfo map[string]*processedMb.ProcessedMiniBlockInfo, haveTime func() bool, haveAdditionalTime func() bool, scheduledMode bool, ) (block.MiniBlockSlice, uint32, bool, error)
CreateMbsAndProcessCrossShardTransactionsDstMe -
func (*TransactionCoordinatorMock) CreateMbsAndProcessTransactionsFromMe ¶
func (tcm *TransactionCoordinatorMock) CreateMbsAndProcessTransactionsFromMe(haveTime func() bool, _ []byte) block.MiniBlockSlice
CreateMbsAndProcessTransactionsFromMe -
func (*TransactionCoordinatorMock) CreatePostProcessMiniBlocks ¶
func (tcm *TransactionCoordinatorMock) CreatePostProcessMiniBlocks() block.MiniBlockSlice
CreatePostProcessMiniBlocks -
func (*TransactionCoordinatorMock) CreateReceiptsHash ¶
func (tcm *TransactionCoordinatorMock) CreateReceiptsHash() ([]byte, error)
CreateReceiptsHash -
func (*TransactionCoordinatorMock) GetAllCurrentLogs ¶
func (tcm *TransactionCoordinatorMock) GetAllCurrentLogs() []*data.LogData
GetAllCurrentLogs -
func (*TransactionCoordinatorMock) GetAllCurrentUsedTxs ¶
func (tcm *TransactionCoordinatorMock) GetAllCurrentUsedTxs(blockType block.Type) map[string]data.TransactionHandler
GetAllCurrentUsedTxs -
func (*TransactionCoordinatorMock) GetAllIntermediateTxs ¶
func (tcm *TransactionCoordinatorMock) GetAllIntermediateTxs() map[block.Type]map[string]data.TransactionHandler
GetAllIntermediateTxs -
func (*TransactionCoordinatorMock) GetCreatedInShardMiniBlocks ¶
func (tcm *TransactionCoordinatorMock) GetCreatedInShardMiniBlocks() []*block.MiniBlock
GetCreatedInShardMiniBlocks -
func (*TransactionCoordinatorMock) IsDataPreparedForProcessing ¶
func (tcm *TransactionCoordinatorMock) IsDataPreparedForProcessing(haveTime func() time.Duration) error
IsDataPreparedForProcessing -
func (*TransactionCoordinatorMock) IsInterfaceNil ¶
func (tcm *TransactionCoordinatorMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*TransactionCoordinatorMock) ProcessBlockTransaction ¶
func (tcm *TransactionCoordinatorMock) ProcessBlockTransaction(header data.HeaderHandler, body *block.Body, haveTime func() time.Duration) error
ProcessBlockTransaction -
func (*TransactionCoordinatorMock) RemoveBlockDataFromPool ¶
func (tcm *TransactionCoordinatorMock) RemoveBlockDataFromPool(body *block.Body) error
RemoveBlockDataFromPool -
func (*TransactionCoordinatorMock) RemoveTxsFromPool ¶
func (tcm *TransactionCoordinatorMock) RemoveTxsFromPool(body *block.Body) error
RemoveTxsFromPool -
func (*TransactionCoordinatorMock) RequestBlockTransactions ¶
func (tcm *TransactionCoordinatorMock) RequestBlockTransactions(body *block.Body)
RequestBlockTransactions -
func (*TransactionCoordinatorMock) RequestMiniBlocksAndTransactions ¶ added in v1.6.3
func (tcm *TransactionCoordinatorMock) RequestMiniBlocksAndTransactions(header data.HeaderHandler)
RequestMiniBlocksAndTransactions -
func (*TransactionCoordinatorMock) RestoreBlockDataFromStorage ¶
func (tcm *TransactionCoordinatorMock) RestoreBlockDataFromStorage(body *block.Body) (int, error)
RestoreBlockDataFromStorage -
func (*TransactionCoordinatorMock) SaveTxsToStorage ¶
func (tcm *TransactionCoordinatorMock) SaveTxsToStorage(body *block.Body)
SaveTxsToStorage -
func (*TransactionCoordinatorMock) VerifyCreatedBlockTransactions ¶
func (tcm *TransactionCoordinatorMock) VerifyCreatedBlockTransactions(hdr data.HeaderHandler, body *block.Body) error
VerifyCreatedBlockTransactions -
func (*TransactionCoordinatorMock) VerifyCreatedMiniBlocks ¶
func (tcm *TransactionCoordinatorMock) VerifyCreatedMiniBlocks(hdr data.HeaderHandler, body *block.Body) error
VerifyCreatedMiniBlocks -
type 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 TxLogProcessorMock ¶
type TxLogProcessorMock struct { }
TxLogProcessorMock -
func (*TxLogProcessorMock) EnableLogToBeSavedInCache ¶
func (t *TxLogProcessorMock) EnableLogToBeSavedInCache()
EnableLogToBeSavedInCache -
func (*TxLogProcessorMock) GetLogFromCache ¶
func (t *TxLogProcessorMock) GetLogFromCache(_ []byte) (*data.LogData, bool)
GetLogFromCache -
func (*TxLogProcessorMock) IsInterfaceNil ¶
func (t *TxLogProcessorMock) 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 }
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 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 UnitOpenerStub ¶
type UnitOpenerStub struct { }
UnitOpenerStub -
func (*UnitOpenerStub) GetMostRecentStorageUnit ¶
GetMostRecentStorageUnit -
func (*UnitOpenerStub) IsInterfaceNil ¶
func (u *UnitOpenerStub) IsInterfaceNil() bool
IsInterfaceNil -
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 }
VMContainerMock -
func (*VMContainerMock) Add ¶
func (vmc *VMContainerMock) Add(key []byte, val vmcommon.VMExecutionHandler) error
Add -
func (*VMContainerMock) AddMultiple ¶
func (vmc *VMContainerMock) AddMultiple(keys [][]byte, vms []vmcommon.VMExecutionHandler) error
AddMultiple -
func (*VMContainerMock) Get ¶
func (vmc *VMContainerMock) Get(key []byte) (vmcommon.VMExecutionHandler, error)
Get -
func (*VMContainerMock) IsInterfaceNil ¶
func (vmc *VMContainerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*VMContainerMock) Replace ¶
func (vmc *VMContainerMock) Replace(key []byte, val vmcommon.VMExecutionHandler) error
Replace -
type VMExecutionHandlerStub ¶
type VMExecutionHandlerStub struct { RunSmartContractCreateCalled func(input *vmcommon.ContractCreateInput) (*vmcommon.VMOutput, error) RunSmartContractCallCalled func(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error) GasScheduleChangeCalled func(gasSchedule map[string]map[string]uint64) GetVersionCalled func() string }
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 ValidatorInfoSyncerStub ¶
type ValidatorInfoSyncerStub struct { }
ValidatorInfoSyncerStub -
func (*ValidatorInfoSyncerStub) IsInterfaceNil ¶
func (vip *ValidatorInfoSyncerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*ValidatorInfoSyncerStub) SyncMiniBlocks ¶
func (vip *ValidatorInfoSyncerStub) SyncMiniBlocks(*block.MetaBlock) ([][]byte, data.BodyHandler, error)
SyncMiniBlocks -
type VmMachinesContainerFactoryMock ¶
type VmMachinesContainerFactoryMock struct { }
VmMachinesContainerFactoryMock -
func (*VmMachinesContainerFactoryMock) BlockChainHookImpl ¶
func (v *VmMachinesContainerFactoryMock) BlockChainHookImpl() process.BlockChainHookWithAccountsAdapter
BlockChainHookImpl -
func (*VmMachinesContainerFactoryMock) Close ¶
func (v *VmMachinesContainerFactoryMock) Close() error
Close -
func (*VmMachinesContainerFactoryMock) Create ¶
func (v *VmMachinesContainerFactoryMock) Create() (process.VirtualMachinesContainer, error)
Create -
func (*VmMachinesContainerFactoryMock) IsInterfaceNil ¶
func (v *VmMachinesContainerFactoryMock) IsInterfaceNil() bool
IsInterfaceNil -
type WatchdogMock ¶
type WatchdogMock struct { }
WatchdogMock -
func (*WatchdogMock) Set ¶
func (w *WatchdogMock) Set(callback func(alarmID string), duration time.Duration, alarmID string)
Set -
func (*WatchdogMock) SetDefault ¶
func (w *WatchdogMock) SetDefault(duration time.Duration, alarmID string)
SetDefault -
Source Files ¶
- accountsDBSyncerStub.go
- blackListHandleStub.go
- blockProcessorMock.go
- blockSizeThrottlerStub.go
- blockTrackerStub.go
- bootstrapStorerMock.go
- coreComponentsStub.go
- countingDB.go
- cryptoComponentsStub.go
- currentNetworkEpochProviderStub.go
- dataComponentsStub.go
- dbMock.go
- endOfEpochTriggerStub.go
- epochEconomicsStub.go
- epochStartDataCreatorStub.go
- epochStartNotifier.go
- exportFactoryHandlerStub.go
- exportHandlerStub.go
- forkDetectorStub.go
- gasHandlerMock.go
- gasScheduleNotifierMock.go
- headerIntegrityVerifierStub.go
- headerSigVerifierStub.go
- headerValidatorStub.go
- headersCacherStub.go
- heartbeatMonitorStub.go
- importStartHandlerStub.go
- interimProcessorContainerMock.go
- intermediateTransactionHandlerMock.go
- keyMock.go
- latestStorageDataProviderStub.go
- listIndexUpdaterStub.go
- messageSignVerifierMock.go
- miniBlocksProviderStub.go
- multipleShardsCoordinatorMock.go
- networkComponentsMock.go
- networkShardingCollectorMock.go
- nilAntifloodHandler.go
- nodeInfoMock.go
- nodesCoordinatorCacheMock.go
- nodesHandlerMock.go
- oneSCExecutorMockVM.go
- p2pAntifloodHandlerStub.go
- peerBlackListCacherStub.go
- peerChangesHandler.go
- peerDenialEvaluatorStub.go
- peerHonestyHandlerStub.go
- peerShardMapperStub.go
- peerSignatureHandler.go
- peerTypeProviderStub.go
- pendingMiniBlocksHandlerStub.go
- processComponentsStub.go
- raterMock.go
- ratingReaderMock.go
- redundancyHandlerStub.go
- requestedItemsHandlerStub.go
- resolversContainerStub.go
- roundHandlerMock.go
- scQueryStub.go
- scToProtocolHandlerMock.go
- shuffledOutHandlerStub.go
- signerMock.go
- smartContractParserStub.go
- softwareVersionCheckerMock.go
- statusComponentsStub.go
- storageBootstrapperMock.go
- syncTimerMock.go
- testBootstrapperMock.go
- topicAntifloodStub.go
- transactionCoordinatorMock.go
- txForCurrentBlockStub.go
- txLogsProcessorMock.go
- txLogsProcessorStub.go
- uint64ByteSliceConverterMock.go
- unitOpenerStub.go
- validatorInfoSyncerStub.go
- vmContainerMock.go
- vmExecutionHandlerStub.go
- vmFactoryMock.go
- watchdogMock.go