Documentation ¶
Index ¶
- func NewAccumulatorMock() *accumulatorMock
- func NewMultiShardsCoordinatorMock(nrShard uint32) *multipleShardsCoordinatorMock
- func NewNonceHashConverterMock() *nonceHashConverterMock
- func NewOneShardCoordinatorMock() *oneShardCoordinatorMock
- type AccountWrapMock
- func (awm *AccountWrapMock) AddToBalance(_ *big.Int) error
- func (awm *AccountWrapMock) AddToDeveloperReward(*big.Int)
- func (awm *AccountWrapMock) AddressBytes() []byte
- func (awm *AccountWrapMock) ChangeOwnerAddress([]byte, []byte) error
- func (awm *AccountWrapMock) ClaimDeveloperRewards([]byte) (*big.Int, error)
- func (awm *AccountWrapMock) DataTrie() data.Trie
- func (awm *AccountWrapMock) DataTrieTracker() state.DataTrieTracker
- func (awm *AccountWrapMock) GetBalance() *big.Int
- func (awm *AccountWrapMock) GetCodeHash() []byte
- func (awm *AccountWrapMock) GetCodeMetadata() []byte
- func (awm *AccountWrapMock) GetDeveloperReward() *big.Int
- func (awm *AccountWrapMock) GetNonce() uint64
- func (awm *AccountWrapMock) GetOwnerAddress() []byte
- func (awm *AccountWrapMock) GetRootHash() []byte
- func (awm *AccountWrapMock) GetUserName() []byte
- func (awm *AccountWrapMock) HasNewCode() bool
- func (awm *AccountWrapMock) IncreaseNonce(val uint64)
- func (awm *AccountWrapMock) IsInterfaceNil() bool
- func (awm *AccountWrapMock) SetCode(code []byte)
- func (awm *AccountWrapMock) SetCodeHash(codeHash []byte)
- func (awm *AccountWrapMock) SetCodeMetadata(codeMetadata []byte)
- func (awm *AccountWrapMock) SetDataTrie(trie data.Trie)
- func (awm *AccountWrapMock) SetOwnerAddress([]byte)
- func (awm *AccountWrapMock) SetRootHash(rootHash []byte)
- func (awm *AccountWrapMock) SetUserName(_ []byte)
- func (awm *AccountWrapMock) SubFromBalance(_ *big.Int) error
- type AccountsFactoryStub
- type AccountsStub
- func (as *AccountsStub) CancelPrune(rootHash []byte, identifier data.TriePruningIdentifier)
- func (as *AccountsStub) Commit() ([]byte, error)
- func (as *AccountsStub) GetAllLeaves(rootHash []byte, _ context.Context) (chan core.KeyValueHolder, error)
- func (as *AccountsStub) GetCode(codeHash []byte) []byte
- func (as *AccountsStub) GetExistingAccount(addressContainer []byte) (state.AccountHandler, error)
- func (as *AccountsStub) GetNumCheckpoints() uint32
- func (as *AccountsStub) IsInterfaceNil() bool
- func (as *AccountsStub) IsPruningEnabled() bool
- func (as *AccountsStub) JournalLen() int
- func (as *AccountsStub) LoadAccount(address []byte) (state.AccountHandler, error)
- func (as *AccountsStub) PruneTrie(rootHash []byte, identifier data.TriePruningIdentifier)
- func (as *AccountsStub) RecreateAllTries(rootHash []byte, _ context.Context) (map[string]data.Trie, error)
- func (as *AccountsStub) RecreateTrie(rootHash []byte) error
- func (as *AccountsStub) RemoveAccount(addressContainer []byte) error
- func (as *AccountsStub) RevertToSnapshot(snapshot int) error
- func (as *AccountsStub) RootHash() ([]byte, error)
- func (as *AccountsStub) SaveAccount(account state.AccountHandler) error
- func (as *AccountsStub) SetStateCheckpoint(rootHash []byte, _ context.Context)
- func (as *AccountsStub) SnapshotState(rootHash []byte, _ context.Context)
- type AppStatusHandlerStub
- func (ashs *AppStatusHandlerStub) AddUint64(key string, value uint64)
- func (ashs *AppStatusHandlerStub) Close()
- func (ashs *AppStatusHandlerStub) Decrement(key string)
- func (ashs *AppStatusHandlerStub) Increment(key string)
- func (ashs *AppStatusHandlerStub) IsInterfaceNil() bool
- func (ashs *AppStatusHandlerStub) SetInt64Value(key string, value int64)
- func (ashs *AppStatusHandlerStub) SetStringValue(key string, value string)
- func (ashs *AppStatusHandlerStub) SetUInt64Value(key string, value uint64)
- type BlockChainMock
- func (bc *BlockChainMock) CreateNewHeader() data.HeaderHandler
- func (bc *BlockChainMock) GetCurrentBlockHeader() data.HeaderHandler
- func (bc *BlockChainMock) GetCurrentBlockHeaderHash() []byte
- func (bc *BlockChainMock) GetGenesisHeader() data.HeaderHandler
- func (bc *BlockChainMock) GetGenesisHeaderHash() []byte
- func (bc *BlockChainMock) IsInterfaceNil() bool
- func (bc *BlockChainMock) SetCurrentBlockHeader(header data.HeaderHandler) error
- func (bc *BlockChainMock) SetCurrentBlockHeaderHash(hash []byte)
- func (bc *BlockChainMock) SetGenesisHeader(genesisBlock data.HeaderHandler) error
- func (bc *BlockChainMock) SetGenesisHeaderHash(hash []byte)
- type BlockProcessorStub
- func (bps *BlockProcessorStub) AddLastNotarizedHdr(shardId uint32, processedHdr data.HeaderHandler)
- func (bps *BlockProcessorStub) ApplyProcessedMiniBlocks(_ *processedMb.ProcessedMiniBlockTracker)
- func (bps *BlockProcessorStub) CommitBlock(header data.HeaderHandler, body data.BodyHandler) error
- func (bps *BlockProcessorStub) CreateBlock(initialHdrData data.HeaderHandler, haveTime func() bool) (data.HeaderHandler, data.BodyHandler, error)
- func (bps *BlockProcessorStub) CreateGenesisBlock(balances map[string]*big.Int) (data.HeaderHandler, error)
- func (bps *BlockProcessorStub) CreateNewHeader(round uint64, nonce uint64) data.HeaderHandler
- func (bps *BlockProcessorStub) DecodeBlockBody(dta []byte) data.BodyHandler
- func (bps *BlockProcessorStub) DecodeBlockHeader(dta []byte) data.HeaderHandler
- func (bps *BlockProcessorStub) IsInterfaceNil() bool
- func (bps *BlockProcessorStub) MarshalizedDataToBroadcast(header data.HeaderHandler, body data.BodyHandler) (map[uint32][]byte, map[string][][]byte, error)
- func (bps *BlockProcessorStub) ProcessBlock(header data.HeaderHandler, body data.BodyHandler, ...) error
- func (bps *BlockProcessorStub) PruneStateOnRollback(currHeader data.HeaderHandler, prevHeader data.HeaderHandler)
- func (bps *BlockProcessorStub) RestoreBlockIntoPools(header data.HeaderHandler, body data.BodyHandler) error
- func (bps *BlockProcessorStub) RestoreLastNotarizedHrdsToGenesis()
- func (bps *BlockProcessorStub) RevertAccountState(header data.HeaderHandler)
- func (bps *BlockProcessorStub) RevertIndexedBlock(header data.HeaderHandler)
- func (bps *BlockProcessorStub) RevertStateToBlock(header data.HeaderHandler) error
- func (bps *BlockProcessorStub) SetNumProcessedObj(_ 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) CheckBlockAgainstRounder(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
- type BoostrapStorerMock
- func (bsm *BoostrapStorerMock) Get(round int64) (bootstrapStorage.BootstrapData, error)
- func (bsm *BoostrapStorerMock) GetHighestRound() int64
- func (bsm *BoostrapStorerMock) IsInterfaceNil() bool
- func (bsm *BoostrapStorerMock) Put(round int64, bootData bootstrapStorage.BootstrapData) error
- func (bsm *BoostrapStorerMock) SaveLastRound(round int64) error
- type ChainHandlerStub
- func (chs *ChainHandlerStub) CreateNewHeader() data.HeaderHandler
- func (chs *ChainHandlerStub) GetCurrentBlockHeader() data.HeaderHandler
- func (chs *ChainHandlerStub) GetCurrentBlockHeaderHash() []byte
- func (chs *ChainHandlerStub) GetGenesisHeader() data.HeaderHandler
- func (chs *ChainHandlerStub) GetGenesisHeaderHash() []byte
- func (chs *ChainHandlerStub) IsInterfaceNil() bool
- func (chs *ChainHandlerStub) SetCurrentBlockHeader(bh data.HeaderHandler) error
- func (chs *ChainHandlerStub) SetCurrentBlockHeaderHash(_ []byte)
- func (chs *ChainHandlerStub) SetGenesisHeader(gb data.HeaderHandler) error
- func (chs *ChainHandlerStub) SetGenesisHeaderHash(hash []byte)
- type ChainStorerMock
- func (bc *ChainStorerMock) AddStorer(key dataRetriever.UnitType, s storage.Storer)
- func (bc *ChainStorerMock) CloseAll() error
- func (bc *ChainStorerMock) Destroy() error
- func (bc *ChainStorerMock) Get(unitType dataRetriever.UnitType, key []byte) ([]byte, error)
- func (bc *ChainStorerMock) GetAll(unitType dataRetriever.UnitType, keys [][]byte) (map[string][]byte, error)
- func (bc *ChainStorerMock) GetStorer(unitType dataRetriever.UnitType) storage.Storer
- func (bc *ChainStorerMock) Has(unitType dataRetriever.UnitType, key []byte) error
- func (bc *ChainStorerMock) IsInterfaceNil() bool
- func (bc *ChainStorerMock) Put(unitType dataRetriever.UnitType, key []byte, value []byte) error
- func (bc *ChainStorerMock) SetEpochForPutOperation(epoch uint32)
- type DelegatedListProcessorStub
- type DirectStakedListProcessorStub
- type EpochStartNotifierStub
- func (esnm *EpochStartNotifierStub) IsInterfaceNil() bool
- func (esnm *EpochStartNotifierStub) NotifyAll(hdr data.HeaderHandler)
- func (esnm *EpochStartNotifierStub) NotifyAllPrepare(metaHdr data.HeaderHandler, body data.BodyHandler)
- func (esnm *EpochStartNotifierStub) RegisterHandler(handler epochStart.ActionHandler)
- func (esnm *EpochStartNotifierStub) UnregisterHandler(handler epochStart.ActionHandler)
- type EpochStartTriggerStub
- func (e *EpochStartTriggerStub) Close() error
- func (e *EpochStartTriggerStub) Epoch() uint32
- func (e *EpochStartTriggerStub) EpochFinalityAttestingRound() uint64
- func (e *EpochStartTriggerStub) EpochStartMetaHdrHash() []byte
- func (e *EpochStartTriggerStub) EpochStartRound() uint64
- func (e *EpochStartTriggerStub) ForceEpochStart(round 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) RequestEpochStartIfNeeded(_ data.HeaderHandler)
- func (e *EpochStartTriggerStub) Revert(_ data.HeaderHandler)
- func (e *EpochStartTriggerStub) RevertStateToBlock(_ data.HeaderHandler) error
- func (e *EpochStartTriggerStub) SetAppStatusHandler(_ core.AppStatusHandler) error
- func (e *EpochStartTriggerStub) SetCurrentEpochStartRound(_ uint64)
- func (e *EpochStartTriggerStub) SetFinalityAttestingRound(_ uint64)
- func (e *EpochStartTriggerStub) SetProcessed(header data.HeaderHandler, _ data.BodyHandler)
- func (e *EpochStartTriggerStub) Update(round uint64, nonce uint64)
- type FeeHandlerStub
- func (fhs *FeeHandlerStub) CheckValidityTxValues(tx process.TransactionWithFeeHandler) error
- func (fhs *FeeHandlerStub) ComputeFeeForProcessing(tx process.TransactionWithFeeHandler, gasToUse uint64) *big.Int
- func (fhs *FeeHandlerStub) ComputeGasLimit(tx process.TransactionWithFeeHandler) uint64
- func (fhs *FeeHandlerStub) ComputeMoveBalanceFee(tx process.TransactionWithFeeHandler) *big.Int
- func (fhs *FeeHandlerStub) ComputeTxFee(tx process.TransactionWithFeeHandler) *big.Int
- func (fhs *FeeHandlerStub) DeveloperPercentage() float64
- func (fhs *FeeHandlerStub) GasPriceModifier() float64
- func (fhs *FeeHandlerStub) GenesisTotalSupply() *big.Int
- func (fhs *FeeHandlerStub) IsInterfaceNil() bool
- func (fhs *FeeHandlerStub) MaxGasLimitPerBlock(uint32) uint64
- func (fhs *FeeHandlerStub) MinGasPrice() uint64
- type ForkDetectorMock
- func (fdm *ForkDetectorMock) AddHeader(header data.HeaderHandler, hash []byte, state process.BlockHeaderState, ...) error
- func (fdm *ForkDetectorMock) CheckFork() *process.ForkInfo
- func (fdm *ForkDetectorMock) GetHighestFinalBlockHash() []byte
- func (fdm *ForkDetectorMock) GetHighestFinalBlockNonce() uint64
- func (fdm *ForkDetectorMock) GetNotarizedHeaderHash(nonce uint64) []byte
- func (fdm *ForkDetectorMock) IsInterfaceNil() bool
- func (fdm *ForkDetectorMock) ProbableHighestNonce() uint64
- func (fdm *ForkDetectorMock) RemoveHeader(nonce uint64, hash []byte)
- func (fdm *ForkDetectorMock) ResetFork()
- func (fdm *ForkDetectorMock) ResetProbableHighestNonce()
- func (fdm *ForkDetectorMock) RestoreToGenesis()
- func (fdm *ForkDetectorMock) SetFinalToLastCheckpoint()
- func (fdm *ForkDetectorMock) SetRollBackNonce(nonce uint64)
- type GeneratorSuite
- type HardforkTriggerStub
- func (hts *HardforkTriggerStub) AddCloser(closer update.Closer) error
- func (hts *HardforkTriggerStub) CreateData() []byte
- func (hts *HardforkTriggerStub) IsInterfaceNil() bool
- func (hts *HardforkTriggerStub) IsSelfTrigger() bool
- func (hts *HardforkTriggerStub) NotifyTriggerReceived() <-chan struct{}
- func (hts *HardforkTriggerStub) RecordedTriggerMessage() ([]byte, bool)
- func (hts *HardforkTriggerStub) Trigger(epoch uint32, withEarlyEndOfEpoch bool) error
- func (hts *HardforkTriggerStub) TriggerReceived(payload []byte, data []byte, pkBytes []byte) (bool, error)
- type HasherFake
- type HasherMock
- type HeaderIntegrityVerifierStub
- type HeaderResolverStub
- func (hrs *HeaderResolverStub) IsInterfaceNil() bool
- func (hrs *HeaderResolverStub) NumPeersToQuery() (int, int)
- func (hrs *HeaderResolverStub) ProcessReceivedMessage(message p2p.MessageP2P, _ core.PeerID) error
- func (hrs *HeaderResolverStub) RequestDataFromEpoch(identifier []byte) error
- func (hrs *HeaderResolverStub) RequestDataFromHash(hash []byte, epoch uint32) error
- func (hrs *HeaderResolverStub) RequestDataFromNonce(nonce uint64, epoch uint32) error
- func (hrs *HeaderResolverStub) SetEpochHandler(epochHandler dataRetriever.EpochHandler) error
- func (hrs *HeaderResolverStub) SetNumPeersToQuery(intra int, cross int)
- func (hrs *HeaderResolverStub) SetResolverDebugHandler(handler dataRetriever.ResolverDebugHandler) error
- type HeaderSigVerifierStub
- func (hsvm *HeaderSigVerifierStub) IsInterfaceNil() bool
- func (hsvm *HeaderSigVerifierStub) VerifyLeaderSignature(header data.HeaderHandler) error
- func (hsvm *HeaderSigVerifierStub) VerifyRandSeed(header data.HeaderHandler) error
- func (hsvm *HeaderSigVerifierStub) VerifyRandSeedAndLeaderSignature(header data.HeaderHandler) error
- func (hsvm *HeaderSigVerifierStub) VerifySignature(header data.HeaderHandler) error
- type HeadersCacherStub
- func (hcs *HeadersCacherStub) AddHeader(headerHash []byte, header data.HeaderHandler)
- func (hcs *HeadersCacherStub) Clear()
- func (hcs *HeadersCacherStub) GetHeaderByHash(hash []byte) (data.HeaderHandler, error)
- func (hcs *HeadersCacherStub) GetHeadersByNonceAndShardId(hdrNonce uint64, shardId uint32) ([]data.HeaderHandler, [][]byte, error)
- func (hcs *HeadersCacherStub) GetNumHeaders(shardId uint32) int
- func (hcs *HeadersCacherStub) IsInterfaceNil() bool
- func (hcs *HeadersCacherStub) Len() int
- func (hcs *HeadersCacherStub) MaxSize() int
- func (hcs *HeadersCacherStub) Nonces(shardId uint32) []uint64
- func (hcs *HeadersCacherStub) RegisterHandler(handler func(header data.HeaderHandler, shardHeaderHash []byte))
- func (hcs *HeadersCacherStub) RemoveHeaderByHash(headerHash []byte)
- func (hcs *HeadersCacherStub) RemoveHeaderByNonceAndShardId(hdrNonce uint64, shardId uint32)
- type IndexerStub
- func (im *IndexerStub) Close() error
- func (im *IndexerStub) IsInterfaceNil() bool
- func (im *IndexerStub) IsNilIndexer() bool
- func (im *IndexerStub) RevertIndexedBlock(_ data.HeaderHandler, _ data.BodyHandler)
- func (im *IndexerStub) SaveAccounts(_ uint64, _ []state.UserAccountHandler)
- func (im *IndexerStub) SaveBlock(args *indexer.ArgsSaveBlockData)
- func (im *IndexerStub) SaveRoundsInfo(_ []*indexer.RoundInfo)
- func (im *IndexerStub) SaveValidatorsPubKeys(_ map[uint32][][]byte, _ uint32)
- func (im *IndexerStub) SaveValidatorsRating(_ string, _ []*indexer.ValidatorRatingInfo)
- func (im *IndexerStub) SetTxLogsProcessor(_ process.TransactionLogProcessorDatabase)
- func (im *IndexerStub) UpdateTPS(_ statistics.TPSBenchmark)
- type InterceptorStub
- func (is *InterceptorStub) IsInterfaceNil() bool
- func (is *InterceptorStub) ProcessReceivedMessage(message p2p.MessageP2P, _ core.PeerID) error
- func (is *InterceptorStub) RegisterHandler(_ func(topic string, hash []byte, data interface{}))
- func (is *InterceptorStub) SetInterceptedDebugHandler(handler process.InterceptedDebugger) error
- type InterceptorsContainerStub
- func (ics *InterceptorsContainerStub) Add(_ string, _ process.Interceptor) error
- func (ics *InterceptorsContainerStub) AddMultiple(_ []string, _ []process.Interceptor) error
- func (ics *InterceptorsContainerStub) Get(topic string) (process.Interceptor, error)
- func (ics *InterceptorsContainerStub) IsInterfaceNil() bool
- func (ics *InterceptorsContainerStub) Iterate(handler func(key string, interceptor process.Interceptor) bool)
- func (ics *InterceptorsContainerStub) Len() int
- func (ics *InterceptorsContainerStub) Remove(_ string)
- func (ics *InterceptorsContainerStub) Replace(_ string, _ process.Interceptor) error
- type IntermProcessorContainerStub
- func (ipcm *IntermProcessorContainerStub) Add(_ block.Type, _ process.IntermediateTransactionHandler) error
- func (ipcm *IntermProcessorContainerStub) AddMultiple(_ []block.Type, _ []process.IntermediateTransactionHandler) error
- func (ipcm *IntermProcessorContainerStub) Get(key block.Type) (process.IntermediateTransactionHandler, error)
- func (ipcm *IntermProcessorContainerStub) IsInterfaceNil() bool
- func (ipcm *IntermProcessorContainerStub) Keys() []block.Type
- func (ipcm *IntermProcessorContainerStub) Len() int
- func (ipcm *IntermProcessorContainerStub) Remove(_ block.Type)
- func (ipcm *IntermProcessorContainerStub) Replace(_ block.Type, _ process.IntermediateTransactionHandler) error
- type IntermediateTransactionHandlerStub
- func (ith *IntermediateTransactionHandlerStub) AddIntermediateTransactions(txs []data.TransactionHandler) error
- func (ith *IntermediateTransactionHandlerStub) CreateAllInterMiniBlocks() []*block.MiniBlock
- func (ith *IntermediateTransactionHandlerStub) CreateBlockStarted()
- func (ith *IntermediateTransactionHandlerStub) CreateMarshalizedData(txHashes [][]byte) ([][]byte, error)
- func (ith *IntermediateTransactionHandlerStub) GetAllCurrentFinishedTxs() map[string]data.TransactionHandler
- func (ith *IntermediateTransactionHandlerStub) GetCreatedInShardMiniBlock() *block.MiniBlock
- func (ith *IntermediateTransactionHandlerStub) GetIntermediateTransactions() []data.TransactionHandler
- func (ith *IntermediateTransactionHandlerStub) GetNumOfCrossInterMbsAndTxs() (int, int)
- func (ith *IntermediateTransactionHandlerStub) IsInterfaceNil() bool
- func (ith *IntermediateTransactionHandlerStub) RemoveProcessedResultsFor(txHashes [][]byte)
- func (ith *IntermediateTransactionHandlerStub) SaveCurrentIntermediateTxToStorage() error
- func (ith *IntermediateTransactionHandlerStub) 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(b []byte) (crypto.PrivateKey, error)
- func (keyGen *KeyGenMock) PublicKeyFromByteArray(b []byte) (crypto.PublicKey, error)
- func (keyGen *KeyGenMock) Suite() crypto.Suite
- type MarshalizerFake
- type MarshalizerMock
- type MessengerStub
- func (ms *MessengerStub) Bootstrap() error
- func (ms *MessengerStub) Broadcast(topic string, buff []byte)
- func (ms *MessengerStub) BroadcastOnChannel(channel string, topic string, buff []byte)
- func (ms *MessengerStub) BroadcastOnChannelBlocking(channel string, topic string, buff []byte) error
- func (ms *MessengerStub) Close() error
- func (ms *MessengerStub) CreateTopic(name string, createChannelForTopic bool) error
- func (ms *MessengerStub) HasTopic(name string) bool
- func (ms *MessengerStub) HasTopicValidator(name string) bool
- func (ms *MessengerStub) ID() core.PeerID
- func (ms *MessengerStub) IsConnectedToTheNetwork() bool
- func (ms *MessengerStub) IsInterfaceNil() bool
- func (ms *MessengerStub) PeerAddresses(pid core.PeerID) []string
- func (ms *MessengerStub) Peers() []core.PeerID
- func (ms *MessengerStub) RegisterMessageProcessor(topic string, handler p2p.MessageProcessor) error
- type MiniBlocksResolverStub
- func (mbrs *MiniBlocksResolverStub) IsInterfaceNil() bool
- func (mbrs *MiniBlocksResolverStub) NumPeersToQuery() (int, int)
- func (mbrs *MiniBlocksResolverStub) ProcessReceivedMessage(message p2p.MessageP2P, _ core.PeerID) error
- func (mbrs *MiniBlocksResolverStub) RequestDataFromHash(hash []byte, epoch uint32) error
- func (mbrs *MiniBlocksResolverStub) RequestDataFromHashArray(hashes [][]byte, epoch uint32) error
- func (mbrs *MiniBlocksResolverStub) SetNumPeersToQuery(intra int, cross int)
- func (mbrs *MiniBlocksResolverStub) SetResolverDebugHandler(handler dataRetriever.ResolverDebugHandler) error
- type MultisignMock
- func (mm *MultisignMock) AggregateCommitments(_ []byte) error
- func (mm *MultisignMock) AggregateSigs(_ []byte) ([]byte, error)
- func (mm *MultisignMock) Commitment(_ uint16) ([]byte, error)
- func (mm *MultisignMock) CommitmentHash(_ uint16) ([]byte, error)
- func (mm *MultisignMock) Create(_ []string, _ uint16) (crypto.MultiSigner, error)
- func (mm *MultisignMock) CreateCommitment() (commSecret []byte, commitment []byte)
- func (mm *MultisignMock) CreateSignatureShare(_ []byte, _ []byte) ([]byte, error)
- func (mm *MultisignMock) IsInterfaceNil() bool
- func (mm *MultisignMock) Reset(_ []string, _ uint16) error
- func (mm *MultisignMock) SetAggregatedSig([]byte) error
- func (mm *MultisignMock) SignatureShare(_ uint16) ([]byte, error)
- func (mm *MultisignMock) StoreCommitment(_ uint16, _ []byte) error
- func (mm *MultisignMock) StoreCommitmentHash(_ uint16, _ []byte) error
- func (mm *MultisignMock) StoreSignatureShare(_ uint16, _ []byte) error
- func (mm *MultisignMock) Verify(_ []byte, _ []byte) error
- func (mm *MultisignMock) VerifySignatureShare(_ uint16, _ []byte, _ []byte, _ []byte) error
- type NetworkShardingCollectorStub
- func (nscs *NetworkShardingCollectorStub) GetPeerInfo(pid core.PeerID) core.P2PPeerInfo
- func (nscs *NetworkShardingCollectorStub) IsInterfaceNil() bool
- func (nscs *NetworkShardingCollectorStub) UpdatePeerIdPublicKey(pid core.PeerID, pk []byte)
- func (nscs *NetworkShardingCollectorStub) UpdatePeerIdShardId(pid core.PeerID, shardId uint32)
- func (nscs *NetworkShardingCollectorStub) UpdatePublicKeyShardId(pk []byte, shardId uint32)
- type NodeRedundancyHandlerStub
- func (nrhs *NodeRedundancyHandlerStub) AdjustInactivityIfNeeded(selfPubKey string, consensusPubKeys []string, roundIndex int64)
- func (nrhs *NodeRedundancyHandlerStub) IsInterfaceNil() bool
- func (nrhs *NodeRedundancyHandlerStub) IsMainMachineActive() bool
- func (nrhs *NodeRedundancyHandlerStub) IsRedundancyNode() bool
- func (nrhs *NodeRedundancyHandlerStub) ObserverPrivateKey() crypto.PrivateKey
- func (nrhs *NodeRedundancyHandlerStub) ResetInactivityIfNeeded(selfPubKey string, consensusMsgPubKey string, consensusMsgPeerID core.PeerID)
- type NodeWrapperStub
- type NodesCoordinatorMock
- func (ncm *NodesCoordinatorMock) ComputeAdditionalLeaving([]*state.ShardValidatorInfo) (map[uint32][]sharding.Validator, error)
- func (ncm *NodesCoordinatorMock) ComputeConsensusGroup(randomness []byte, round uint64, shardId uint32, epoch uint32) (validatorsGroup []sharding.Validator, err error)
- func (ncm *NodesCoordinatorMock) ConsensusGroupSize(uint32) int
- func (ncm *NodesCoordinatorMock) GetAllEligibleValidatorsPublicKeys(_ uint32) (map[uint32][][]byte, error)
- func (ncm *NodesCoordinatorMock) GetAllLeavingValidatorsPublicKeys(_ uint32) (map[uint32][][]byte, error)
- func (ncm *NodesCoordinatorMock) GetAllWaitingValidatorsPublicKeys(_ uint32) (map[uint32][][]byte, error)
- func (ncm *NodesCoordinatorMock) GetChance(uint32) uint32
- func (ncm *NodesCoordinatorMock) GetConsensusValidatorsPublicKeys(randomness []byte, round uint64, shardId uint32, epoch uint32) ([]string, error)
- func (ncm *NodesCoordinatorMock) GetConsensusWhitelistedNodes(_ uint32) (map[string]struct{}, error)
- func (ncm *NodesCoordinatorMock) GetNumTotalEligible() uint64
- func (ncm *NodesCoordinatorMock) GetOwnPublicKey() []byte
- func (ncm *NodesCoordinatorMock) GetSavedStateKey() []byte
- func (ncm *NodesCoordinatorMock) GetSelectedPublicKeys(_ []byte, _ uint32, _ uint32) (publicKeys []string, err error)
- func (ncm *NodesCoordinatorMock) GetValidatorWithPublicKey(_ []byte) (sharding.Validator, uint32, error)
- func (ncm *NodesCoordinatorMock) GetValidatorsIndexes(_ []string, _ uint32) ([]uint64, error)
- func (ncm *NodesCoordinatorMock) IsInterfaceNil() bool
- func (ncm *NodesCoordinatorMock) LoadState(_ []byte) error
- func (ncm *NodesCoordinatorMock) SetConsensusGroupSize(_ int) error
- func (ncm *NodesCoordinatorMock) SetNodesPerShards(_ map[uint32][]sharding.Validator, _ map[uint32][]sharding.Validator, _ uint32) error
- func (ncm *NodesCoordinatorMock) ShardIdForEpoch(_ uint32) (uint32, error)
- func (ncm *NodesCoordinatorMock) ShuffleOutForEpoch(_ uint32)
- func (ncm *NodesCoordinatorMock) ValidatorsWeights(validators []sharding.Validator) ([]uint32, error)
- type P2PAntifloodHandlerStub
- func (p2pahs *P2PAntifloodHandlerStub) ApplyConsensusSize(size int)
- func (p2pahs *P2PAntifloodHandlerStub) BlacklistPeer(peer core.PeerID, reason string, duration time.Duration)
- func (p2pahs *P2PAntifloodHandlerStub) CanProcessMessage(message p2p.MessageP2P, fromConnectedPeer core.PeerID) error
- func (p2pahs *P2PAntifloodHandlerStub) CanProcessMessagesOnTopic(peer core.PeerID, topic string, numMessages uint32, totalSize uint64, ...) error
- func (p2pahs *P2PAntifloodHandlerStub) IsInterfaceNil() bool
- func (p2pahs *P2PAntifloodHandlerStub) ResetForTopic(_ string)
- func (p2pahs *P2PAntifloodHandlerStub) SetMaxMessagesForTopic(_ string, _ uint32)
- type P2PMessageStub
- func (msg *P2PMessageStub) Data() []byte
- func (msg *P2PMessageStub) From() []byte
- func (msg *P2PMessageStub) IsInterfaceNil() bool
- func (msg *P2PMessageStub) Key() []byte
- func (msg *P2PMessageStub) Peer() core.PeerID
- func (msg *P2PMessageStub) SeqNo() []byte
- func (msg *P2PMessageStub) Signature() []byte
- func (msg *P2PMessageStub) Topics() []string
- type PeerDenialEvaluatorStub
- type PeerSignatureHandler
- 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 PrivateKeyStub
- type PubkeyConverterMock
- type PubkeyConverterStub
- type PublicKeyMock
- type QueryHandlerStub
- type RequestHandlerStub
- func (rhs *RequestHandlerStub) GetNumPeersToQuery(key string) (int, int, error)
- func (rhs *RequestHandlerStub) IsInterfaceNil() bool
- func (rhs *RequestHandlerStub) RequestInterval() time.Duration
- func (rhs *RequestHandlerStub) RequestMetaHeader(hash []byte)
- func (rhs *RequestHandlerStub) RequestMetaHeaderByNonce(nonce uint64)
- func (rhs *RequestHandlerStub) RequestMiniBlock(destShardID uint32, miniblockHash []byte)
- func (rhs *RequestHandlerStub) RequestMiniBlocks(destShardID uint32, miniblocksHashes [][]byte)
- func (rhs *RequestHandlerStub) RequestRewardTransactions(destShardID uint32, txHashes [][]byte)
- func (rhs *RequestHandlerStub) RequestShardHeader(shardID uint32, hash []byte)
- func (rhs *RequestHandlerStub) RequestShardHeaderByNonce(shardID uint32, nonce uint64)
- func (rhs *RequestHandlerStub) RequestStartOfEpochMetaBlock(epoch uint32)
- func (rhs *RequestHandlerStub) RequestTransaction(destShardID uint32, txHashes [][]byte)
- func (rhs *RequestHandlerStub) RequestTrieNodes(destShardID uint32, hashes [][]byte, topic string)
- func (rhs *RequestHandlerStub) RequestUnsignedTransactions(destShardID uint32, txHashes [][]byte)
- func (rhs *RequestHandlerStub) SetEpoch(_ uint32)
- func (rhs *RequestHandlerStub) SetNumPeersToQuery(key string, intra int, cross int) error
- type ResolversFinderStub
- func (rfs *ResolversFinderStub) Add(key string, val dataRetriever.Resolver) error
- func (rfs *ResolversFinderStub) AddMultiple(_ []string, _ []dataRetriever.Resolver) error
- func (rfs *ResolversFinderStub) CrossShardResolver(baseTopic string, crossShard uint32) (dataRetriever.Resolver, error)
- func (rfs *ResolversFinderStub) Get(key string) (dataRetriever.Resolver, error)
- func (rfs *ResolversFinderStub) IntraShardResolver(baseTopic string) (dataRetriever.Resolver, error)
- func (rfs *ResolversFinderStub) IsInterfaceNil() bool
- func (rfs *ResolversFinderStub) Iterate(handler func(key string, resolver dataRetriever.Resolver) bool)
- func (rfs *ResolversFinderStub) Len() int
- func (rfs *ResolversFinderStub) MetaChainResolver(baseTopic string) (dataRetriever.Resolver, error)
- func (rfs *ResolversFinderStub) MetaCrossShardResolver(baseTopic string, crossShard uint32) (dataRetriever.Resolver, error)
- func (rfs *ResolversFinderStub) Remove(key string)
- func (rfs *ResolversFinderStub) Replace(key string, val dataRetriever.Resolver) error
- func (rfs *ResolversFinderStub) ResolverKeys() string
- type RounderMock
- func (rndm *RounderMock) BeforeGenesis() bool
- func (rndm *RounderMock) Index() int64
- func (rndm *RounderMock) IsInterfaceNil() bool
- func (rndm *RounderMock) RemainingTime(startTime time.Time, maxTime time.Duration) time.Duration
- func (rndm *RounderMock) TimeDuration() time.Duration
- func (rndm *RounderMock) TimeStamp() time.Time
- func (rndm *RounderMock) UpdateRound(genesisRoundTimeStamp time.Time, timeStamp time.Time)
- type SCQueryServiceStub
- type ShardCoordinatorMock
- func (scm ShardCoordinatorMock) CommunicationIdentifier(destShardID uint32) string
- func (scm ShardCoordinatorMock) ComputeId(addr []byte) uint32
- func (scm *ShardCoordinatorMock) IsInterfaceNil() bool
- func (scm ShardCoordinatorMock) NumberOfShards() uint32
- func (scm ShardCoordinatorMock) SameShard(_, _ []byte) bool
- func (scm ShardCoordinatorMock) SelfId() uint32
- func (scm ShardCoordinatorMock) SetSelfShardId(shardId uint32) error
- type SingleSignerMock
- type SinglesignFailMock
- type SinglesignMock
- type SinglesignStub
- type StakeValuesProcessorStub
- type StatusMetricsStub
- func (sms *StatusMetricsStub) ConfigMetrics() map[string]interface{}
- func (sms *StatusMetricsStub) EconomicsMetrics() map[string]interface{}
- func (sms *StatusMetricsStub) IsInterfaceNil() bool
- func (sms *StatusMetricsStub) NetworkMetrics() map[string]interface{}
- func (sms *StatusMetricsStub) StatusMetricsMapWithoutP2P() map[string]interface{}
- func (sms *StatusMetricsStub) StatusMetricsWithoutP2PPrometheusString() string
- func (sms *StatusMetricsStub) StatusP2pMetricsMap() map[string]interface{}
- type StorageManagerStub
- func (sms *StorageManagerStub) CancelPrune(rootHash []byte, identifier data.TriePruningIdentifier)
- func (sms *StorageManagerStub) Database() data.DBWriteCacher
- func (sms *StorageManagerStub) EnterPruningBufferingMode()
- func (sms *StorageManagerStub) ExitPruningBufferingMode()
- func (sms *StorageManagerStub) GetSnapshotDbBatchDelay() int
- func (sms *StorageManagerStub) GetSnapshotThatContainsHash(d []byte) data.SnapshotDbHandler
- func (sms *StorageManagerStub) IsInterfaceNil() bool
- func (sms *StorageManagerStub) IsPruningEnabled() bool
- func (sms *StorageManagerStub) MarkForEviction(d []byte, m data.ModifiedHashes) error
- func (sms *StorageManagerStub) Prune(rootHash []byte, identifier data.TriePruningIdentifier)
- func (sms *StorageManagerStub) SetCheckpoint(rootHash []byte)
- func (sms *StorageManagerStub) TakeSnapshot(rootHash []byte)
- type StorerMock
- func (sm *StorerMock) ClearCache()
- func (sm *StorerMock) Close() error
- func (sm *StorerMock) DestroyUnit() error
- func (sm *StorerMock) Get(key []byte) ([]byte, error)
- func (sm *StorerMock) GetBulkFromEpoch(keys [][]byte, _ uint32) (map[string][]byte, error)
- func (sm *StorerMock) GetFromEpoch(key []byte, _ uint32) ([]byte, error)
- func (sm *StorerMock) Has(_ []byte) error
- func (sm *StorerMock) HasInEpoch(_ []byte, _ uint32) error
- func (sm *StorerMock) IsInterfaceNil() bool
- func (sm *StorerMock) Put(key, data []byte) error
- func (sm *StorerMock) PutInEpoch(key, data []byte, _ uint32) error
- func (sm *StorerMock) RangeKeys(_ func(_ []byte, _ []byte) bool)
- func (sm *StorerMock) Remove(_ []byte) error
- func (sm *StorerMock) SearchFirst(_ []byte) ([]byte, error)
- type StorerStub
- func (ss *StorerStub) ClearCache()
- func (ss *StorerStub) Close() error
- func (ss *StorerStub) DestroyUnit() error
- func (ss *StorerStub) Get(key []byte) ([]byte, error)
- func (ss *StorerStub) GetBulkFromEpoch(keys [][]byte, epoch uint32) (map[string][]byte, error)
- func (ss *StorerStub) GetFromEpoch(key []byte, epoch uint32) ([]byte, error)
- func (ss *StorerStub) Has(key []byte) error
- func (ss *StorerStub) HasInEpoch(key []byte, epoch uint32) error
- func (ss *StorerStub) IsInterfaceNil() bool
- func (ss *StorerStub) Put(key, data []byte) error
- func (ss *StorerStub) PutInEpoch(key, data []byte, epoch uint32) error
- func (ss *StorerStub) RangeKeys(handler func(key []byte, val []byte) bool)
- func (ss *StorerStub) Remove(key []byte) error
- func (ss *StorerStub) SearchFirst(key []byte) ([]byte, error)
- type Streamer
- type SuiteMock
- func (s *SuiteMock) CreatePoint() crypto.Point
- func (s *SuiteMock) CreateScalar() crypto.Scalar
- func (s *SuiteMock) GetUnderlyingSuite() interface{}
- func (s *SuiteMock) IsInterfaceNil() bool
- func (s *SuiteMock) PointLen() int
- func (s *SuiteMock) RandomStream() cipher.Stream
- func (s *SuiteMock) ScalarLen() int
- func (s *SuiteMock) String() string
- type SyncTimerStub
- type ThrottlerStub
- type TimeCacheStub
- type TransactionCostEstimatorMock
- type TrieStub
- func (ts *TrieStub) AppendToOldHashes(hashes [][]byte)
- func (ts *TrieStub) ClosePersister() error
- func (ts *TrieStub) Commit() error
- func (ts *TrieStub) Delete(key []byte) error
- func (ts *TrieStub) Get(key []byte) ([]byte, error)
- func (ts *TrieStub) GetAllHashes() ([][]byte, error)
- func (ts *TrieStub) GetAllLeavesOnChannel(rootHash []byte, _ context.Context) (chan core.KeyValueHolder, error)
- func (ts *TrieStub) GetDirtyHashes() (data.ModifiedHashes, error)
- func (ts *TrieStub) GetNumNodes() data.NumNodesDTO
- func (ts *TrieStub) GetProof(key []byte) ([][]byte, error)
- func (ts *TrieStub) GetSerializedNode(bytes []byte) ([]byte, error)
- func (ts *TrieStub) GetSerializedNodes(hash []byte, maxBuffToSend uint64) ([][]byte, uint64, error)
- func (ts *TrieStub) GetStorageManager() data.StorageManager
- func (ts *TrieStub) IsInterfaceNil() bool
- func (ts *TrieStub) Recreate(root []byte) (data.Trie, error)
- func (ts *TrieStub) ResetOldHashes() [][]byte
- func (ts *TrieStub) RootHash() ([]byte, error)
- func (ts *TrieStub) SetNewHashes(_ data.ModifiedHashes)
- func (ts *TrieStub) String() string
- func (ts *TrieStub) Update(key, value []byte) error
- func (ts *TrieStub) VerifyProof(key []byte, proof [][]byte) (bool, error)
- type TxProcessorStub
- type ValidatorMock
- type ValidatorStatisticsProcessorMock
- func (vsp *ValidatorStatisticsProcessorMock) Commit() ([]byte, error)
- func (vsp *ValidatorStatisticsProcessorMock) DisplayRatings(_ uint32)
- func (vsp *ValidatorStatisticsProcessorMock) GetExistingPeerAccount(address []byte) (state.PeerAccountHandler, error)
- func (vsp *ValidatorStatisticsProcessorMock) GetValidatorInfoForRootHash(rootHash []byte) (map[uint32][]*state.ValidatorInfo, error)
- func (vsp *ValidatorStatisticsProcessorMock) IsInterfaceNil() bool
- func (vsp *ValidatorStatisticsProcessorMock) LastFinalizedRootHash() []byte
- func (vsp *ValidatorStatisticsProcessorMock) PeerAccountToValidatorInfo(peerAccount state.PeerAccountHandler) *state.ValidatorInfo
- func (vsp *ValidatorStatisticsProcessorMock) Process(validatorInfo data.ShardValidatorInfoHandler) error
- func (vsp *ValidatorStatisticsProcessorMock) ProcessRatingsEndOfEpoch(validatorInfos map[uint32][]*state.ValidatorInfo, epoch uint32) error
- func (vsp *ValidatorStatisticsProcessorMock) ResetValidatorStatisticsAtNewEpoch(vInfos map[uint32][]*state.ValidatorInfo) error
- func (vsp *ValidatorStatisticsProcessorMock) RevertPeerState(header data.HeaderHandler) error
- func (vsp *ValidatorStatisticsProcessorMock) RootHash() ([]byte, error)
- func (vsp *ValidatorStatisticsProcessorMock) SaveNodesCoordinatorUpdates(epoch uint32) (bool, error)
- func (vsp *ValidatorStatisticsProcessorMock) SetLastFinalizedRootHash(_ []byte)
- func (vsp *ValidatorStatisticsProcessorMock) UpdatePeerState(header data.HeaderHandler, _ map[string]data.HeaderHandler) ([]byte, error)
- type ValidatorStatisticsProcessorStub
- func (vsp *ValidatorStatisticsProcessorStub) Commit() ([]byte, error)
- func (vsp *ValidatorStatisticsProcessorStub) DisplayRatings(_ uint32)
- func (vsp *ValidatorStatisticsProcessorStub) GetExistingPeerAccount(address []byte) (state.PeerAccountHandler, error)
- func (vsp *ValidatorStatisticsProcessorStub) GetValidatorInfoForRootHash(rootHash []byte) (map[uint32][]*state.ValidatorInfo, error)
- func (vsp *ValidatorStatisticsProcessorStub) IsInterfaceNil() bool
- func (vsp *ValidatorStatisticsProcessorStub) LastFinalizedRootHash() []byte
- func (vsp *ValidatorStatisticsProcessorStub) PeerAccountToValidatorInfo(peerAccount state.PeerAccountHandler) *state.ValidatorInfo
- func (vsp *ValidatorStatisticsProcessorStub) Process(validatorInfo data.ShardValidatorInfoHandler) error
- func (vsp *ValidatorStatisticsProcessorStub) ProcessRatingsEndOfEpoch(validatorInfos map[uint32][]*state.ValidatorInfo, epoch uint32) error
- func (vsp *ValidatorStatisticsProcessorStub) ResetValidatorStatisticsAtNewEpoch(vInfos map[uint32][]*state.ValidatorInfo) error
- func (vsp *ValidatorStatisticsProcessorStub) RevertPeerState(header data.HeaderHandler) error
- func (vsp *ValidatorStatisticsProcessorStub) RootHash() ([]byte, error)
- func (vsp *ValidatorStatisticsProcessorStub) SaveNodesCoordinatorUpdates(epoch uint32) (bool, error)
- func (vsp *ValidatorStatisticsProcessorStub) SetLastFinalizedRootHash(_ []byte)
- func (vsp *ValidatorStatisticsProcessorStub) UpdatePeerState(header data.HeaderHandler, _ map[string]data.HeaderHandler) ([]byte, error)
- type ValidatorsProviderStub
- type WatchdogMock
- type WhiteListHandlerStub
- func (w *WhiteListHandlerStub) Add(keys [][]byte)
- func (w *WhiteListHandlerStub) IsForCurrentShard(interceptedData process.InterceptedData) bool
- func (w *WhiteListHandlerStub) IsInterfaceNil() bool
- func (w *WhiteListHandlerStub) IsWhiteListed(interceptedData process.InterceptedData) bool
- func (w *WhiteListHandlerStub) Remove(keys [][]byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAccumulatorMock ¶
func NewAccumulatorMock() *accumulatorMock
NewAccumulatorMock returns a mock implementation of the accumulator interface
func NewMultiShardsCoordinatorMock ¶
func NewMultiShardsCoordinatorMock(nrShard uint32) *multipleShardsCoordinatorMock
NewMultiShardsCoordinatorMock -
func NewNonceHashConverterMock ¶
func NewNonceHashConverterMock() *nonceHashConverterMock
NewNonceHashConverterMock -
func NewOneShardCoordinatorMock ¶
func NewOneShardCoordinatorMock() *oneShardCoordinatorMock
NewOneShardCoordinatorMock -
Types ¶
type AccountWrapMock ¶ added in v1.1.1
type AccountWrapMock struct { MockValue int SetNonceWithJournalCalled func(nonce uint64) error `json:"-"` SetCodeHashWithJournalCalled func(codeHash []byte) error `json:"-"` SetCodeWithJournalCalled func(codeHash []byte) error `json:"-"` // contains filtered or unexported fields }
AccountWrapMock -
func NewAccountWrapMock ¶ added in v1.1.1
func NewAccountWrapMock(adr []byte) *AccountWrapMock
NewAccountWrapMock -
func (*AccountWrapMock) AddToBalance ¶ added in v1.1.1
func (awm *AccountWrapMock) AddToBalance(_ *big.Int) error
AddToBalance -
func (*AccountWrapMock) AddToDeveloperReward ¶ added in v1.1.1
func (awm *AccountWrapMock) AddToDeveloperReward(*big.Int)
AddToDeveloperReward -
func (*AccountWrapMock) AddressBytes ¶ added in v1.1.1
func (awm *AccountWrapMock) AddressBytes() []byte
AddressBytes -
func (*AccountWrapMock) ChangeOwnerAddress ¶ added in v1.1.1
func (awm *AccountWrapMock) ChangeOwnerAddress([]byte, []byte) error
ChangeOwnerAddress -
func (*AccountWrapMock) ClaimDeveloperRewards ¶ added in v1.1.1
func (awm *AccountWrapMock) ClaimDeveloperRewards([]byte) (*big.Int, error)
ClaimDeveloperRewards -
func (*AccountWrapMock) DataTrie ¶ added in v1.1.1
func (awm *AccountWrapMock) DataTrie() data.Trie
DataTrie -
func (*AccountWrapMock) DataTrieTracker ¶ added in v1.1.1
func (awm *AccountWrapMock) DataTrieTracker() state.DataTrieTracker
DataTrieTracker -
func (*AccountWrapMock) GetBalance ¶ added in v1.1.1
func (awm *AccountWrapMock) GetBalance() *big.Int
GetBalance -
func (*AccountWrapMock) GetCodeHash ¶ added in v1.1.1
func (awm *AccountWrapMock) GetCodeHash() []byte
GetCodeHash -
func (*AccountWrapMock) GetCodeMetadata ¶ added in v1.1.1
func (awm *AccountWrapMock) GetCodeMetadata() []byte
GetCodeMetadata -
func (*AccountWrapMock) GetDeveloperReward ¶ added in v1.1.1
func (awm *AccountWrapMock) GetDeveloperReward() *big.Int
GetDeveloperReward -
func (*AccountWrapMock) GetNonce ¶ added in v1.1.1
func (awm *AccountWrapMock) GetNonce() uint64
GetNonce -
func (*AccountWrapMock) GetOwnerAddress ¶ added in v1.1.1
func (awm *AccountWrapMock) GetOwnerAddress() []byte
GetOwnerAddress -
func (*AccountWrapMock) GetRootHash ¶ added in v1.1.1
func (awm *AccountWrapMock) GetRootHash() []byte
GetRootHash -
func (*AccountWrapMock) GetUserName ¶ added in v1.1.1
func (awm *AccountWrapMock) GetUserName() []byte
GetUserName -
func (*AccountWrapMock) HasNewCode ¶ added in v1.1.22
func (awm *AccountWrapMock) HasNewCode() bool
HasNewCode -
func (*AccountWrapMock) IncreaseNonce ¶ added in v1.1.1
func (awm *AccountWrapMock) IncreaseNonce(val uint64)
IncreaseNonce -
func (*AccountWrapMock) IsInterfaceNil ¶ added in v1.1.1
func (awm *AccountWrapMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*AccountWrapMock) SetCode ¶ added in v1.1.1
func (awm *AccountWrapMock) SetCode(code []byte)
SetCode -
func (*AccountWrapMock) SetCodeHash ¶ added in v1.1.1
func (awm *AccountWrapMock) SetCodeHash(codeHash []byte)
SetCodeHash -
func (*AccountWrapMock) SetCodeMetadata ¶ added in v1.1.1
func (awm *AccountWrapMock) SetCodeMetadata(codeMetadata []byte)
SetCodeMetadata -
func (*AccountWrapMock) SetDataTrie ¶ added in v1.1.1
func (awm *AccountWrapMock) SetDataTrie(trie data.Trie)
SetDataTrie -
func (*AccountWrapMock) SetOwnerAddress ¶ added in v1.1.1
func (awm *AccountWrapMock) SetOwnerAddress([]byte)
SetOwnerAddress -
func (*AccountWrapMock) SetRootHash ¶ added in v1.1.1
func (awm *AccountWrapMock) SetRootHash(rootHash []byte)
SetRootHash -
func (*AccountWrapMock) SetUserName ¶ added in v1.1.1
func (awm *AccountWrapMock) SetUserName(_ []byte)
SetUserName -
func (*AccountWrapMock) SubFromBalance ¶ added in v1.1.1
func (awm *AccountWrapMock) SubFromBalance(_ *big.Int) error
SubFromBalance -
type AccountsFactoryStub ¶
type AccountsFactoryStub struct {
CreateAccountCalled func(address []byte) (state.AccountHandler, error)
}
AccountsFactoryStub -
func (*AccountsFactoryStub) CreateAccount ¶
func (afs *AccountsFactoryStub) CreateAccount(address []byte) (state.AccountHandler, error)
CreateAccount -
func (*AccountsFactoryStub) IsInterfaceNil ¶
func (afs *AccountsFactoryStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type AccountsStub ¶
type AccountsStub struct { GetExistingAccountCalled func(addressContainer []byte) (state.AccountHandler, error) LoadAccountCalled func(container []byte) (state.AccountHandler, error) SaveAccountCalled func(account state.AccountHandler) error RemoveAccountCalled func(addressContainer []byte) error CommitCalled func() ([]byte, error) JournalLenCalled func() int RevertToSnapshotCalled func(snapshot int) error RootHashCalled func() ([]byte, error) RecreateTrieCalled func(rootHash []byte) error PruneTrieCalled func(rootHash []byte, identifier data.TriePruningIdentifier) CancelPruneCalled func(rootHash []byte, identifier data.TriePruningIdentifier) SnapshotStateCalled func(rootHash []byte) SetStateCheckpointCalled func(rootHash []byte) IsPruningEnabledCalled func() bool GetAllLeavesCalled func(rootHash []byte) (chan core.KeyValueHolder, error) RecreateAllTriesCalled func(rootHash []byte) (map[string]data.Trie, error) GetNumCheckpointsCalled func() uint32 GetCodeCalled func([]byte) []byte }
AccountsStub -
func (*AccountsStub) CancelPrune ¶
func (as *AccountsStub) CancelPrune(rootHash []byte, identifier data.TriePruningIdentifier)
CancelPrune -
func (*AccountsStub) GetAllLeaves ¶
func (as *AccountsStub) GetAllLeaves(rootHash []byte, _ context.Context) (chan core.KeyValueHolder, error)
GetAllLeaves -
func (*AccountsStub) GetCode ¶ added in v1.1.22
func (as *AccountsStub) GetCode(codeHash []byte) []byte
GetCode -
func (*AccountsStub) GetExistingAccount ¶
func (as *AccountsStub) GetExistingAccount(addressContainer []byte) (state.AccountHandler, error)
GetExistingAccount -
func (*AccountsStub) GetNumCheckpoints ¶ added in v1.0.149
func (as *AccountsStub) GetNumCheckpoints() uint32
GetNumCheckpoints -
func (*AccountsStub) IsInterfaceNil ¶
func (as *AccountsStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*AccountsStub) IsPruningEnabled ¶
func (as *AccountsStub) IsPruningEnabled() bool
IsPruningEnabled -
func (*AccountsStub) LoadAccount ¶
func (as *AccountsStub) LoadAccount(address []byte) (state.AccountHandler, error)
LoadAccount -
func (*AccountsStub) PruneTrie ¶
func (as *AccountsStub) PruneTrie(rootHash []byte, identifier data.TriePruningIdentifier)
PruneTrie -
func (*AccountsStub) RecreateAllTries ¶ added in v1.0.102
func (as *AccountsStub) RecreateAllTries(rootHash []byte, _ context.Context) (map[string]data.Trie, error)
RecreateAllTries -
func (*AccountsStub) RecreateTrie ¶
func (as *AccountsStub) RecreateTrie(rootHash []byte) error
RecreateTrie -
func (*AccountsStub) RemoveAccount ¶
func (as *AccountsStub) RemoveAccount(addressContainer []byte) error
RemoveAccount -
func (*AccountsStub) RevertToSnapshot ¶
func (as *AccountsStub) RevertToSnapshot(snapshot int) error
RevertToSnapshot -
func (*AccountsStub) SaveAccount ¶
func (as *AccountsStub) SaveAccount(account state.AccountHandler) error
SaveAccount -
func (*AccountsStub) SetStateCheckpoint ¶
func (as *AccountsStub) SetStateCheckpoint(rootHash []byte, _ context.Context)
SetStateCheckpoint -
func (*AccountsStub) SnapshotState ¶
func (as *AccountsStub) SnapshotState(rootHash []byte, _ context.Context)
SnapshotState -
type AppStatusHandlerStub ¶
type AppStatusHandlerStub struct { AddUint64Handler func(key string, value uint64) IncrementHandler func(key string) DecrementHandler func(key string) SetUInt64ValueHandler func(key string, value uint64) SetInt64ValueHandler func(key string, value int64) SetStringValueHandler func(key string, value string) CloseHandler func() }
AppStatusHandlerStub is a stub implementation of AppStatusHandler
func (*AppStatusHandlerStub) AddUint64 ¶
func (ashs *AppStatusHandlerStub) AddUint64(key string, value uint64)
AddUint64 will call the handler of the stub for incrementing
func (*AppStatusHandlerStub) Close ¶
func (ashs *AppStatusHandlerStub) Close()
Close will call the handler of the stub for closing
func (*AppStatusHandlerStub) Decrement ¶
func (ashs *AppStatusHandlerStub) Decrement(key string)
Decrement will call the handler of the stub for decrementing
func (*AppStatusHandlerStub) Increment ¶
func (ashs *AppStatusHandlerStub) Increment(key string)
Increment will call the handler of the stub for incrementing
func (*AppStatusHandlerStub) IsInterfaceNil ¶
func (ashs *AppStatusHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*AppStatusHandlerStub) SetInt64Value ¶
func (ashs *AppStatusHandlerStub) SetInt64Value(key string, value int64)
SetInt64Value will call the handler of the stub for setting an int64 value
func (*AppStatusHandlerStub) SetStringValue ¶
func (ashs *AppStatusHandlerStub) SetStringValue(key string, value string)
SetStringValue will call the handler of the stub for setting an string value
func (*AppStatusHandlerStub) SetUInt64Value ¶
func (ashs *AppStatusHandlerStub) SetUInt64Value(key string, value uint64)
SetUInt64Value will call the handler of the stub for setting an uint64 value
type BlockChainMock ¶
type BlockChainMock struct { GetGenesisHeaderCalled func() data.HeaderHandler SetGenesisHeaderCalled func(handler data.HeaderHandler) error GetGenesisHeaderHashCalled func() []byte SetGenesisHeaderHashCalled func([]byte) GetCurrentBlockHeaderCalled func() data.HeaderHandler SetCurrentBlockHeaderCalled func(data.HeaderHandler) error GetCurrentBlockHeaderHashCalled func() []byte SetCurrentBlockHeaderHashCalled func([]byte) GetLocalHeightCalled func() int64 SetLocalHeightCalled func(int64) GetNetworkHeightCalled func() int64 SetNetworkHeightCalled func(int64) HasBadBlockCalled func([]byte) bool PutBadBlockCalled func([]byte) CreateNewHeaderCalled func() data.HeaderHandler }
BlockChainMock is a mock implementation of the blockchain interface
func (*BlockChainMock) CreateNewHeader ¶
func (bc *BlockChainMock) CreateNewHeader() data.HeaderHandler
CreateNewHeader -
func (*BlockChainMock) GetCurrentBlockHeader ¶
func (bc *BlockChainMock) GetCurrentBlockHeader() data.HeaderHandler
GetCurrentBlockHeader returns current block header pointer
func (*BlockChainMock) GetCurrentBlockHeaderHash ¶
func (bc *BlockChainMock) GetCurrentBlockHeaderHash() []byte
GetCurrentBlockHeaderHash returns the current block header hash
func (*BlockChainMock) GetGenesisHeader ¶
func (bc *BlockChainMock) GetGenesisHeader() data.HeaderHandler
GetGenesisHeader returns the genesis block header pointer
func (*BlockChainMock) GetGenesisHeaderHash ¶
func (bc *BlockChainMock) GetGenesisHeaderHash() []byte
GetGenesisHeaderHash returns the genesis block header hash
func (*BlockChainMock) IsInterfaceNil ¶
func (bc *BlockChainMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*BlockChainMock) SetCurrentBlockHeader ¶
func (bc *BlockChainMock) SetCurrentBlockHeader(header data.HeaderHandler) error
SetCurrentBlockHeader sets current block header pointer
func (*BlockChainMock) SetCurrentBlockHeaderHash ¶
func (bc *BlockChainMock) SetCurrentBlockHeaderHash(hash []byte)
SetCurrentBlockHeaderHash returns the current block header hash
func (*BlockChainMock) SetGenesisHeader ¶
func (bc *BlockChainMock) SetGenesisHeader(genesisBlock data.HeaderHandler) error
SetGenesisHeader sets the genesis block header pointer
func (*BlockChainMock) SetGenesisHeaderHash ¶
func (bc *BlockChainMock) SetGenesisHeaderHash(hash []byte)
SetGenesisHeaderHash sets the genesis block header hash
type BlockProcessorStub ¶
type BlockProcessorStub struct { ProcessBlockCalled func(header data.HeaderHandler, body data.BodyHandler, haveTime func() time.Duration) error CommitBlockCalled func(header data.HeaderHandler, body data.BodyHandler) error RevertAccountStateCalled func(header data.HeaderHandler) CreateGenesisBlockCalled func(balances map[string]*big.Int) (data.HeaderHandler, error) CreateBlockCalled func(initialHdrData data.HeaderHandler, haveTime func() bool) (data.HeaderHandler, data.BodyHandler, error) RestoreBlockIntoPoolsCalled func(header data.HeaderHandler, body data.BodyHandler) error SetOnRequestTransactionCalled func(f func(destShardID uint32, txHash []byte)) MarshalizedDataToBroadcastCalled func(header data.HeaderHandler, body data.BodyHandler) (map[uint32][]byte, map[string][][]byte, error) DecodeBlockBodyCalled func(dta []byte) data.BodyHandler DecodeBlockHeaderCalled func(dta []byte) data.HeaderHandler AddLastNotarizedHdrCalled func(shardId uint32, processedHdr data.HeaderHandler) CreateNewHeaderCalled func(round uint64, nonce uint64) data.HeaderHandler PruneStateOnRollbackCalled func(currHeader data.HeaderHandler, prevHeader data.HeaderHandler) RevertStateToBlockCalled func(header data.HeaderHandler) error RevertIndexedBlockCalled func(header data.HeaderHandler) }
BlockProcessorStub mocks the implementation for a blockProcessor
func (*BlockProcessorStub) AddLastNotarizedHdr ¶
func (bps *BlockProcessorStub) AddLastNotarizedHdr(shardId uint32, processedHdr data.HeaderHandler)
AddLastNotarizedHdr -
func (*BlockProcessorStub) ApplyProcessedMiniBlocks ¶
func (bps *BlockProcessorStub) ApplyProcessedMiniBlocks(_ *processedMb.ProcessedMiniBlockTracker)
ApplyProcessedMiniBlocks -
func (*BlockProcessorStub) CommitBlock ¶
func (bps *BlockProcessorStub) CommitBlock(header data.HeaderHandler, body data.BodyHandler) error
CommitBlock mocks the commit of a block
func (*BlockProcessorStub) CreateBlock ¶
func (bps *BlockProcessorStub) CreateBlock(initialHdrData data.HeaderHandler, haveTime func() bool) (data.HeaderHandler, data.BodyHandler, error)
CreateBlock mocks the creation of a new block with header and body
func (*BlockProcessorStub) CreateGenesisBlock ¶
func (bps *BlockProcessorStub) CreateGenesisBlock(balances map[string]*big.Int) (data.HeaderHandler, error)
CreateGenesisBlock mocks the creation of a genesis block body
func (*BlockProcessorStub) CreateNewHeader ¶
func (bps *BlockProcessorStub) CreateNewHeader(round uint64, nonce uint64) data.HeaderHandler
CreateNewHeader creates a new header
func (*BlockProcessorStub) DecodeBlockBody ¶
func (bps *BlockProcessorStub) DecodeBlockBody(dta []byte) data.BodyHandler
DecodeBlockBody -
func (*BlockProcessorStub) DecodeBlockHeader ¶
func (bps *BlockProcessorStub) DecodeBlockHeader(dta []byte) data.HeaderHandler
DecodeBlockHeader -
func (*BlockProcessorStub) IsInterfaceNil ¶
func (bps *BlockProcessorStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*BlockProcessorStub) MarshalizedDataToBroadcast ¶
func (bps *BlockProcessorStub) MarshalizedDataToBroadcast(header data.HeaderHandler, body data.BodyHandler) (map[uint32][]byte, map[string][][]byte, error)
MarshalizedDataToBroadcast -
func (*BlockProcessorStub) ProcessBlock ¶
func (bps *BlockProcessorStub) ProcessBlock(header data.HeaderHandler, body data.BodyHandler, haveTime func() time.Duration) error
ProcessBlock mocks pocessing a block
func (*BlockProcessorStub) PruneStateOnRollback ¶
func (bps *BlockProcessorStub) PruneStateOnRollback(currHeader data.HeaderHandler, prevHeader data.HeaderHandler)
PruneStateOnRollback recreates thee state tries to the root hashes indicated by the provided header
func (*BlockProcessorStub) RestoreBlockIntoPools ¶
func (bps *BlockProcessorStub) RestoreBlockIntoPools(header data.HeaderHandler, body data.BodyHandler) error
RestoreBlockIntoPools -
func (*BlockProcessorStub) RestoreLastNotarizedHrdsToGenesis ¶
func (bps *BlockProcessorStub) RestoreLastNotarizedHrdsToGenesis()
RestoreLastNotarizedHrdsToGenesis -
func (*BlockProcessorStub) RevertAccountState ¶
func (bps *BlockProcessorStub) RevertAccountState(header data.HeaderHandler)
RevertAccountState mocks revert of the accounts state
func (*BlockProcessorStub) RevertIndexedBlock ¶ added in v1.1.6
func (bps *BlockProcessorStub) RevertIndexedBlock(header data.HeaderHandler)
RevertIndexedBlock -
func (*BlockProcessorStub) RevertStateToBlock ¶
func (bps *BlockProcessorStub) RevertStateToBlock(header data.HeaderHandler) error
RevertStateToBlock recreates the state tries to the root hashes indicated by the provided header
func (*BlockProcessorStub) SetNumProcessedObj ¶
func (bps *BlockProcessorStub) SetNumProcessedObj(_ uint64)
SetNumProcessedObj -
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) CheckBlockAgainstRounderCalled func(headerHandler data.HeaderHandler) error CheckBlockAgainstFinalCalled 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 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) CheckBlockAgainstRounder ¶
func (bts *BlockTrackerStub) CheckBlockAgainstRounder(headerHandler data.HeaderHandler) error
CheckBlockAgainstRounder -
func (*BlockTrackerStub) CheckBlockAgainstWhitelist ¶ added in v1.0.138
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 ¶ added in v1.0.104
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 ¶ added in v1.1.1
func (bts *BlockTrackerStub) RegisterFinalMetachainHeadersHandler(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte))
RegisterFinalMetachainHeadersHandler -
func (*BlockTrackerStub) RegisterSelfNotarizedFromCrossHeadersHandler ¶ added in v1.1.1
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 -
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(round int64) error
SaveLastRound -
type ChainHandlerStub ¶
type ChainHandlerStub struct { GetGenesisHeaderCalled func() data.HeaderHandler GetGenesisHeaderHashCalled func() []byte SetGenesisHeaderCalled func(gb data.HeaderHandler) error SetGenesisHeaderHashCalled func(hash []byte) SetCurrentBlockHeaderCalled func(bh data.HeaderHandler) error CreateNewHeaderCalled func() data.HeaderHandler }
ChainHandlerStub -
func (*ChainHandlerStub) CreateNewHeader ¶
func (chs *ChainHandlerStub) CreateNewHeader() data.HeaderHandler
CreateNewHeader -
func (*ChainHandlerStub) GetCurrentBlockHeader ¶
func (chs *ChainHandlerStub) GetCurrentBlockHeader() data.HeaderHandler
GetCurrentBlockHeader -
func (*ChainHandlerStub) GetCurrentBlockHeaderHash ¶
func (chs *ChainHandlerStub) GetCurrentBlockHeaderHash() []byte
GetCurrentBlockHeaderHash -
func (*ChainHandlerStub) GetGenesisHeader ¶
func (chs *ChainHandlerStub) GetGenesisHeader() data.HeaderHandler
GetGenesisHeader -
func (*ChainHandlerStub) GetGenesisHeaderHash ¶
func (chs *ChainHandlerStub) GetGenesisHeaderHash() []byte
GetGenesisHeaderHash -
func (*ChainHandlerStub) IsInterfaceNil ¶
func (chs *ChainHandlerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ChainHandlerStub) SetCurrentBlockHeader ¶
func (chs *ChainHandlerStub) SetCurrentBlockHeader(bh data.HeaderHandler) error
SetCurrentBlockHeader -
func (*ChainHandlerStub) SetCurrentBlockHeaderHash ¶
func (chs *ChainHandlerStub) SetCurrentBlockHeaderHash(_ []byte)
SetCurrentBlockHeaderHash -
func (*ChainHandlerStub) SetGenesisHeader ¶
func (chs *ChainHandlerStub) SetGenesisHeader(gb data.HeaderHandler) error
SetGenesisHeader -
func (*ChainHandlerStub) SetGenesisHeaderHash ¶
func (chs *ChainHandlerStub) SetGenesisHeaderHash(hash []byte)
SetGenesisHeaderHash -
type ChainStorerMock ¶
type ChainStorerMock struct { AddStorerCalled func(key dataRetriever.UnitType, s storage.Storer) GetStorerCalled func(unitType dataRetriever.UnitType) storage.Storer HasCalled func(unitType dataRetriever.UnitType, key []byte) error GetCalled func(unitType dataRetriever.UnitType, key []byte) ([]byte, error) PutCalled func(unitType dataRetriever.UnitType, key []byte, value []byte) error GetAllCalled func(unitType dataRetriever.UnitType, keys [][]byte) (map[string][]byte, error) DestroyCalled func() error CloseAllCalled func() error }
ChainStorerMock is a mock implementation of the ChainStorer interface
func (*ChainStorerMock) AddStorer ¶
func (bc *ChainStorerMock) AddStorer(key dataRetriever.UnitType, s storage.Storer)
AddStorer will add a new storer to the chain map
func (*ChainStorerMock) Destroy ¶
func (bc *ChainStorerMock) Destroy() error
Destroy removes the underlying files/resources used by the storage service
func (*ChainStorerMock) Get ¶
func (bc *ChainStorerMock) Get(unitType dataRetriever.UnitType, key []byte) ([]byte, error)
Get returns the value for the given key if found in the selected storage unit, nil otherwise. It can return an error if the provided unit type is not supported or if the storage unit underlying implementation reports an error
func (*ChainStorerMock) GetAll ¶
func (bc *ChainStorerMock) GetAll(unitType dataRetriever.UnitType, keys [][]byte) (map[string][]byte, error)
GetAll gets all the elements with keys in the keys array, from the selected storage unit It can report an error if the provided unit type is not supported, if there is a missing key in the unit, or if the underlying implementation of the storage unit reports an error.
func (*ChainStorerMock) GetStorer ¶
func (bc *ChainStorerMock) GetStorer(unitType dataRetriever.UnitType) storage.Storer
GetStorer returns the storer from the chain map or nil if the storer was not found
func (*ChainStorerMock) Has ¶
func (bc *ChainStorerMock) Has(unitType dataRetriever.UnitType, key []byte) error
Has returns true if the key is found in the selected Unit or false otherwise It can return an error if the provided unit type is not supported or if the underlying implementation of the storage unit reports an error.
func (*ChainStorerMock) IsInterfaceNil ¶
func (bc *ChainStorerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ChainStorerMock) Put ¶
func (bc *ChainStorerMock) Put(unitType dataRetriever.UnitType, key []byte, value []byte) error
Put stores the key, value pair in the selected storage unit It can return an error if the provided unit type is not supported or if the storage unit underlying implementation reports an error
func (*ChainStorerMock) SetEpochForPutOperation ¶ added in v1.0.109
func (bc *ChainStorerMock) SetEpochForPutOperation(epoch uint32)
SetEpochForPutOperation won't do anything
type DelegatedListProcessorStub ¶ added in v1.1.45
DelegatedListProcessorStub -
func (*DelegatedListProcessorStub) GetDelegatorsList ¶ added in v1.1.45
func (dlps *DelegatedListProcessorStub) GetDelegatorsList() ([]*api.Delegator, error)
GetDelegatorsList -
func (*DelegatedListProcessorStub) IsInterfaceNil ¶ added in v1.1.45
func (dlps *DelegatedListProcessorStub) IsInterfaceNil() bool
IsInterfaceNil -
type DirectStakedListProcessorStub ¶ added in v1.1.45
type DirectStakedListProcessorStub struct {
GetDirectStakedListCalled func() ([]*api.DirectStakedValue, error)
}
DirectStakedListProcessorStub -
func (*DirectStakedListProcessorStub) GetDirectStakedList ¶ added in v1.1.45
func (dslps *DirectStakedListProcessorStub) GetDirectStakedList() ([]*api.DirectStakedValue, error)
GetDirectStakedList -
func (*DirectStakedListProcessorStub) IsInterfaceNil ¶ added in v1.1.45
func (dslps *DirectStakedListProcessorStub) IsInterfaceNil() bool
IsInterfaceNil -
type EpochStartNotifierStub ¶
type EpochStartNotifierStub struct { RegisterHandlerCalled func(handler epochStart.ActionHandler) UnregisterHandlerCalled func(handler epochStart.ActionHandler) NotifyAllCalled func(hdr data.HeaderHandler) NotifyAllPrepareCalled func(hdr data.HeaderHandler, body data.BodyHandler) // contains filtered or unexported fields }
EpochStartNotifierStub -
func (*EpochStartNotifierStub) IsInterfaceNil ¶
func (esnm *EpochStartNotifierStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*EpochStartNotifierStub) NotifyAll ¶
func (esnm *EpochStartNotifierStub) NotifyAll(hdr data.HeaderHandler)
NotifyAll -
func (*EpochStartNotifierStub) NotifyAllPrepare ¶
func (esnm *EpochStartNotifierStub) NotifyAllPrepare(metaHdr data.HeaderHandler, body data.BodyHandler)
NotifyAllPrepare -
func (*EpochStartNotifierStub) RegisterHandler ¶
func (esnm *EpochStartNotifierStub) RegisterHandler(handler epochStart.ActionHandler)
RegisterHandler -
func (*EpochStartNotifierStub) UnregisterHandler ¶
func (esnm *EpochStartNotifierStub) UnregisterHandler(handler epochStart.ActionHandler)
UnregisterHandler -
type EpochStartTriggerStub ¶
type EpochStartTriggerStub struct { ForceEpochStartCalled func(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) Close ¶ added in v1.0.116
func (e *EpochStartTriggerStub) Close() error
Close -
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) 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 ¶ added in v1.0.104
func (e *EpochStartTriggerStub) MetaEpoch() uint32
MetaEpoch -
func (*EpochStartTriggerStub) NotifyAll ¶
func (e *EpochStartTriggerStub) NotifyAll(_ data.HeaderHandler)
NotifyAll -
func (*EpochStartTriggerStub) RequestEpochStartIfNeeded ¶
func (e *EpochStartTriggerStub) RequestEpochStartIfNeeded(_ data.HeaderHandler)
RequestEpochStartIfNeeded -
func (*EpochStartTriggerStub) Revert ¶
func (e *EpochStartTriggerStub) Revert(_ data.HeaderHandler)
Revert -
func (*EpochStartTriggerStub) RevertStateToBlock ¶
func (e *EpochStartTriggerStub) RevertStateToBlock(_ data.HeaderHandler) error
RevertStateToBlock -
func (*EpochStartTriggerStub) SetAppStatusHandler ¶ added in v0.0.5
func (e *EpochStartTriggerStub) SetAppStatusHandler(_ core.AppStatusHandler) error
SetAppStatusHandler -
func (*EpochStartTriggerStub) SetCurrentEpochStartRound ¶
func (e *EpochStartTriggerStub) SetCurrentEpochStartRound(_ uint64)
SetCurrentEpochStartRound -
func (*EpochStartTriggerStub) SetFinalityAttestingRound ¶
func (e *EpochStartTriggerStub) SetFinalityAttestingRound(_ uint64)
SetFinalityAttestingRound -
func (*EpochStartTriggerStub) SetProcessed ¶
func (e *EpochStartTriggerStub) SetProcessed(header data.HeaderHandler, _ data.BodyHandler)
SetProcessed -
func (*EpochStartTriggerStub) Update ¶
func (e *EpochStartTriggerStub) Update(round uint64, nonce uint64)
Update -
type FeeHandlerStub ¶
type FeeHandlerStub struct { MaxGasLimitPerBlockCalled func() uint64 SetMinGasPriceCalled func(minasPrice uint64) SetMinGasLimitCalled func(minGasLimit uint64) ComputeGasLimitCalled func(tx process.TransactionWithFeeHandler) uint64 ComputeMoveBalanceFeeCalled func(tx process.TransactionWithFeeHandler) *big.Int ComputeTxFeeCalled func(tx process.TransactionWithFeeHandler) *big.Int CheckValidityTxValuesCalled func(tx process.TransactionWithFeeHandler) error DeveloperPercentageCalled func() float64 MinGasPriceCalled func() uint64 GasPriceModifierCalled func() float64 ComputeFeeForProcessingCalled func(tx process.TransactionWithFeeHandler, gasToUse uint64) *big.Int GenesisTotalSupplyCalled func() *big.Int }
FeeHandlerStub -
func (*FeeHandlerStub) CheckValidityTxValues ¶
func (fhs *FeeHandlerStub) CheckValidityTxValues(tx process.TransactionWithFeeHandler) error
CheckValidityTxValues -
func (*FeeHandlerStub) ComputeFeeForProcessing ¶ added in v1.1.15
func (fhs *FeeHandlerStub) ComputeFeeForProcessing(tx process.TransactionWithFeeHandler, gasToUse uint64) *big.Int
ComputeFeeForProcessing -
func (*FeeHandlerStub) ComputeGasLimit ¶
func (fhs *FeeHandlerStub) ComputeGasLimit(tx process.TransactionWithFeeHandler) uint64
ComputeGasLimit -
func (*FeeHandlerStub) ComputeMoveBalanceFee ¶ added in v1.1.1
func (fhs *FeeHandlerStub) ComputeMoveBalanceFee(tx process.TransactionWithFeeHandler) *big.Int
ComputeMoveBalanceFee -
func (*FeeHandlerStub) ComputeTxFee ¶ added in v1.1.1
func (fhs *FeeHandlerStub) ComputeTxFee(tx process.TransactionWithFeeHandler) *big.Int
ComputeTxFee -
func (*FeeHandlerStub) DeveloperPercentage ¶
func (fhs *FeeHandlerStub) DeveloperPercentage() float64
DeveloperPercentage -
func (*FeeHandlerStub) GasPriceModifier ¶ added in v1.1.15
func (fhs *FeeHandlerStub) GasPriceModifier() float64
GasPriceModifier -
func (*FeeHandlerStub) GenesisTotalSupply ¶ added in v1.1.22
func (fhs *FeeHandlerStub) GenesisTotalSupply() *big.Int
GenesisTotalSupply -
func (*FeeHandlerStub) IsInterfaceNil ¶
func (fhs *FeeHandlerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*FeeHandlerStub) MaxGasLimitPerBlock ¶
func (fhs *FeeHandlerStub) MaxGasLimitPerBlock(uint32) uint64
MaxGasLimitPerBlock -
type ForkDetectorMock ¶
type ForkDetectorMock struct { AddHeaderCalled func(header data.HeaderHandler, hash []byte, state process.BlockHeaderState, selfNotarizedHeaders []data.HeaderHandler, selfNotarizedHeadersHashes [][]byte) error RemoveHeaderCalled func(nonce uint64, hash []byte) CheckForkCalled func() *process.ForkInfo GetHighestFinalBlockNonceCalled func() uint64 GetHighestFinalBlockHashCalled func() []byte ProbableHighestNonceCalled func() uint64 ResetForkCalled func() GetNotarizedHeaderHashCalled func(nonce uint64) []byte SetRollBackNonceCalled func(nonce uint64) RestoreToGenesisCalled func() ResetProbableHighestNonceCalled func() SetFinalToLastCheckpointCalled func() }
ForkDetectorMock is a mock implementation for the ForkDetector interface
func (*ForkDetectorMock) AddHeader ¶
func (fdm *ForkDetectorMock) AddHeader(header data.HeaderHandler, hash []byte, state process.BlockHeaderState, selfNotarizedHeaders []data.HeaderHandler, selfNotarizedHeadersHashes [][]byte) error
AddHeader is a mock implementation for AddHeader
func (*ForkDetectorMock) CheckFork ¶
func (fdm *ForkDetectorMock) CheckFork() *process.ForkInfo
CheckFork is a mock implementation for CheckFork
func (*ForkDetectorMock) GetHighestFinalBlockHash ¶
func (fdm *ForkDetectorMock) GetHighestFinalBlockHash() []byte
GetHighestFinalBlockHash -
func (*ForkDetectorMock) GetHighestFinalBlockNonce ¶
func (fdm *ForkDetectorMock) GetHighestFinalBlockNonce() uint64
GetHighestFinalBlockNonce is a mock implementation for GetHighestFinalBlockNonce
func (*ForkDetectorMock) GetNotarizedHeaderHash ¶
func (fdm *ForkDetectorMock) GetNotarizedHeaderHash(nonce uint64) []byte
GetNotarizedHeaderHash -
func (*ForkDetectorMock) IsInterfaceNil ¶
func (fdm *ForkDetectorMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ForkDetectorMock) ProbableHighestNonce ¶
func (fdm *ForkDetectorMock) ProbableHighestNonce() uint64
ProbableHighestNonce is a mock implementation for GetProbableHighestNonce
func (*ForkDetectorMock) RemoveHeader ¶
func (fdm *ForkDetectorMock) RemoveHeader(nonce uint64, hash []byte)
RemoveHeader is a mock implementation for RemoveHeader
func (*ForkDetectorMock) ResetProbableHighestNonce ¶
func (fdm *ForkDetectorMock) ResetProbableHighestNonce()
ResetProbableHighestNonce -
func (*ForkDetectorMock) RestoreToGenesis ¶
func (fdm *ForkDetectorMock) RestoreToGenesis()
RestoreToGenesis -
func (*ForkDetectorMock) SetFinalToLastCheckpoint ¶ added in v1.1.1
func (fdm *ForkDetectorMock) SetFinalToLastCheckpoint()
SetFinalToLastCheckpoint -
func (*ForkDetectorMock) SetRollBackNonce ¶
func (fdm *ForkDetectorMock) SetRollBackNonce(nonce uint64)
SetRollBackNonce -
type GeneratorSuite ¶
GeneratorSuite -
type HardforkTriggerStub ¶ added in v1.0.102
type HardforkTriggerStub struct { TriggerCalled func(epoch uint32, withEarlyEndOfEpoch bool) error IsSelfTriggerCalled func() bool TriggerReceivedCalled func(payload []byte, data []byte, pkBytes []byte) (bool, error) RecordedTriggerMessageCalled func() ([]byte, bool) CreateDataCalled func() []byte AddCloserCalled func(closer update.Closer) error NotifyTriggerReceivedCalled func() <-chan struct{} }
HardforkTriggerStub -
func (*HardforkTriggerStub) AddCloser ¶ added in v1.0.133
func (hts *HardforkTriggerStub) AddCloser(closer update.Closer) error
AddCloser -
func (*HardforkTriggerStub) CreateData ¶ added in v1.0.102
func (hts *HardforkTriggerStub) CreateData() []byte
CreateData -
func (*HardforkTriggerStub) IsInterfaceNil ¶ added in v1.0.102
func (hts *HardforkTriggerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*HardforkTriggerStub) IsSelfTrigger ¶ added in v1.0.102
func (hts *HardforkTriggerStub) IsSelfTrigger() bool
IsSelfTrigger -
func (*HardforkTriggerStub) NotifyTriggerReceived ¶ added in v1.0.133
func (hts *HardforkTriggerStub) NotifyTriggerReceived() <-chan struct{}
NotifyTriggerReceived -
func (*HardforkTriggerStub) RecordedTriggerMessage ¶ added in v1.0.102
func (hts *HardforkTriggerStub) RecordedTriggerMessage() ([]byte, bool)
RecordedTriggerMessage -
func (*HardforkTriggerStub) Trigger ¶ added in v1.0.102
func (hts *HardforkTriggerStub) Trigger(epoch uint32, withEarlyEndOfEpoch bool) error
Trigger -
func (*HardforkTriggerStub) TriggerReceived ¶ added in v1.0.102
func (hts *HardforkTriggerStub) TriggerReceived(payload []byte, data []byte, pkBytes []byte) (bool, error)
TriggerReceived -
type HasherFake ¶
type HasherFake struct { }
HasherFake that will be used for testing
func (HasherFake) Compute ¶
func (sha HasherFake) Compute(s string) []byte
Compute will output the SHA's equivalent of the input string
func (HasherFake) EmptyHash ¶
func (sha HasherFake) EmptyHash() []byte
EmptyHash will return the equivalent of empty string SHA's
func (*HasherFake) IsInterfaceNil ¶
func (sha *HasherFake) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type HasherMock ¶
HasherMock -
func (HasherMock) IsInterfaceNil ¶
func (hash HasherMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type HeaderIntegrityVerifierStub ¶ added in v1.0.117
type HeaderIntegrityVerifierStub struct { VerifyCalled func(header data.HeaderHandler) error GetVersionCalled func(epoch uint32) string }
HeaderIntegrityVerifierStub -
func (*HeaderIntegrityVerifierStub) GetVersion ¶ added in v1.1.1
func (h *HeaderIntegrityVerifierStub) GetVersion(epoch uint32) string
GetVersion -
func (*HeaderIntegrityVerifierStub) IsInterfaceNil ¶ added in v1.0.117
func (h *HeaderIntegrityVerifierStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*HeaderIntegrityVerifierStub) Verify ¶ added in v1.0.117
func (h *HeaderIntegrityVerifierStub) Verify(header data.HeaderHandler) error
Verify -
type HeaderResolverStub ¶
type HeaderResolverStub struct { RequestDataFromHashCalled func(hash []byte, epoch uint32) error ProcessReceivedMessageCalled func(message p2p.MessageP2P) error RequestDataFromNonceCalled func(nonce uint64, epoch uint32) error RequestDataFromEpochCalled func(identifier []byte) error SetEpochHandlerCalled func(epochHandler dataRetriever.EpochHandler) error SetNumPeersToQueryCalled func(intra int, cross int) NumPeersToQueryCalled func() (int, int) SetResolverDebugHandlerCalled func(handler dataRetriever.ResolverDebugHandler) error }
HeaderResolverStub -
func (*HeaderResolverStub) IsInterfaceNil ¶
func (hrs *HeaderResolverStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*HeaderResolverStub) NumPeersToQuery ¶ added in v1.0.110
func (hrs *HeaderResolverStub) NumPeersToQuery() (int, int)
NumPeersToQuery -
func (*HeaderResolverStub) ProcessReceivedMessage ¶
func (hrs *HeaderResolverStub) ProcessReceivedMessage(message p2p.MessageP2P, _ core.PeerID) error
ProcessReceivedMessage -
func (*HeaderResolverStub) RequestDataFromEpoch ¶
func (hrs *HeaderResolverStub) RequestDataFromEpoch(identifier []byte) error
RequestDataFromEpoch -
func (*HeaderResolverStub) RequestDataFromHash ¶
func (hrs *HeaderResolverStub) RequestDataFromHash(hash []byte, epoch uint32) error
RequestDataFromHash -
func (*HeaderResolverStub) RequestDataFromNonce ¶
func (hrs *HeaderResolverStub) RequestDataFromNonce(nonce uint64, epoch uint32) error
RequestDataFromNonce -
func (*HeaderResolverStub) SetEpochHandler ¶
func (hrs *HeaderResolverStub) SetEpochHandler(epochHandler dataRetriever.EpochHandler) error
SetEpochHandler -
func (*HeaderResolverStub) SetNumPeersToQuery ¶ added in v1.0.102
func (hrs *HeaderResolverStub) SetNumPeersToQuery(intra int, cross int)
SetNumPeersToQuery -
func (*HeaderResolverStub) SetResolverDebugHandler ¶ added in v1.0.110
func (hrs *HeaderResolverStub) SetResolverDebugHandler(handler dataRetriever.ResolverDebugHandler) error
SetResolverDebugHandler -
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 ¶ added in v1.1.2
func (hsvm *HeaderSigVerifierStub) VerifyLeaderSignature(header data.HeaderHandler) error
VerifyLeaderSignature -
func (*HeaderSigVerifierStub) VerifyRandSeed ¶
func (hsvm *HeaderSigVerifierStub) VerifyRandSeed(header data.HeaderHandler) error
VerifyRandSeed -
func (*HeaderSigVerifierStub) VerifyRandSeedAndLeaderSignature ¶ added in v1.1.2
func (hsvm *HeaderSigVerifierStub) VerifyRandSeedAndLeaderSignature(header data.HeaderHandler) error
VerifyRandSeedAndLeaderSignature -
func (*HeaderSigVerifierStub) VerifySignature ¶ added in v1.1.2
func (hsvm *HeaderSigVerifierStub) VerifySignature(header data.HeaderHandler) error
VerifySignature -
type HeadersCacherStub ¶
type HeadersCacherStub struct { AddCalled func(headerHash []byte, header data.HeaderHandler) RemoveHeaderByHashCalled func(headerHash []byte) RemoveHeaderByNonceAndShardIdCalled func(hdrNonce uint64, shardId uint32) GetHeaderByNonceAndShardIdCalled func(hdrNonce uint64, shardId uint32) ([]data.HeaderHandler, [][]byte, error) GetHeaderByHashCalled func(hash []byte) (data.HeaderHandler, error) ClearCalled func() RegisterHandlerCalled func(handler func(header data.HeaderHandler, shardHeaderHash []byte)) NoncesCalled func(shardId uint32) []uint64 LenCalled func() int MaxSizeCalled func() int GetNumHeadersCalled func(shardId uint32) int }
HeadersCacherStub -
func (*HeadersCacherStub) AddHeader ¶
func (hcs *HeadersCacherStub) AddHeader(headerHash []byte, header data.HeaderHandler)
AddHeader -
func (*HeadersCacherStub) GetHeaderByHash ¶
func (hcs *HeadersCacherStub) GetHeaderByHash(hash []byte) (data.HeaderHandler, error)
GetHeaderByHash -
func (*HeadersCacherStub) GetHeadersByNonceAndShardId ¶
func (hcs *HeadersCacherStub) GetHeadersByNonceAndShardId(hdrNonce uint64, shardId uint32) ([]data.HeaderHandler, [][]byte, error)
GetHeadersByNonceAndShardId -
func (*HeadersCacherStub) GetNumHeaders ¶
func (hcs *HeadersCacherStub) GetNumHeaders(shardId uint32) int
GetNumHeaders -
func (*HeadersCacherStub) IsInterfaceNil ¶
func (hcs *HeadersCacherStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*HeadersCacherStub) Nonces ¶
func (hcs *HeadersCacherStub) Nonces(shardId uint32) []uint64
Nonces -
func (*HeadersCacherStub) RegisterHandler ¶
func (hcs *HeadersCacherStub) RegisterHandler(handler func(header data.HeaderHandler, shardHeaderHash []byte))
RegisterHandler -
func (*HeadersCacherStub) RemoveHeaderByHash ¶
func (hcs *HeadersCacherStub) RemoveHeaderByHash(headerHash []byte)
RemoveHeaderByHash -
func (*HeadersCacherStub) RemoveHeaderByNonceAndShardId ¶
func (hcs *HeadersCacherStub) RemoveHeaderByNonceAndShardId(hdrNonce uint64, shardId uint32)
RemoveHeaderByNonceAndShardId -
type IndexerStub ¶ added in v1.1.38
type IndexerStub struct {
SaveBlockCalled func(args *indexer.ArgsSaveBlockData)
}
IndexerStub is a mock implementation fot the Indexer interface
func (*IndexerStub) Close ¶ added in v1.1.38
func (im *IndexerStub) Close() error
Close will do nothing
func (*IndexerStub) IsInterfaceNil ¶ added in v1.1.38
func (im *IndexerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*IndexerStub) IsNilIndexer ¶ added in v1.1.38
func (im *IndexerStub) IsNilIndexer() bool
IsNilIndexer -
func (*IndexerStub) RevertIndexedBlock ¶ added in v1.1.38
func (im *IndexerStub) RevertIndexedBlock(_ data.HeaderHandler, _ data.BodyHandler)
RevertIndexedBlock -
func (*IndexerStub) SaveAccounts ¶ added in v1.1.38
func (im *IndexerStub) SaveAccounts(_ uint64, _ []state.UserAccountHandler)
SaveAccounts -
func (*IndexerStub) SaveBlock ¶ added in v1.1.38
func (im *IndexerStub) SaveBlock(args *indexer.ArgsSaveBlockData)
SaveBlock -
func (*IndexerStub) SaveRoundsInfo ¶ added in v1.1.38
func (im *IndexerStub) SaveRoundsInfo(_ []*indexer.RoundInfo)
SaveRoundsInfo -
func (*IndexerStub) SaveValidatorsPubKeys ¶ added in v1.1.38
func (im *IndexerStub) SaveValidatorsPubKeys(_ map[uint32][][]byte, _ uint32)
SaveValidatorsPubKeys -
func (*IndexerStub) SaveValidatorsRating ¶ added in v1.1.38
func (im *IndexerStub) SaveValidatorsRating(_ string, _ []*indexer.ValidatorRatingInfo)
SaveValidatorsRating -
func (*IndexerStub) SetTxLogsProcessor ¶ added in v1.1.38
func (im *IndexerStub) SetTxLogsProcessor(_ process.TransactionLogProcessorDatabase)
SetTxLogsProcessor will do nothing
func (*IndexerStub) UpdateTPS ¶ added in v1.1.38
func (im *IndexerStub) UpdateTPS(_ statistics.TPSBenchmark)
UpdateTPS -
type InterceptorStub ¶ added in v1.0.110
type InterceptorStub struct { ProcessReceivedMessageCalled func(message p2p.MessageP2P) error SetInterceptedDebugHandlerCalled func(handler process.InterceptedDebugger) error }
InterceptorStub -
func (*InterceptorStub) IsInterfaceNil ¶ added in v1.0.110
func (is *InterceptorStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*InterceptorStub) ProcessReceivedMessage ¶ added in v1.0.110
func (is *InterceptorStub) ProcessReceivedMessage(message p2p.MessageP2P, _ core.PeerID) error
ProcessReceivedMessage -
func (*InterceptorStub) RegisterHandler ¶ added in v1.0.133
func (is *InterceptorStub) RegisterHandler(_ func(topic string, hash []byte, data interface{}))
RegisterHandler -
func (*InterceptorStub) SetInterceptedDebugHandler ¶ added in v1.0.110
func (is *InterceptorStub) SetInterceptedDebugHandler(handler process.InterceptedDebugger) error
SetInterceptedDebugHandler -
type InterceptorsContainerStub ¶
type InterceptorsContainerStub struct { IterateCalled func(handler func(key string, interceptor process.Interceptor) bool) GetCalled func(string) (process.Interceptor, error) }
InterceptorsContainerStub -
func (*InterceptorsContainerStub) Add ¶
func (ics *InterceptorsContainerStub) Add(_ string, _ process.Interceptor) error
Add -
func (*InterceptorsContainerStub) AddMultiple ¶
func (ics *InterceptorsContainerStub) AddMultiple(_ []string, _ []process.Interceptor) error
AddMultiple -
func (*InterceptorsContainerStub) Get ¶
func (ics *InterceptorsContainerStub) Get(topic string) (process.Interceptor, error)
Get -
func (*InterceptorsContainerStub) IsInterfaceNil ¶
func (ics *InterceptorsContainerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*InterceptorsContainerStub) Iterate ¶ added in v1.0.102
func (ics *InterceptorsContainerStub) Iterate(handler func(key string, interceptor process.Interceptor) bool)
Iterate -
func (*InterceptorsContainerStub) Remove ¶
func (ics *InterceptorsContainerStub) Remove(_ string)
Remove -
func (*InterceptorsContainerStub) Replace ¶
func (ics *InterceptorsContainerStub) Replace(_ string, _ process.Interceptor) error
Replace -
type IntermProcessorContainerStub ¶ added in v1.1.1
type IntermProcessorContainerStub struct { GetCalled func(key block.Type) (process.IntermediateTransactionHandler, error) KeysCalled func() []block.Type }
IntermProcessorContainerStub -
func (*IntermProcessorContainerStub) Add ¶ added in v1.1.1
func (ipcm *IntermProcessorContainerStub) Add(_ block.Type, _ process.IntermediateTransactionHandler) error
Add -
func (*IntermProcessorContainerStub) AddMultiple ¶ added in v1.1.1
func (ipcm *IntermProcessorContainerStub) AddMultiple(_ []block.Type, _ []process.IntermediateTransactionHandler) error
AddMultiple -
func (*IntermProcessorContainerStub) Get ¶ added in v1.1.1
func (ipcm *IntermProcessorContainerStub) Get(key block.Type) (process.IntermediateTransactionHandler, error)
Get -
func (*IntermProcessorContainerStub) IsInterfaceNil ¶ added in v1.1.1
func (ipcm *IntermProcessorContainerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*IntermProcessorContainerStub) Keys ¶ added in v1.1.1
func (ipcm *IntermProcessorContainerStub) Keys() []block.Type
Keys -
func (*IntermProcessorContainerStub) Len ¶ added in v1.1.1
func (ipcm *IntermProcessorContainerStub) Len() int
Len -
func (*IntermProcessorContainerStub) Remove ¶ added in v1.1.1
func (ipcm *IntermProcessorContainerStub) Remove(_ block.Type)
Remove -
func (*IntermProcessorContainerStub) Replace ¶ added in v1.1.1
func (ipcm *IntermProcessorContainerStub) Replace(_ block.Type, _ process.IntermediateTransactionHandler) error
Replace -
type IntermediateTransactionHandlerStub ¶ added in v1.1.1
type IntermediateTransactionHandlerStub struct { AddIntermediateTransactionsCalled func(txs []data.TransactionHandler) error GetNumOfCrossInterMbsAndTxsCalled func() (int, int) CreateAllInterMiniBlocksCalled func() []*block.MiniBlock VerifyInterMiniBlocksCalled func(body *block.Body) error SaveCurrentIntermediateTxToStorageCalled func() error CreateBlockStartedCalled func() CreateMarshalizedDataCalled func(txHashes [][]byte) ([][]byte, error) GetAllCurrentFinishedTxsCalled func() map[string]data.TransactionHandler RemoveProcessedResultsForCalled func(txHashes [][]byte) // contains filtered or unexported fields }
IntermediateTransactionHandlerStub -
func (*IntermediateTransactionHandlerStub) AddIntermediateTransactions ¶ added in v1.1.1
func (ith *IntermediateTransactionHandlerStub) AddIntermediateTransactions(txs []data.TransactionHandler) error
AddIntermediateTransactions -
func (*IntermediateTransactionHandlerStub) CreateAllInterMiniBlocks ¶ added in v1.1.1
func (ith *IntermediateTransactionHandlerStub) CreateAllInterMiniBlocks() []*block.MiniBlock
CreateAllInterMiniBlocks -
func (*IntermediateTransactionHandlerStub) CreateBlockStarted ¶ added in v1.1.1
func (ith *IntermediateTransactionHandlerStub) CreateBlockStarted()
CreateBlockStarted -
func (*IntermediateTransactionHandlerStub) CreateMarshalizedData ¶ added in v1.1.1
func (ith *IntermediateTransactionHandlerStub) CreateMarshalizedData(txHashes [][]byte) ([][]byte, error)
CreateMarshalizedData -
func (*IntermediateTransactionHandlerStub) GetAllCurrentFinishedTxs ¶ added in v1.1.1
func (ith *IntermediateTransactionHandlerStub) GetAllCurrentFinishedTxs() map[string]data.TransactionHandler
GetAllCurrentFinishedTxs -
func (*IntermediateTransactionHandlerStub) GetCreatedInShardMiniBlock ¶ added in v1.1.1
func (ith *IntermediateTransactionHandlerStub) GetCreatedInShardMiniBlock() *block.MiniBlock
GetCreatedInShardMiniBlock -
func (*IntermediateTransactionHandlerStub) GetIntermediateTransactions ¶ added in v1.1.1
func (ith *IntermediateTransactionHandlerStub) GetIntermediateTransactions() []data.TransactionHandler
GetIntermediateTransactions -
func (*IntermediateTransactionHandlerStub) GetNumOfCrossInterMbsAndTxs ¶ added in v1.1.1
func (ith *IntermediateTransactionHandlerStub) GetNumOfCrossInterMbsAndTxs() (int, int)
GetNumOfCrossInterMbsAndTxs -
func (*IntermediateTransactionHandlerStub) IsInterfaceNil ¶ added in v1.1.1
func (ith *IntermediateTransactionHandlerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*IntermediateTransactionHandlerStub) RemoveProcessedResultsFor ¶ added in v1.1.1
func (ith *IntermediateTransactionHandlerStub) RemoveProcessedResultsFor(txHashes [][]byte)
RemoveProcessedResultsFor -
func (*IntermediateTransactionHandlerStub) SaveCurrentIntermediateTxToStorage ¶ added in v1.1.1
func (ith *IntermediateTransactionHandlerStub) SaveCurrentIntermediateTxToStorage() error
SaveCurrentIntermediateTxToStorage -
func (*IntermediateTransactionHandlerStub) VerifyInterMiniBlocks ¶ added in v1.1.1
func (ith *IntermediateTransactionHandlerStub) VerifyInterMiniBlocks(body *block.Body) error
VerifyInterMiniBlocks -
type KeyGenMock ¶
type KeyGenMock struct { GeneratePairMock func() (crypto.PrivateKey, crypto.PublicKey) PrivateKeyFromByteArrayMock func(b []byte) (crypto.PrivateKey, error) PublicKeyFromByteArrayMock func(b []byte) (crypto.PublicKey, error) SuiteMock func() crypto.Suite }
KeyGenMock -
func (*KeyGenMock) CheckPublicKeyValid ¶ added in v1.0.120
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(b []byte) (crypto.PrivateKey, error)
PrivateKeyFromByteArray -
func (*KeyGenMock) PublicKeyFromByteArray ¶
func (keyGen *KeyGenMock) PublicKeyFromByteArray(b []byte) (crypto.PublicKey, error)
PublicKeyFromByteArray -
type MarshalizerFake ¶
type MarshalizerFake struct {
Fail bool
}
MarshalizerFake that will be used for testing
func (*MarshalizerFake) IsInterfaceNil ¶
func (mm *MarshalizerFake) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*MarshalizerFake) Marshal ¶
func (mm *MarshalizerFake) Marshal(obj interface{}) ([]byte, error)
Marshal converts the input object in a slice of bytes
func (*MarshalizerFake) Unmarshal ¶
func (mm *MarshalizerFake) Unmarshal(obj interface{}, buff []byte) error
Unmarshal applies the serialized values over an instantiated object
type MarshalizerMock ¶
type MarshalizerMock struct { MarshalHandler func(obj interface{}) ([]byte, error) UnmarshalHandler func(obj interface{}, buff []byte) error }
MarshalizerMock -
func (*MarshalizerMock) IsInterfaceNil ¶
func (j *MarshalizerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (MarshalizerMock) Marshal ¶
func (j MarshalizerMock) Marshal(obj interface{}) ([]byte, error)
Marshal -
func (MarshalizerMock) Unmarshal ¶
func (j MarshalizerMock) Unmarshal(obj interface{}, buff []byte) error
Unmarshal -
type MessengerStub ¶
type MessengerStub struct { IDCalled func() core.PeerID CloseCalled func() error CreateTopicCalled func(name string, createChannelForTopic bool) error HasTopicCalled func(name string) bool HasTopicValidatorCalled func(name string) bool BroadcastOnChannelCalled func(channel string, topic string, buff []byte) BroadcastCalled func(topic string, buff []byte) RegisterMessageProcessorCalled func(topic string, handler p2p.MessageProcessor) error BootstrapCalled func() error PeerAddressesCalled func(pid core.PeerID) []string BroadcastOnChannelBlockingCalled func(channel string, topic string, buff []byte) error IsConnectedToTheNetworkCalled func() bool PeersCalled func() []core.PeerID }
MessengerStub -
func (*MessengerStub) Broadcast ¶
func (ms *MessengerStub) Broadcast(topic string, buff []byte)
Broadcast -
func (*MessengerStub) BroadcastOnChannel ¶
func (ms *MessengerStub) BroadcastOnChannel(channel string, topic string, buff []byte)
BroadcastOnChannel -
func (*MessengerStub) BroadcastOnChannelBlocking ¶
func (ms *MessengerStub) BroadcastOnChannelBlocking(channel string, topic string, buff []byte) error
BroadcastOnChannelBlocking -
func (*MessengerStub) CreateTopic ¶
func (ms *MessengerStub) CreateTopic(name string, createChannelForTopic bool) error
CreateTopic -
func (*MessengerStub) HasTopicValidator ¶
func (ms *MessengerStub) HasTopicValidator(name string) bool
HasTopicValidator -
func (*MessengerStub) IsConnectedToTheNetwork ¶
func (ms *MessengerStub) IsConnectedToTheNetwork() bool
IsConnectedToTheNetwork -
func (*MessengerStub) IsInterfaceNil ¶
func (ms *MessengerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*MessengerStub) PeerAddresses ¶ added in v1.0.130
func (ms *MessengerStub) PeerAddresses(pid core.PeerID) []string
PeerAddresses -
func (*MessengerStub) Peers ¶ added in v1.0.130
func (ms *MessengerStub) Peers() []core.PeerID
Peers -
func (*MessengerStub) RegisterMessageProcessor ¶
func (ms *MessengerStub) RegisterMessageProcessor(topic string, handler p2p.MessageProcessor) error
RegisterMessageProcessor -
type MiniBlocksResolverStub ¶
type MiniBlocksResolverStub struct { RequestDataFromHashCalled func(hash []byte, epoch uint32) error RequestDataFromHashArrayCalled func(hashes [][]byte, epoch uint32) error ProcessReceivedMessageCalled func(message p2p.MessageP2P) error SetNumPeersToQueryCalled func(intra int, cross int) NumPeersToQueryCalled func() (int, int) SetResolverDebugHandlerCalled func(handler dataRetriever.ResolverDebugHandler) error }
MiniBlocksResolverStub -
func (*MiniBlocksResolverStub) IsInterfaceNil ¶
func (mbrs *MiniBlocksResolverStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*MiniBlocksResolverStub) NumPeersToQuery ¶ added in v1.0.110
func (mbrs *MiniBlocksResolverStub) NumPeersToQuery() (int, int)
NumPeersToQuery -
func (*MiniBlocksResolverStub) ProcessReceivedMessage ¶
func (mbrs *MiniBlocksResolverStub) ProcessReceivedMessage(message p2p.MessageP2P, _ core.PeerID) error
ProcessReceivedMessage -
func (*MiniBlocksResolverStub) RequestDataFromHash ¶
func (mbrs *MiniBlocksResolverStub) RequestDataFromHash(hash []byte, epoch uint32) error
RequestDataFromHash -
func (*MiniBlocksResolverStub) RequestDataFromHashArray ¶
func (mbrs *MiniBlocksResolverStub) RequestDataFromHashArray(hashes [][]byte, epoch uint32) error
RequestDataFromHashArray -
func (*MiniBlocksResolverStub) SetNumPeersToQuery ¶ added in v1.0.102
func (mbrs *MiniBlocksResolverStub) SetNumPeersToQuery(intra int, cross int)
SetNumPeersToQuery -
func (*MiniBlocksResolverStub) SetResolverDebugHandler ¶ added in v1.0.110
func (mbrs *MiniBlocksResolverStub) SetResolverDebugHandler(handler dataRetriever.ResolverDebugHandler) error
SetResolverDebugHandler -
type MultisignMock ¶
type MultisignMock struct { }
MultisignMock -
func (*MultisignMock) AggregateCommitments ¶
func (mm *MultisignMock) AggregateCommitments(_ []byte) error
AggregateCommitments -
func (*MultisignMock) AggregateSigs ¶
func (mm *MultisignMock) AggregateSigs(_ []byte) ([]byte, error)
AggregateSigs -
func (*MultisignMock) Commitment ¶
func (mm *MultisignMock) Commitment(_ uint16) ([]byte, error)
Commitment -
func (*MultisignMock) CommitmentHash ¶
func (mm *MultisignMock) CommitmentHash(_ uint16) ([]byte, error)
CommitmentHash -
func (*MultisignMock) Create ¶
func (mm *MultisignMock) Create(_ []string, _ uint16) (crypto.MultiSigner, error)
Create -
func (*MultisignMock) CreateCommitment ¶
func (mm *MultisignMock) CreateCommitment() (commSecret []byte, commitment []byte)
CreateCommitment -
func (*MultisignMock) CreateSignatureShare ¶
func (mm *MultisignMock) CreateSignatureShare(_ []byte, _ []byte) ([]byte, error)
CreateSignatureShare -
func (*MultisignMock) IsInterfaceNil ¶
func (mm *MultisignMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*MultisignMock) SetAggregatedSig ¶
func (mm *MultisignMock) SetAggregatedSig([]byte) error
SetAggregatedSig -
func (*MultisignMock) SignatureShare ¶
func (mm *MultisignMock) SignatureShare(_ uint16) ([]byte, error)
SignatureShare -
func (*MultisignMock) StoreCommitment ¶
func (mm *MultisignMock) StoreCommitment(_ uint16, _ []byte) error
StoreCommitment -
func (*MultisignMock) StoreCommitmentHash ¶
func (mm *MultisignMock) StoreCommitmentHash(_ uint16, _ []byte) error
StoreCommitmentHash -
func (*MultisignMock) StoreSignatureShare ¶
func (mm *MultisignMock) StoreSignatureShare(_ uint16, _ []byte) error
StoreSignatureShare -
func (*MultisignMock) VerifySignatureShare ¶
VerifySignatureShare -
type NetworkShardingCollectorStub ¶
type NetworkShardingCollectorStub struct { UpdatePeerIdPublicKeyCalled func(pid core.PeerID, pk []byte) UpdatePublicKeyShardIdCalled func(pk []byte, shardId uint32) UpdatePeerIdShardIdCalled func(pid core.PeerID, shardId uint32) GetPeerInfoCalled func(pid core.PeerID) core.P2PPeerInfo }
NetworkShardingCollectorStub -
func (*NetworkShardingCollectorStub) GetPeerInfo ¶ added in v1.0.130
func (nscs *NetworkShardingCollectorStub) GetPeerInfo(pid core.PeerID) core.P2PPeerInfo
GetPeerInfo -
func (*NetworkShardingCollectorStub) IsInterfaceNil ¶
func (nscs *NetworkShardingCollectorStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*NetworkShardingCollectorStub) UpdatePeerIdPublicKey ¶
func (nscs *NetworkShardingCollectorStub) UpdatePeerIdPublicKey(pid core.PeerID, pk []byte)
UpdatePeerIdPublicKey -
func (*NetworkShardingCollectorStub) UpdatePeerIdShardId ¶
func (nscs *NetworkShardingCollectorStub) UpdatePeerIdShardId(pid core.PeerID, shardId uint32)
UpdatePeerIdShardId -
func (*NetworkShardingCollectorStub) UpdatePublicKeyShardId ¶
func (nscs *NetworkShardingCollectorStub) UpdatePublicKeyShardId(pk []byte, shardId uint32)
UpdatePublicKeyShardId -
type NodeRedundancyHandlerStub ¶ added in v1.1.31
type NodeRedundancyHandlerStub struct { IsRedundancyNodeCalled func() bool IsMainMachineActiveCalled func() bool AdjustInactivityIfNeededCalled func(selfPubKey string, consensusPubKeys []string, roundIndex int64) ResetInactivityIfNeededCalled func(selfPubKey string, consensusMsgPubKey string, consensusMsgPeerID core.PeerID) ObserverPrivateKeyCalled func() crypto.PrivateKey }
NodeRedundancyHandlerStub -
func (*NodeRedundancyHandlerStub) AdjustInactivityIfNeeded ¶ added in v1.1.31
func (nrhs *NodeRedundancyHandlerStub) AdjustInactivityIfNeeded(selfPubKey string, consensusPubKeys []string, roundIndex int64)
AdjustInactivityIfNeeded -
func (*NodeRedundancyHandlerStub) IsInterfaceNil ¶ added in v1.1.31
func (nrhs *NodeRedundancyHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*NodeRedundancyHandlerStub) IsMainMachineActive ¶ added in v1.1.31
func (nrhs *NodeRedundancyHandlerStub) IsMainMachineActive() bool
IsMainMachineActive -
func (*NodeRedundancyHandlerStub) IsRedundancyNode ¶ added in v1.1.31
func (nrhs *NodeRedundancyHandlerStub) IsRedundancyNode() bool
IsRedundancyNode -
func (*NodeRedundancyHandlerStub) ObserverPrivateKey ¶ added in v1.1.32
func (nrhs *NodeRedundancyHandlerStub) ObserverPrivateKey() crypto.PrivateKey
ObserverPrivateKey -
func (*NodeRedundancyHandlerStub) ResetInactivityIfNeeded ¶ added in v1.1.31
func (nrhs *NodeRedundancyHandlerStub) ResetInactivityIfNeeded(selfPubKey string, consensusMsgPubKey string, consensusMsgPeerID core.PeerID)
ResetInactivityIfNeeded -
type NodeWrapperStub ¶ added in v1.0.110
type NodeWrapperStub struct {
AddQueryHandlerCalled func(name string, handler debug.QueryHandler) error
}
NodeWrapperStub -
func (*NodeWrapperStub) AddQueryHandler ¶ added in v1.0.110
func (nws *NodeWrapperStub) AddQueryHandler(name string, handler debug.QueryHandler) error
AddQueryHandler -
func (*NodeWrapperStub) IsInterfaceNil ¶ added in v1.0.110
func (nws *NodeWrapperStub) IsInterfaceNil() bool
IsInterfaceNil -
type NodesCoordinatorMock ¶
type NodesCoordinatorMock struct { ComputeValidatorsGroupCalled func(randomness []byte, round uint64, shardId uint32, epoch uint32) ([]sharding.Validator, error) GetValidatorsPublicKeysCalled func(randomness []byte, round uint64, shardId uint32, epoch uint32) ([]string, error) GetValidatorsRewardsAddressesCalled func(randomness []byte, round uint64, shardId uint32, epoch uint32) ([]string, error) GetAllEligibleValidatorsPublicKeysCalled func() (map[uint32][][]byte, error) }
NodesCoordinatorMock -
func (*NodesCoordinatorMock) ComputeAdditionalLeaving ¶ added in v1.0.115
func (ncm *NodesCoordinatorMock) ComputeAdditionalLeaving([]*state.ShardValidatorInfo) (map[uint32][]sharding.Validator, error)
ComputeAdditionalLeaving -
func (*NodesCoordinatorMock) ComputeConsensusGroup ¶
func (ncm *NodesCoordinatorMock) ComputeConsensusGroup( randomness []byte, round uint64, shardId uint32, epoch uint32, ) (validatorsGroup []sharding.Validator, err error)
ComputeConsensusGroup -
func (*NodesCoordinatorMock) ConsensusGroupSize ¶
func (ncm *NodesCoordinatorMock) ConsensusGroupSize(uint32) int
ConsensusGroupSize -
func (*NodesCoordinatorMock) GetAllEligibleValidatorsPublicKeys ¶
func (ncm *NodesCoordinatorMock) GetAllEligibleValidatorsPublicKeys(_ uint32) (map[uint32][][]byte, error)
GetAllEligibleValidatorsPublicKeys -
func (*NodesCoordinatorMock) GetAllLeavingValidatorsPublicKeys ¶ added in v1.0.102
func (ncm *NodesCoordinatorMock) GetAllLeavingValidatorsPublicKeys(_ uint32) (map[uint32][][]byte, error)
GetAllLeavingValidatorsPublicKeys -
func (*NodesCoordinatorMock) GetAllWaitingValidatorsPublicKeys ¶
func (ncm *NodesCoordinatorMock) GetAllWaitingValidatorsPublicKeys(_ uint32) (map[uint32][][]byte, error)
GetAllWaitingValidatorsPublicKeys -
func (*NodesCoordinatorMock) GetChance ¶ added in v1.0.102
func (ncm *NodesCoordinatorMock) GetChance(uint32) uint32
GetChance -
func (*NodesCoordinatorMock) GetConsensusValidatorsPublicKeys ¶
func (ncm *NodesCoordinatorMock) GetConsensusValidatorsPublicKeys( randomness []byte, round uint64, shardId uint32, epoch uint32, ) ([]string, error)
GetConsensusValidatorsPublicKeys -
func (*NodesCoordinatorMock) GetConsensusWhitelistedNodes ¶
func (ncm *NodesCoordinatorMock) GetConsensusWhitelistedNodes( _ uint32, ) (map[string]struct{}, error)
GetConsensusWhitelistedNodes return the whitelisted nodes allowed to send consensus messages, for each of the shards
func (*NodesCoordinatorMock) GetNumTotalEligible ¶
func (ncm *NodesCoordinatorMock) GetNumTotalEligible() uint64
GetNumTotalEligible -
func (*NodesCoordinatorMock) GetOwnPublicKey ¶
func (ncm *NodesCoordinatorMock) GetOwnPublicKey() []byte
GetOwnPublicKey -
func (*NodesCoordinatorMock) GetSavedStateKey ¶
func (ncm *NodesCoordinatorMock) GetSavedStateKey() []byte
GetSavedStateKey -
func (*NodesCoordinatorMock) GetSelectedPublicKeys ¶
func (ncm *NodesCoordinatorMock) GetSelectedPublicKeys(_ []byte, _ uint32, _ uint32) (publicKeys []string, err error)
GetSelectedPublicKeys -
func (*NodesCoordinatorMock) GetValidatorWithPublicKey ¶
func (ncm *NodesCoordinatorMock) GetValidatorWithPublicKey(_ []byte) (sharding.Validator, uint32, error)
GetValidatorWithPublicKey -
func (*NodesCoordinatorMock) GetValidatorsIndexes ¶
func (ncm *NodesCoordinatorMock) GetValidatorsIndexes(_ []string, _ uint32) ([]uint64, error)
GetValidatorsIndexes -
func (*NodesCoordinatorMock) IsInterfaceNil ¶
func (ncm *NodesCoordinatorMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*NodesCoordinatorMock) LoadState ¶
func (ncm *NodesCoordinatorMock) LoadState(_ []byte) error
LoadState -
func (*NodesCoordinatorMock) SetConsensusGroupSize ¶
func (ncm *NodesCoordinatorMock) SetConsensusGroupSize(_ int) error
SetConsensusGroupSize -
func (*NodesCoordinatorMock) SetNodesPerShards ¶
func (ncm *NodesCoordinatorMock) SetNodesPerShards( _ map[uint32][]sharding.Validator, _ map[uint32][]sharding.Validator, _ uint32, ) error
SetNodesPerShards -
func (*NodesCoordinatorMock) ShardIdForEpoch ¶
func (ncm *NodesCoordinatorMock) ShardIdForEpoch(_ uint32) (uint32, error)
ShardIdForEpoch returns the nodesCoordinator configured ShardId for specified epoch if epoch configuration exists, otherwise error
func (*NodesCoordinatorMock) ShuffleOutForEpoch ¶ added in v1.0.111
func (ncm *NodesCoordinatorMock) ShuffleOutForEpoch(_ uint32)
ShuffleOutForEpoch verifies if the shards changed in the new epoch and calls the shuffleOutHandler
func (*NodesCoordinatorMock) ValidatorsWeights ¶ added in v0.0.5
func (ncm *NodesCoordinatorMock) ValidatorsWeights(validators []sharding.Validator) ([]uint32, error)
ValidatorsWeights -
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) BlacklistPeerCalled func(peer core.PeerID, reason string, duration time.Duration) }
P2PAntifloodHandlerStub -
func (*P2PAntifloodHandlerStub) ApplyConsensusSize ¶ added in v1.0.123
func (p2pahs *P2PAntifloodHandlerStub) ApplyConsensusSize(size int)
ApplyConsensusSize -
func (*P2PAntifloodHandlerStub) BlacklistPeer ¶ added in v1.0.132
func (p2pahs *P2PAntifloodHandlerStub) BlacklistPeer(peer core.PeerID, reason string, duration time.Duration)
BlacklistPeer -
func (*P2PAntifloodHandlerStub) CanProcessMessage ¶
func (p2pahs *P2PAntifloodHandlerStub) CanProcessMessage(message p2p.MessageP2P, fromConnectedPeer core.PeerID) error
CanProcessMessage -
func (*P2PAntifloodHandlerStub) CanProcessMessagesOnTopic ¶ added in v1.0.106
func (p2pahs *P2PAntifloodHandlerStub) CanProcessMessagesOnTopic(peer core.PeerID, topic string, numMessages uint32, totalSize uint64, sequence []byte) error
CanProcessMessagesOnTopic -
func (*P2PAntifloodHandlerStub) IsInterfaceNil ¶
func (p2pahs *P2PAntifloodHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*P2PAntifloodHandlerStub) ResetForTopic ¶
func (p2pahs *P2PAntifloodHandlerStub) ResetForTopic(_ string)
ResetForTopic -
func (*P2PAntifloodHandlerStub) SetMaxMessagesForTopic ¶
func (p2pahs *P2PAntifloodHandlerStub) SetMaxMessagesForTopic(_ string, _ uint32)
SetMaxMessagesForTopic -
type P2PMessageStub ¶
type P2PMessageStub struct { FromField []byte DataField []byte SeqNoField []byte TopicsField []string SignatureField []byte KeyField []byte PeerField core.PeerID }
P2PMessageStub -
func (*P2PMessageStub) IsInterfaceNil ¶
func (msg *P2PMessageStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type PeerDenialEvaluatorStub ¶ added in v1.0.133
type PeerDenialEvaluatorStub struct { IsDeniedCalled func(pid core.PeerID) bool UpsertPeerIDCalled func(pid core.PeerID, duration time.Duration) error }
PeerDenialEvaluatorStub -
func (*PeerDenialEvaluatorStub) IsDenied ¶ added in v1.0.133
func (pdes *PeerDenialEvaluatorStub) IsDenied(pid core.PeerID) bool
IsDenied -
func (*PeerDenialEvaluatorStub) IsInterfaceNil ¶ added in v1.0.133
func (pdes *PeerDenialEvaluatorStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*PeerDenialEvaluatorStub) UpsertPeerID ¶ added in v1.0.133
UpsertPeerID -
type PeerSignatureHandler ¶ added in v1.0.138
type PeerSignatureHandler struct{}
PeerSignatureHandler -
func (*PeerSignatureHandler) GetPeerSignature ¶ added in v1.0.138
func (p *PeerSignatureHandler) GetPeerSignature(_ crypto.PrivateKey, _ []byte) ([]byte, error)
GetPeerSignature -
func (*PeerSignatureHandler) IsInterfaceNil ¶ added in v1.0.138
func (p *PeerSignatureHandler) IsInterfaceNil() bool
IsInterfaceNil -
func (*PeerSignatureHandler) VerifyPeerSignature ¶ added in v1.0.138
VerifyPeerSignature -
type PendingMiniBlocksHandlerStub ¶
type PendingMiniBlocksHandlerStub struct { AddProcessedHeaderCalled func(handler data.HeaderHandler) error RevertHeaderCalled func(handler data.HeaderHandler) error GetPendingMiniBlocksCalled func(shardID uint32) [][]byte SetPendingMiniBlocksCalled func(shardID uint32, mbHashes [][]byte) }
PendingMiniBlocksHandlerStub -
func (*PendingMiniBlocksHandlerStub) AddProcessedHeader ¶
func (p *PendingMiniBlocksHandlerStub) AddProcessedHeader(handler data.HeaderHandler) error
AddProcessedHeader -
func (*PendingMiniBlocksHandlerStub) GetPendingMiniBlocks ¶
func (p *PendingMiniBlocksHandlerStub) GetPendingMiniBlocks(shardID uint32) [][]byte
GetPendingMiniBlocks -
func (*PendingMiniBlocksHandlerStub) IsInterfaceNil ¶
func (p *PendingMiniBlocksHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*PendingMiniBlocksHandlerStub) RevertHeader ¶
func (p *PendingMiniBlocksHandlerStub) RevertHeader(handler data.HeaderHandler) error
RevertHeader -
func (*PendingMiniBlocksHandlerStub) SetPendingMiniBlocks ¶
func (p *PendingMiniBlocksHandlerStub) SetPendingMiniBlocks(shardID uint32, mbHashes [][]byte)
SetPendingMiniBlocks -
type PrivateKeyStub ¶
type PrivateKeyStub struct { ToByteArrayHandler func() ([]byte, error) GeneratePublicHandler func() crypto.PublicKey SuiteHandler func() crypto.Suite ScalarHandler func() crypto.Scalar }
PrivateKeyStub -
func (*PrivateKeyStub) GeneratePublic ¶
func (sk *PrivateKeyStub) GeneratePublic() crypto.PublicKey
GeneratePublic -
func (*PrivateKeyStub) IsInterfaceNil ¶
func (sk *PrivateKeyStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*PrivateKeyStub) ToByteArray ¶
func (sk *PrivateKeyStub) ToByteArray() ([]byte, error)
ToByteArray -
type PubkeyConverterMock ¶ added in v1.0.104
type PubkeyConverterMock struct {
// contains filtered or unexported fields
}
PubkeyConverterMock -
func NewPubkeyConverterMock ¶ added in v1.0.104
func NewPubkeyConverterMock(addressLen int) *PubkeyConverterMock
NewPubkeyConverterMock -
func (*PubkeyConverterMock) Decode ¶ added in v1.0.104
func (pcm *PubkeyConverterMock) Decode(humanReadable string) ([]byte, error)
Decode -
func (*PubkeyConverterMock) Encode ¶ added in v1.0.104
func (pcm *PubkeyConverterMock) Encode(pkBytes []byte) string
Encode -
func (*PubkeyConverterMock) IsInterfaceNil ¶ added in v1.0.104
func (pcm *PubkeyConverterMock) IsInterfaceNil() bool
IsInterfaceNil -
type PubkeyConverterStub ¶ added in v1.0.104
type PubkeyConverterStub struct { LenCalled func() int DecodeCalled func(humanReadable string) ([]byte, error) EncodeCalled func(pkBytes []byte) string }
PubkeyConverterStub -
func (*PubkeyConverterStub) Decode ¶ added in v1.0.104
func (pcs *PubkeyConverterStub) Decode(humanReadable string) ([]byte, error)
Decode -
func (*PubkeyConverterStub) Encode ¶ added in v1.0.104
func (pcs *PubkeyConverterStub) Encode(pkBytes []byte) string
Encode -
func (*PubkeyConverterStub) IsInterfaceNil ¶ added in v1.0.104
func (pcs *PubkeyConverterStub) IsInterfaceNil() bool
IsInterfaceNil -
type PublicKeyMock ¶
type PublicKeyMock struct { ToByteArrayHandler func() ([]byte, error) SuiteCalled func() crypto.Suite PointCalled func() crypto.Point }
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 QueryHandlerStub ¶ added in v1.0.110
QueryHandlerStub -
func (*QueryHandlerStub) IsInterfaceNil ¶ added in v1.0.110
func (qhs *QueryHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*QueryHandlerStub) Query ¶ added in v1.0.110
func (qhs *QueryHandlerStub) Query(search string) []string
Query -
type RequestHandlerStub ¶
type RequestHandlerStub struct { RequestShardHeaderCalled func(shardID uint32, hash []byte) RequestMetaHeaderCalled func(hash []byte) RequestMetaHeaderByNonceCalled func(nonce uint64) RequestShardHeaderByNonceCalled func(shardID uint32, nonce uint64) RequestTransactionHandlerCalled func(destShardID uint32, txHashes [][]byte) RequestScrHandlerCalled func(destShardID uint32, txHashes [][]byte) RequestRewardTxHandlerCalled func(destShardID uint32, txHashes [][]byte) RequestMiniBlockHandlerCalled func(destShardID uint32, miniblockHash []byte) RequestMiniBlocksHandlerCalled func(destShardID uint32, miniblocksHashes [][]byte) RequestTrieNodesCalled func(destShardID uint32, hashes [][]byte, topic string) RequestStartOfEpochMetaBlockCalled func(epoch uint32) SetNumPeersToQueryCalled func(key string, intra int, cross int) error GetNumPeersToQueryCalled func(key string) (int, int, error) }
RequestHandlerStub -
func (*RequestHandlerStub) GetNumPeersToQuery ¶ added in v1.0.102
func (rhs *RequestHandlerStub) GetNumPeersToQuery(key string) (int, int, error)
GetNumPeersToQuery -
func (*RequestHandlerStub) IsInterfaceNil ¶
func (rhs *RequestHandlerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*RequestHandlerStub) RequestInterval ¶ added in v1.0.102
func (rhs *RequestHandlerStub) RequestInterval() time.Duration
RequestInterval -
func (*RequestHandlerStub) RequestMetaHeader ¶
func (rhs *RequestHandlerStub) RequestMetaHeader(hash []byte)
RequestMetaHeader -
func (*RequestHandlerStub) RequestMetaHeaderByNonce ¶
func (rhs *RequestHandlerStub) RequestMetaHeaderByNonce(nonce uint64)
RequestMetaHeaderByNonce -
func (*RequestHandlerStub) RequestMiniBlock ¶
func (rhs *RequestHandlerStub) RequestMiniBlock(destShardID uint32, miniblockHash []byte)
RequestMiniBlock -
func (*RequestHandlerStub) RequestMiniBlocks ¶
func (rhs *RequestHandlerStub) RequestMiniBlocks(destShardID uint32, miniblocksHashes [][]byte)
RequestMiniBlocks -
func (*RequestHandlerStub) RequestRewardTransactions ¶
func (rhs *RequestHandlerStub) RequestRewardTransactions(destShardID uint32, txHashes [][]byte)
RequestRewardTransactions -
func (*RequestHandlerStub) RequestShardHeader ¶
func (rhs *RequestHandlerStub) RequestShardHeader(shardID uint32, hash []byte)
RequestShardHeader -
func (*RequestHandlerStub) RequestShardHeaderByNonce ¶
func (rhs *RequestHandlerStub) RequestShardHeaderByNonce(shardID uint32, nonce uint64)
RequestShardHeaderByNonce -
func (*RequestHandlerStub) RequestStartOfEpochMetaBlock ¶
func (rhs *RequestHandlerStub) RequestStartOfEpochMetaBlock(epoch uint32)
RequestStartOfEpochMetaBlock -
func (*RequestHandlerStub) RequestTransaction ¶
func (rhs *RequestHandlerStub) RequestTransaction(destShardID uint32, txHashes [][]byte)
RequestTransaction -
func (*RequestHandlerStub) RequestTrieNodes ¶
func (rhs *RequestHandlerStub) RequestTrieNodes(destShardID uint32, hashes [][]byte, topic string)
RequestTrieNodes -
func (*RequestHandlerStub) RequestUnsignedTransactions ¶
func (rhs *RequestHandlerStub) RequestUnsignedTransactions(destShardID uint32, txHashes [][]byte)
RequestUnsignedTransactions -
func (*RequestHandlerStub) SetNumPeersToQuery ¶ added in v1.0.102
func (rhs *RequestHandlerStub) SetNumPeersToQuery(key string, intra int, cross int) error
SetNumPeersToQuery -
type ResolversFinderStub ¶
type ResolversFinderStub 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 IntraShardResolverCalled func(baseTopic string) (dataRetriever.Resolver, error) MetaChainResolverCalled func(baseTopic string) (dataRetriever.Resolver, error) CrossShardResolverCalled func(baseTopic string, crossShard uint32) (dataRetriever.Resolver, error) ResolverKeysCalled func() string MetaCrossShardResolverCalled func(baseTopic string, crossShard uint32) (dataRetriever.Resolver, error) IterateCalled func(handler func(key string, resolver dataRetriever.Resolver) bool) }
ResolversFinderStub -
func (*ResolversFinderStub) Add ¶
func (rfs *ResolversFinderStub) Add(key string, val dataRetriever.Resolver) error
Add -
func (*ResolversFinderStub) AddMultiple ¶
func (rfs *ResolversFinderStub) AddMultiple(_ []string, _ []dataRetriever.Resolver) error
AddMultiple -
func (*ResolversFinderStub) CrossShardResolver ¶
func (rfs *ResolversFinderStub) CrossShardResolver(baseTopic string, crossShard uint32) (dataRetriever.Resolver, error)
CrossShardResolver -
func (*ResolversFinderStub) Get ¶
func (rfs *ResolversFinderStub) Get(key string) (dataRetriever.Resolver, error)
Get -
func (*ResolversFinderStub) IntraShardResolver ¶
func (rfs *ResolversFinderStub) IntraShardResolver(baseTopic string) (dataRetriever.Resolver, error)
IntraShardResolver -
func (*ResolversFinderStub) IsInterfaceNil ¶
func (rfs *ResolversFinderStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ResolversFinderStub) Iterate ¶ added in v1.0.110
func (rfs *ResolversFinderStub) Iterate(handler func(key string, resolver dataRetriever.Resolver) bool)
Iterate -
func (*ResolversFinderStub) MetaChainResolver ¶
func (rfs *ResolversFinderStub) MetaChainResolver(baseTopic string) (dataRetriever.Resolver, error)
MetaChainResolver -
func (*ResolversFinderStub) MetaCrossShardResolver ¶ added in v1.0.102
func (rfs *ResolversFinderStub) MetaCrossShardResolver(baseTopic string, crossShard uint32) (dataRetriever.Resolver, error)
MetaCrossShardResolver -
func (*ResolversFinderStub) Replace ¶
func (rfs *ResolversFinderStub) Replace(key string, val dataRetriever.Resolver) error
Replace -
func (*ResolversFinderStub) ResolverKeys ¶
func (rfs *ResolversFinderStub) ResolverKeys() string
ResolverKeys -
type RounderMock ¶
type RounderMock struct { IndexCalled func() int64 TimeDurationCalled func() time.Duration TimeStampCalled func() time.Time UpdateRoundCalled func(time.Time, time.Time) RemainingTimeCalled func(startTime time.Time, maxTime time.Duration) time.Duration BeforeGenesisCalled func() bool // contains filtered or unexported fields }
RounderMock -
func (*RounderMock) BeforeGenesis ¶ added in v1.0.133
func (rndm *RounderMock) BeforeGenesis() bool
BeforeGenesis -
func (*RounderMock) IsInterfaceNil ¶
func (rndm *RounderMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*RounderMock) RemainingTime ¶
RemainingTime -
func (*RounderMock) TimeDuration ¶
func (rndm *RounderMock) TimeDuration() time.Duration
TimeDuration -
func (*RounderMock) UpdateRound ¶
func (rndm *RounderMock) UpdateRound(genesisRoundTimeStamp time.Time, timeStamp time.Time)
UpdateRound -
type SCQueryServiceStub ¶
type SCQueryServiceStub struct { ExecuteQueryCalled func(*process.SCQuery) (*vmcommon.VMOutput, error) ComputeScCallGasLimitHandler func(tx *transaction.Transaction) (uint64, error) }
SCQueryServiceStub -
func (*SCQueryServiceStub) ComputeScCallGasLimit ¶
func (serviceStub *SCQueryServiceStub) ComputeScCallGasLimit(tx *transaction.Transaction) (uint64, error)
ComputeScCallGasLimit -
func (*SCQueryServiceStub) ExecuteQuery ¶
func (serviceStub *SCQueryServiceStub) ExecuteQuery(query *process.SCQuery) (*vmcommon.VMOutput, error)
ExecuteQuery -
func (*SCQueryServiceStub) IsInterfaceNil ¶
func (serviceStub *SCQueryServiceStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type ShardCoordinatorMock ¶
ShardCoordinatorMock -
func (ShardCoordinatorMock) CommunicationIdentifier ¶
func (scm ShardCoordinatorMock) CommunicationIdentifier(destShardID uint32) string
CommunicationIdentifier -
func (ShardCoordinatorMock) ComputeId ¶
func (scm ShardCoordinatorMock) ComputeId(addr []byte) uint32
ComputeId -
func (*ShardCoordinatorMock) IsInterfaceNil ¶
func (scm *ShardCoordinatorMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (ShardCoordinatorMock) NumberOfShards ¶
func (scm ShardCoordinatorMock) NumberOfShards() uint32
NumberOfShards -
func (ShardCoordinatorMock) SameShard ¶
func (scm ShardCoordinatorMock) SameShard(_, _ []byte) bool
SameShard -
func (ShardCoordinatorMock) SetSelfShardId ¶
func (scm ShardCoordinatorMock) SetSelfShardId(shardId uint32) error
SetSelfShardId -
type SingleSignerMock ¶
type SingleSignerMock struct { SignStub func(private crypto.PrivateKey, msg []byte) ([]byte, error) VerifyStub func(public crypto.PublicKey, msg []byte, sig []byte) error }
SingleSignerMock -
func (*SingleSignerMock) IsInterfaceNil ¶
func (s *SingleSignerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*SingleSignerMock) Sign ¶
func (s *SingleSignerMock) Sign(private crypto.PrivateKey, msg []byte) ([]byte, error)
Sign -
type SinglesignFailMock ¶
type SinglesignFailMock struct { }
SinglesignFailMock -
func (*SinglesignFailMock) IsInterfaceNil ¶
func (s *SinglesignFailMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*SinglesignFailMock) Sign ¶
func (s *SinglesignFailMock) Sign(_ crypto.PrivateKey, _ []byte) ([]byte, error)
Sign Signs a message with using a single signature schnorr scheme
type SinglesignMock ¶
type SinglesignMock struct { }
SinglesignMock -
func (*SinglesignMock) IsInterfaceNil ¶
func (s *SinglesignMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*SinglesignMock) Sign ¶
func (s *SinglesignMock) Sign(_ crypto.PrivateKey, _ []byte) ([]byte, error)
Sign Signs a message with using a single signature schnorr scheme
type SinglesignStub ¶
type SinglesignStub struct { SignCalled func(private crypto.PrivateKey, msg []byte) ([]byte, error) VerifyCalled func(public crypto.PublicKey, msg []byte, sig []byte) error }
SinglesignStub -
func (*SinglesignStub) IsInterfaceNil ¶
func (s *SinglesignStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*SinglesignStub) Sign ¶
func (s *SinglesignStub) Sign(private crypto.PrivateKey, msg []byte) ([]byte, error)
Sign Signs a message with using a single signature schnorr scheme
type StakeValuesProcessorStub ¶ added in v1.1.45
type StakeValuesProcessorStub struct {
GetTotalStakedValueCalled func() (*api.StakeValues, error)
}
StakeValuesProcessorStub -
func (*StakeValuesProcessorStub) GetTotalStakedValue ¶ added in v1.1.45
func (svps *StakeValuesProcessorStub) GetTotalStakedValue() (*api.StakeValues, error)
GetTotalStakedValue -
func (*StakeValuesProcessorStub) IsInterfaceNil ¶ added in v1.1.45
func (svps *StakeValuesProcessorStub) IsInterfaceNil() bool
IsInterfaceNil -
type StatusMetricsStub ¶
type StatusMetricsStub struct { StatusMetricsMapWithoutP2PCalled func() map[string]interface{} StatusP2pMetricsMapCalled func() map[string]interface{} ConfigMetricsCalled func() map[string]interface{} NetworkMetricsCalled func() map[string]interface{} EconomicsMetricsCalled func() map[string]interface{} StatusMetricsWithoutP2PPrometheusStringCalled func() string }
StatusMetricsStub -
func (*StatusMetricsStub) ConfigMetrics ¶ added in v1.0.114
func (sms *StatusMetricsStub) ConfigMetrics() map[string]interface{}
ConfigMetrics -
func (*StatusMetricsStub) EconomicsMetrics ¶ added in v1.1.3
func (sms *StatusMetricsStub) EconomicsMetrics() map[string]interface{}
EconomicsMetrics -
func (*StatusMetricsStub) IsInterfaceNil ¶
func (sms *StatusMetricsStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*StatusMetricsStub) NetworkMetrics ¶ added in v1.0.114
func (sms *StatusMetricsStub) NetworkMetrics() map[string]interface{}
NetworkMetrics -
func (*StatusMetricsStub) StatusMetricsMapWithoutP2P ¶
func (sms *StatusMetricsStub) StatusMetricsMapWithoutP2P() map[string]interface{}
StatusMetricsMapWithoutP2P -
func (*StatusMetricsStub) StatusMetricsWithoutP2PPrometheusString ¶ added in v1.0.147
func (sms *StatusMetricsStub) StatusMetricsWithoutP2PPrometheusString() string
StatusMetricsWithoutP2PPrometheusString -
func (*StatusMetricsStub) StatusP2pMetricsMap ¶
func (sms *StatusMetricsStub) StatusP2pMetricsMap() map[string]interface{}
StatusP2pMetricsMap -
type StorageManagerStub ¶ added in v1.1.28
type StorageManagerStub struct { DatabaseCalled func() data.DBWriteCacher TakeSnapshotCalled func([]byte) SetCheckpointCalled func([]byte) PruneCalled func(rootHash []byte, identifier data.TriePruningIdentifier) CancelPruneCalled func(rootHash []byte, identifier data.TriePruningIdentifier) MarkForEvictionCalled func([]byte, data.ModifiedHashes) error GetDbThatContainsHashCalled func([]byte) data.DBWriteCacher GetSnapshotThatContainsHashCalled func(rootHash []byte) data.SnapshotDbHandler IsPruningEnabledCalled func() bool EnterPruningBufferingModeCalled func() ExitPruningBufferingModeCalled func() IsInterfaceNilCalled func() bool }
StorageManagerStub --
func (*StorageManagerStub) CancelPrune ¶ added in v1.1.28
func (sms *StorageManagerStub) CancelPrune(rootHash []byte, identifier data.TriePruningIdentifier)
CancelPrune --
func (*StorageManagerStub) Database ¶ added in v1.1.28
func (sms *StorageManagerStub) Database() data.DBWriteCacher
Database --
func (*StorageManagerStub) EnterPruningBufferingMode ¶ added in v1.1.28
func (sms *StorageManagerStub) EnterPruningBufferingMode()
EnterPruningBufferingMode --
func (*StorageManagerStub) ExitPruningBufferingMode ¶ added in v1.1.28
func (sms *StorageManagerStub) ExitPruningBufferingMode()
ExitPruningBufferingMode --
func (*StorageManagerStub) GetSnapshotDbBatchDelay ¶ added in v1.1.28
func (sms *StorageManagerStub) GetSnapshotDbBatchDelay() int
GetSnapshotDbBatchDelay -
func (*StorageManagerStub) GetSnapshotThatContainsHash ¶ added in v1.1.28
func (sms *StorageManagerStub) GetSnapshotThatContainsHash(d []byte) data.SnapshotDbHandler
GetSnapshotThatContainsHash --
func (*StorageManagerStub) IsInterfaceNil ¶ added in v1.1.28
func (sms *StorageManagerStub) IsInterfaceNil() bool
IsInterfaceNil --
func (*StorageManagerStub) IsPruningEnabled ¶ added in v1.1.28
func (sms *StorageManagerStub) IsPruningEnabled() bool
IsPruningEnabled --
func (*StorageManagerStub) MarkForEviction ¶ added in v1.1.28
func (sms *StorageManagerStub) MarkForEviction(d []byte, m data.ModifiedHashes) error
MarkForEviction --
func (*StorageManagerStub) Prune ¶ added in v1.1.28
func (sms *StorageManagerStub) Prune(rootHash []byte, identifier data.TriePruningIdentifier)
Prune --
func (*StorageManagerStub) SetCheckpoint ¶ added in v1.1.28
func (sms *StorageManagerStub) SetCheckpoint(rootHash []byte)
SetCheckpoint --
func (*StorageManagerStub) TakeSnapshot ¶ added in v1.1.28
func (sms *StorageManagerStub) TakeSnapshot(rootHash []byte)
TakeSnapshot --
type StorerMock ¶
type StorerMock struct {
// contains filtered or unexported fields
}
StorerMock -
func (*StorerMock) GetBulkFromEpoch ¶ added in v1.0.147
GetBulkFromEpoch -
func (*StorerMock) GetFromEpoch ¶
func (sm *StorerMock) GetFromEpoch(key []byte, _ uint32) ([]byte, error)
GetFromEpoch -
func (*StorerMock) HasInEpoch ¶
func (sm *StorerMock) HasInEpoch(_ []byte, _ uint32) error
HasInEpoch -
func (*StorerMock) IsInterfaceNil ¶
func (sm *StorerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*StorerMock) PutInEpoch ¶ added in v1.1.1
func (sm *StorerMock) PutInEpoch(key, data []byte, _ uint32) error
PutInEpoch -
func (*StorerMock) RangeKeys ¶ added in v1.0.147
func (sm *StorerMock) RangeKeys(_ func(_ []byte, _ []byte) bool)
RangeKeys -
func (*StorerMock) SearchFirst ¶
func (sm *StorerMock) SearchFirst(_ []byte) ([]byte, error)
SearchFirst -
type StorerStub ¶
type StorerStub struct { PutCalled func(key, data []byte) error PutInEpochCalled func(key, data []byte, epoch uint32) error GetCalled func(key []byte) ([]byte, error) GetFromEpochCalled func(key []byte, epoch uint32) ([]byte, error) GetBulkFromEpochCalled func(keys [][]byte, epoch uint32) (map[string][]byte, error) HasCalled func(key []byte) error HasInEpochCalled func(key []byte, epoch uint32) error SearchFirstCalled func(key []byte) ([]byte, error) RemoveCalled func(key []byte) error ClearCacheCalled func() DestroyUnitCalled func() error RangeKeysCalled func(handler func(key []byte, val []byte) bool) }
StorerStub -
func (*StorerStub) GetBulkFromEpoch ¶ added in v1.0.147
GetBulkFromEpoch -
func (*StorerStub) GetFromEpoch ¶
func (ss *StorerStub) GetFromEpoch(key []byte, epoch uint32) ([]byte, error)
GetFromEpoch -
func (*StorerStub) HasInEpoch ¶
func (ss *StorerStub) HasInEpoch(key []byte, epoch uint32) error
HasInEpoch -
func (*StorerStub) IsInterfaceNil ¶
func (ss *StorerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*StorerStub) PutInEpoch ¶ added in v1.1.1
func (ss *StorerStub) PutInEpoch(key, data []byte, epoch uint32) error
PutInEpoch -
func (*StorerStub) RangeKeys ¶ added in v1.0.138
func (ss *StorerStub) RangeKeys(handler func(key []byte, val []byte) bool)
RangeKeys -
func (*StorerStub) SearchFirst ¶
func (ss *StorerStub) SearchFirst(key []byte) ([]byte, error)
SearchFirst -
type Streamer ¶
type Streamer struct {
// contains filtered or unexported fields
}
Streamer -
func (*Streamer) XORKeyStream ¶
XORKeyStream -
type SuiteMock ¶
type SuiteMock struct { StringStub func() string ScalarLenStub func() int CreateScalarStub func() crypto.Scalar PointLenStub func() int CreatePointStub func() crypto.Point CreatePointForScalarStub func(scalar crypto.Scalar) crypto.Point RandomStreamStub func() cipher.Stream GetUnderlyingSuiteStub func() interface{} }
SuiteMock -
func (*SuiteMock) GetUnderlyingSuite ¶
func (s *SuiteMock) GetUnderlyingSuite() interface{}
GetUnderlyingSuite -
func (*SuiteMock) IsInterfaceNil ¶
IsInterfaceNil returns true if there is no value under the interface
type SyncTimerStub ¶ added in v1.0.116
type SyncTimerStub struct { }
SyncTimerStub -
func (*SyncTimerStub) ClockOffset ¶ added in v1.0.116
func (sts *SyncTimerStub) ClockOffset() time.Duration
ClockOffset -
func (*SyncTimerStub) CurrentTime ¶ added in v1.0.116
func (sts *SyncTimerStub) CurrentTime() time.Time
CurrentTime -
func (*SyncTimerStub) FormattedCurrentTime ¶ added in v1.0.116
func (sts *SyncTimerStub) FormattedCurrentTime() string
FormattedCurrentTime -
func (*SyncTimerStub) IsInterfaceNil ¶ added in v1.0.116
func (sts *SyncTimerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*SyncTimerStub) StartSyncingTime ¶ added in v1.0.116
func (sts *SyncTimerStub) StartSyncingTime()
StartSyncingTime -
type ThrottlerStub ¶ added in v1.0.125
type ThrottlerStub struct { CanProcessCalled func() bool StartProcessingCalled func() EndProcessingCalled func() StartWasCalled bool EndWasCalled bool }
ThrottlerStub -
func (*ThrottlerStub) CanProcess ¶ added in v1.0.125
func (ts *ThrottlerStub) CanProcess() bool
CanProcess -
func (*ThrottlerStub) EndProcessing ¶ added in v1.0.125
func (ts *ThrottlerStub) EndProcessing()
EndProcessing -
func (*ThrottlerStub) IsInterfaceNil ¶ added in v1.0.125
func (ts *ThrottlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*ThrottlerStub) StartProcessing ¶ added in v1.0.125
func (ts *ThrottlerStub) StartProcessing()
StartProcessing -
type TimeCacheStub ¶ added in v1.0.133
type TimeCacheStub struct { AddCalled func(key string) error UpsertCalled func(key string, span time.Duration) error HasCalled func(key string) bool SweepCalled func() LenCalled func() int }
TimeCacheStub -
func (*TimeCacheStub) IsInterfaceNil ¶ added in v1.0.133
func (tcs *TimeCacheStub) IsInterfaceNil() bool
IsInterfaceNil -
type TransactionCostEstimatorMock ¶
type TransactionCostEstimatorMock struct {
ComputeTransactionGasLimitCalled func(tx *transaction.Transaction) (*transaction.CostResponse, error)
}
TransactionCostEstimatorMock --
func (*TransactionCostEstimatorMock) ComputeTransactionGasLimit ¶
func (tcem *TransactionCostEstimatorMock) ComputeTransactionGasLimit(tx *transaction.Transaction) (*transaction.CostResponse, error)
ComputeTransactionGasLimit --
func (*TransactionCostEstimatorMock) IsInterfaceNil ¶
func (tcem *TransactionCostEstimatorMock) IsInterfaceNil() bool
IsInterfaceNil --
type TrieStub ¶
type TrieStub struct { GetCalled func(key []byte) ([]byte, error) UpdateCalled func(key, value []byte) error DeleteCalled func(key []byte) error RootCalled func() ([]byte, error) CommitCalled func() error RecreateCalled func(root []byte) (data.Trie, error) ResetOldHashesCalled func() [][]byte AppendToOldHashesCalled func([][]byte) GetSerializedNodesCalled func([]byte, uint64) ([][]byte, uint64, error) GetSerializedNodeCalled func(bytes []byte) ([]byte, error) GetNumNodesCalled func() data.NumNodesDTO GetAllHashesCalled func() ([][]byte, error) GetAllLeavesOnChannelCalled func(rootHash []byte) (chan core.KeyValueHolder, error) GetProofCalled func(key []byte) ([][]byte, error) VerifyProofCalled func(key []byte, proof [][]byte) (bool, error) GetStorageManagerCalled func() data.StorageManager }
TrieStub -
func (*TrieStub) AppendToOldHashes ¶
AppendToOldHashes appends the given hashes to the trie's oldHashes variable
func (*TrieStub) GetAllHashes ¶ added in v1.0.137
GetAllHashes -
func (*TrieStub) GetAllLeavesOnChannel ¶ added in v1.0.137
func (ts *TrieStub) GetAllLeavesOnChannel(rootHash []byte, _ context.Context) (chan core.KeyValueHolder, error)
GetAllLeavesOnChannel -
func (*TrieStub) GetDirtyHashes ¶ added in v1.0.111
func (ts *TrieStub) GetDirtyHashes() (data.ModifiedHashes, error)
GetDirtyHashes -
func (*TrieStub) GetNumNodes ¶ added in v1.1.45
func (ts *TrieStub) GetNumNodes() data.NumNodesDTO
GetNumNodes -
func (*TrieStub) GetSerializedNode ¶ added in v1.1.45
GetSerializedNode -
func (*TrieStub) GetSerializedNodes ¶
GetSerializedNodes -
func (*TrieStub) GetStorageManager ¶ added in v1.1.28
func (ts *TrieStub) GetStorageManager() data.StorageManager
GetStorageManager -
func (*TrieStub) IsInterfaceNil ¶
IsInterfaceNil returns true if there is no value under the interface
func (*TrieStub) ResetOldHashes ¶
ResetOldHashes resets the oldHashes and oldRoot variables and returns the old hashes
func (*TrieStub) SetNewHashes ¶ added in v1.0.111
func (ts *TrieStub) SetNewHashes(_ data.ModifiedHashes)
SetNewHashes -
type TxProcessorStub ¶ added in v1.1.1
type TxProcessorStub struct {
ProcessTransactionCalled func(transaction *transaction.Transaction) (vmcommon.ReturnCode, error)
}
TxProcessorStub -
func (*TxProcessorStub) IsInterfaceNil ¶ added in v1.1.1
func (tps *TxProcessorStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*TxProcessorStub) ProcessTransaction ¶ added in v1.1.1
func (tps *TxProcessorStub) ProcessTransaction(transaction *transaction.Transaction) (vmcommon.ReturnCode, error)
ProcessTransaction -
type ValidatorMock ¶
type ValidatorMock struct {
// contains filtered or unexported fields
}
ValidatorMock -
func NewValidatorMock ¶
func NewValidatorMock(pubKey []byte, chances uint32, index uint32) *ValidatorMock
NewValidatorMock -
type ValidatorStatisticsProcessorMock ¶
type ValidatorStatisticsProcessorMock struct { UpdatePeerStateCalled func(header data.HeaderHandler) ([]byte, error) RevertPeerStateCalled func(header data.HeaderHandler) error IsInterfaceNilCalled func() bool GetPeerAccountCalled func(address []byte) (state.PeerAccountHandler, error) RootHashCalled func() ([]byte, error) ResetValidatorStatisticsAtNewEpochCalled func(vInfos map[uint32][]*state.ValidatorInfo) error GetValidatorInfoForRootHashCalled func(rootHash []byte) (map[uint32][]*state.ValidatorInfo, error) ProcessCalled func(validatorInfo data.ShardValidatorInfoHandler) error CommitCalled func() ([]byte, error) ProcessRatingsEndOfEpochCalled func(validatorInfos map[uint32][]*state.ValidatorInfo, epoch uint32) error PeerAccountToValidatorInfoCalled func(peerAccount state.PeerAccountHandler) *state.ValidatorInfo SaveNodesCoordinatorUpdatesCalled func(epoch uint32) (bool, error) }
ValidatorStatisticsProcessorMock -
func (*ValidatorStatisticsProcessorMock) Commit ¶ added in v0.0.5
func (vsp *ValidatorStatisticsProcessorMock) Commit() ([]byte, error)
Commit -
func (*ValidatorStatisticsProcessorMock) DisplayRatings ¶ added in v1.0.111
func (vsp *ValidatorStatisticsProcessorMock) DisplayRatings(_ uint32)
DisplayRatings -
func (*ValidatorStatisticsProcessorMock) GetExistingPeerAccount ¶ added in v1.1.1
func (vsp *ValidatorStatisticsProcessorMock) GetExistingPeerAccount(address []byte) (state.PeerAccountHandler, error)
GetExistingPeerAccount -
func (*ValidatorStatisticsProcessorMock) GetValidatorInfoForRootHash ¶
func (vsp *ValidatorStatisticsProcessorMock) GetValidatorInfoForRootHash(rootHash []byte) (map[uint32][]*state.ValidatorInfo, error)
GetValidatorInfoForRootHash -
func (*ValidatorStatisticsProcessorMock) IsInterfaceNil ¶
func (vsp *ValidatorStatisticsProcessorMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*ValidatorStatisticsProcessorMock) LastFinalizedRootHash ¶ added in v1.0.118
func (vsp *ValidatorStatisticsProcessorMock) LastFinalizedRootHash() []byte
LastFinalizedRootHash -
func (*ValidatorStatisticsProcessorMock) PeerAccountToValidatorInfo ¶ added in v1.1.1
func (vsp *ValidatorStatisticsProcessorMock) PeerAccountToValidatorInfo(peerAccount state.PeerAccountHandler) *state.ValidatorInfo
PeerAccountToValidatorInfo -
func (*ValidatorStatisticsProcessorMock) Process ¶
func (vsp *ValidatorStatisticsProcessorMock) Process(validatorInfo data.ShardValidatorInfoHandler) error
Process -
func (*ValidatorStatisticsProcessorMock) ProcessRatingsEndOfEpoch ¶ added in v0.0.5
func (vsp *ValidatorStatisticsProcessorMock) ProcessRatingsEndOfEpoch(validatorInfos map[uint32][]*state.ValidatorInfo, epoch uint32) error
ProcessRatingsEndOfEpoch -
func (*ValidatorStatisticsProcessorMock) ResetValidatorStatisticsAtNewEpoch ¶
func (vsp *ValidatorStatisticsProcessorMock) ResetValidatorStatisticsAtNewEpoch(vInfos map[uint32][]*state.ValidatorInfo) error
ResetValidatorStatisticsAtNewEpoch -
func (*ValidatorStatisticsProcessorMock) RevertPeerState ¶
func (vsp *ValidatorStatisticsProcessorMock) RevertPeerState(header data.HeaderHandler) error
RevertPeerState -
func (*ValidatorStatisticsProcessorMock) RootHash ¶
func (vsp *ValidatorStatisticsProcessorMock) RootHash() ([]byte, error)
RootHash -
func (*ValidatorStatisticsProcessorMock) SaveNodesCoordinatorUpdates ¶ added in v1.1.15
func (vsp *ValidatorStatisticsProcessorMock) SaveNodesCoordinatorUpdates(epoch uint32) (bool, error)
SaveNodesCoordinatorUpdates -
func (*ValidatorStatisticsProcessorMock) SetLastFinalizedRootHash ¶ added in v1.0.118
func (vsp *ValidatorStatisticsProcessorMock) SetLastFinalizedRootHash(_ []byte)
SetLastFinalizedRootHash -
func (*ValidatorStatisticsProcessorMock) UpdatePeerState ¶
func (vsp *ValidatorStatisticsProcessorMock) UpdatePeerState(header data.HeaderHandler, _ map[string]data.HeaderHandler) ([]byte, error)
UpdatePeerState -
type ValidatorStatisticsProcessorStub ¶
type ValidatorStatisticsProcessorStub struct { UpdatePeerStateCalled func(header data.HeaderHandler) ([]byte, error) RevertPeerStateCalled func(header data.HeaderHandler) error GetPeerAccountCalled func(address []byte) (state.PeerAccountHandler, error) RootHashCalled func() ([]byte, error) ResetValidatorStatisticsAtNewEpochCalled func(vInfos map[uint32][]*state.ValidatorInfo) error GetValidatorInfoForRootHashCalled func(rootHash []byte) (map[uint32][]*state.ValidatorInfo, error) ProcessRatingsEndOfEpochCalled func(validatorInfos map[uint32][]*state.ValidatorInfo, epoch uint32) error ProcessCalled func(validatorInfo data.ShardValidatorInfoHandler) error CommitCalled func() ([]byte, error) PeerAccountToValidatorInfoCalled func(peerAccount state.PeerAccountHandler) *state.ValidatorInfo SaveNodesCoordinatorUpdatesCalled func(epoch uint32) (bool, error) }
ValidatorStatisticsProcessorStub -
func (*ValidatorStatisticsProcessorStub) Commit ¶ added in v0.0.5
func (vsp *ValidatorStatisticsProcessorStub) Commit() ([]byte, error)
Commit -
func (*ValidatorStatisticsProcessorStub) DisplayRatings ¶ added in v1.0.111
func (vsp *ValidatorStatisticsProcessorStub) DisplayRatings(_ uint32)
DisplayRatings -
func (*ValidatorStatisticsProcessorStub) GetExistingPeerAccount ¶ added in v1.1.1
func (vsp *ValidatorStatisticsProcessorStub) GetExistingPeerAccount(address []byte) (state.PeerAccountHandler, error)
GetExistingPeerAccount -
func (*ValidatorStatisticsProcessorStub) GetValidatorInfoForRootHash ¶
func (vsp *ValidatorStatisticsProcessorStub) GetValidatorInfoForRootHash(rootHash []byte) (map[uint32][]*state.ValidatorInfo, error)
GetValidatorInfoForRootHash -
func (*ValidatorStatisticsProcessorStub) IsInterfaceNil ¶
func (vsp *ValidatorStatisticsProcessorStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*ValidatorStatisticsProcessorStub) LastFinalizedRootHash ¶ added in v1.0.118
func (vsp *ValidatorStatisticsProcessorStub) LastFinalizedRootHash() []byte
LastFinalizedRootHash -
func (*ValidatorStatisticsProcessorStub) PeerAccountToValidatorInfo ¶ added in v1.1.1
func (vsp *ValidatorStatisticsProcessorStub) PeerAccountToValidatorInfo(peerAccount state.PeerAccountHandler) *state.ValidatorInfo
PeerAccountToValidatorInfo -
func (*ValidatorStatisticsProcessorStub) Process ¶
func (vsp *ValidatorStatisticsProcessorStub) Process(validatorInfo data.ShardValidatorInfoHandler) error
Process -
func (*ValidatorStatisticsProcessorStub) ProcessRatingsEndOfEpoch ¶ added in v0.0.5
func (vsp *ValidatorStatisticsProcessorStub) ProcessRatingsEndOfEpoch(validatorInfos map[uint32][]*state.ValidatorInfo, epoch uint32) error
ProcessRatingsEndOfEpoch -
func (*ValidatorStatisticsProcessorStub) ResetValidatorStatisticsAtNewEpoch ¶
func (vsp *ValidatorStatisticsProcessorStub) ResetValidatorStatisticsAtNewEpoch(vInfos map[uint32][]*state.ValidatorInfo) error
ResetValidatorStatisticsAtNewEpoch -
func (*ValidatorStatisticsProcessorStub) RevertPeerState ¶
func (vsp *ValidatorStatisticsProcessorStub) RevertPeerState(header data.HeaderHandler) error
RevertPeerState -
func (*ValidatorStatisticsProcessorStub) RootHash ¶
func (vsp *ValidatorStatisticsProcessorStub) RootHash() ([]byte, error)
RootHash -
func (*ValidatorStatisticsProcessorStub) SaveNodesCoordinatorUpdates ¶ added in v1.1.15
func (vsp *ValidatorStatisticsProcessorStub) SaveNodesCoordinatorUpdates(epoch uint32) (bool, error)
SaveNodesCoordinatorUpdates -
func (*ValidatorStatisticsProcessorStub) SetLastFinalizedRootHash ¶ added in v1.0.118
func (vsp *ValidatorStatisticsProcessorStub) SetLastFinalizedRootHash(_ []byte)
SetLastFinalizedRootHash -
func (*ValidatorStatisticsProcessorStub) UpdatePeerState ¶
func (vsp *ValidatorStatisticsProcessorStub) UpdatePeerState(header data.HeaderHandler, _ map[string]data.HeaderHandler) ([]byte, error)
UpdatePeerState -
type ValidatorsProviderStub ¶ added in v0.0.5
type ValidatorsProviderStub struct {
GetLatestValidatorsCalled func() map[string]*state.ValidatorApiResponse
}
ValidatorsProviderStub -
func (*ValidatorsProviderStub) GetLatestValidators ¶ added in v0.0.5
func (vp *ValidatorsProviderStub) GetLatestValidators() map[string]*state.ValidatorApiResponse
GetLatestValidators -
func (*ValidatorsProviderStub) IsInterfaceNil ¶ added in v0.0.5
func (vp *ValidatorsProviderStub) IsInterfaceNil() bool
IsInterfaceNil -
type WatchdogMock ¶ added in v1.0.133
type WatchdogMock struct { }
WatchdogMock -
func (*WatchdogMock) IsInterfaceNil ¶ added in v1.0.133
func (w *WatchdogMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*WatchdogMock) Set ¶ added in v1.0.133
func (w *WatchdogMock) Set(_ func(alarmID string), _ time.Duration, _ string)
Set -
func (*WatchdogMock) SetDefault ¶ added in v1.0.133
func (w *WatchdogMock) SetDefault(_ time.Duration, _ string)
SetDefault -
type WhiteListHandlerStub ¶ added in v1.0.102
type WhiteListHandlerStub struct { RemoveCalled func(keys [][]byte) AddCalled func(keys [][]byte) IsWhiteListedCalled func(interceptedData process.InterceptedData) bool IsForCurrentShardCalled func(interceptedData process.InterceptedData) bool }
WhiteListHandlerStub -
func (*WhiteListHandlerStub) Add ¶ added in v1.0.102
func (w *WhiteListHandlerStub) Add(keys [][]byte)
Add -
func (*WhiteListHandlerStub) IsForCurrentShard ¶ added in v1.0.102
func (w *WhiteListHandlerStub) IsForCurrentShard(interceptedData process.InterceptedData) bool
IsForCurrentShard -
func (*WhiteListHandlerStub) IsInterfaceNil ¶ added in v1.0.102
func (w *WhiteListHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*WhiteListHandlerStub) IsWhiteListed ¶ added in v1.0.102
func (w *WhiteListHandlerStub) IsWhiteListed(interceptedData process.InterceptedData) bool
IsWhiteListed -
func (*WhiteListHandlerStub) Remove ¶ added in v1.0.102
func (w *WhiteListHandlerStub) Remove(keys [][]byte)
Remove -
Source Files ¶
- accountFactoryStub.go
- accountsStub.go
- accountsWrapperMock.go
- accumulatorMock.go
- appStatusHandlerStub.go
- blockChainMock.go
- blockProcessorStub.go
- blockTrackerStub.go
- bootstrapStorerMock.go
- chainHandlerStub.go
- chainStorerMock.go
- delegatedListProcessorStub.go
- directStakedListProcessorStub.go
- endOfEpochTriggerStub.go
- epochStartNotifier.go
- forkDetectorMock.go
- hardforkTriggerStub.go
- hasherFake.go
- hasherMock.go
- headerIntegrityVerifierStub.go
- headerResolverStub.go
- headerSigVerifierStub.go
- headersCacherStub.go
- indexerMock.go
- interceptorContainerStub.go
- interceptorStub.go
- intermProcesorContainerStub.go
- intermProcessorStub.go
- keyMock.go
- marshalizerFake.go
- marshalizerMock.go
- messengerStub.go
- miniBlocksResolverStub.go
- multipleShardsCoordinatorMock.go
- multisignMock.go
- networkShardingCollectorStub.go
- nodeRedundancyHandlerStub.go
- nodeWrapperStub.go
- nodesCoordinatorMock.go
- nonceHashConverterMock.go
- oneShardCoordinatorMock.go
- p2pAntifloodHandlerStub.go
- p2pMessageStub.go
- peerDenialEvaluatorStub.go
- peerProcessorMock.go
- peerSignatureHandlerMock.go
- pendingMiniBlocksHandlerStub.go
- pubkeyConverterMock.go
- pubkeyConverterStub.go
- queryHandlerStub.go
- requestHandlerStub.go
- resolversFinderStub.go
- rounderMock.go
- scQueryServiceStub.go
- shardCoordinatorMock.go
- singleSigMock.go
- singlesignerMock.go
- stakeValuesProcessorStub.go
- statusMetricsStub.go
- storageManagerStub.go
- storerMock.go
- storerStub.go
- streamerMock.go
- suiteStub.go
- syncTimerStub.go
- throttlerStub.go
- timeCacheStub.go
- transactionCostEstimatorMock.go
- trieStub.go
- txFeeHandlerStub.go
- txProcessorStub.go
- validatorMock.go
- validatorStatisticsProcessorStub.go
- validatorsProviderStub.go
- watchdogMock.go
- whiteListHandlerStub.go