Documentation ¶
Index ¶
- Variables
- func ShardIdToString(shardId uint32) string
- type AccountsFactoryStub
- type AccountsParserStub
- func (aps *AccountsParserStub) GetInitialAccountsForDelegated(addressBytes []byte) []genesis.InitialAccountHandler
- func (aps *AccountsParserStub) GetTotalStakedForDelegationAddress(delegationAddress string) *big.Int
- func (aps *AccountsParserStub) InitialAccounts() []genesis.InitialAccountHandler
- func (aps *AccountsParserStub) InitialAccountsSplitOnAddressesShards(shardCoordinator sharding.Coordinator) (map[uint32][]genesis.InitialAccountHandler, error)
- func (aps *AccountsParserStub) InitialAccountsSplitOnDelegationAddressesShards(shardCoordinator sharding.Coordinator) (map[uint32][]genesis.InitialAccountHandler, error)
- func (aps *AccountsParserStub) IsInterfaceNil() bool
- type AppStatusHandlerMock
- func (a *AppStatusHandlerMock) AddUint64(_ string, _ uint64)
- func (a *AppStatusHandlerMock) Close()
- func (a *AppStatusHandlerMock) Decrement(_ string)
- func (a *AppStatusHandlerMock) Increment(_ string)
- func (a *AppStatusHandlerMock) IsInterfaceNil() bool
- func (a *AppStatusHandlerMock) SetInt64Value(_ string, _ int64)
- func (a *AppStatusHandlerMock) SetStringValue(_ string, _ string)
- func (a *AppStatusHandlerMock) SetUInt64Value(_ string, _ uint64)
- type BlockProcessorStub
- func (bps *BlockProcessorStub) AddLastNotarizedHdr(shardId uint32, processedHdr data.HeaderHandler)
- func (bps *BlockProcessorStub) ApplyProcessedMiniBlocks(_ *processedMb.ProcessedMiniBlockTracker)
- func (bps *BlockProcessorStub) Close() error
- 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) 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) CheckBlockAgainstRoundHandler(headerHandler data.HeaderHandler) error
- func (bts *BlockTrackerStub) CheckBlockAgainstWhitelist(interceptedData process.InterceptedData) bool
- func (bts *BlockTrackerStub) CleanupHeadersBehindNonce(shardID uint32, selfNotarizedNonce uint64, crossNotarizedNonce uint64)
- func (bts *BlockTrackerStub) CleanupInvalidCrossHeaders(_ uint32, _ uint64)
- func (bts *BlockTrackerStub) ComputeLongestChain(shardID uint32, header data.HeaderHandler) ([]data.HeaderHandler, [][]byte)
- func (bts *BlockTrackerStub) ComputeLongestMetaChainFromLastNotarized() ([]data.HeaderHandler, [][]byte, error)
- func (bts *BlockTrackerStub) ComputeLongestShardsChainsFromLastNotarized() ([]data.HeaderHandler, [][]byte, map[uint32][]data.HeaderHandler, error)
- func (bts *BlockTrackerStub) DisplayTrackedHeaders()
- func (bts *BlockTrackerStub) GetCrossNotarizedHeader(shardID uint32, offset uint64) (data.HeaderHandler, []byte, error)
- func (bts *BlockTrackerStub) GetLastCrossNotarizedHeader(shardID uint32) (data.HeaderHandler, []byte, error)
- func (bts *BlockTrackerStub) GetLastCrossNotarizedHeadersForAllShards() (map[uint32]data.HeaderHandler, error)
- func (bts *BlockTrackerStub) GetLastSelfNotarizedHeader(shardID uint32) (data.HeaderHandler, []byte, error)
- func (bts *BlockTrackerStub) GetSelfNotarizedHeader(shardID uint32, offset uint64) (data.HeaderHandler, []byte, error)
- func (bts *BlockTrackerStub) GetTrackedHeaders(shardID uint32) ([]data.HeaderHandler, [][]byte)
- func (bts *BlockTrackerStub) GetTrackedHeadersForAllShards() map[uint32][]data.HeaderHandler
- func (bts *BlockTrackerStub) GetTrackedHeadersWithNonce(shardID uint32, nonce uint64) ([]data.HeaderHandler, [][]byte)
- func (bts *BlockTrackerStub) IsInterfaceNil() bool
- func (bts *BlockTrackerStub) IsShardStuck(shardId uint32) bool
- func (bts *BlockTrackerStub) RegisterCrossNotarizedHeadersHandler(...)
- func (bts *BlockTrackerStub) RegisterFinalMetachainHeadersHandler(...)
- func (bts *BlockTrackerStub) RegisterSelfNotarizedFromCrossHeadersHandler(...)
- func (bts *BlockTrackerStub) RegisterSelfNotarizedHeadersHandler(...)
- func (bts *BlockTrackerStub) RemoveLastNotarizedHeaders()
- func (bts *BlockTrackerStub) RestoreToGenesis()
- func (bts *BlockTrackerStub) ShouldAddHeader(headerHandler data.HeaderHandler) bool
- type BoostrapStorerStub
- func (bsm *BoostrapStorerStub) Get(round int64) (bootstrapStorage.BootstrapData, error)
- func (bsm *BoostrapStorerStub) GetHighestRound() int64
- func (bsm *BoostrapStorerStub) IsInterfaceNil() bool
- func (bsm *BoostrapStorerStub) Put(round int64, bootData bootstrapStorage.BootstrapData) error
- func (bsm *BoostrapStorerStub) SaveLastRound(_ int64) error
- type BootstrapStorerMock
- func (bsm *BootstrapStorerMock) Get(round int64) (bootstrapStorage.BootstrapData, error)
- func (bsm *BootstrapStorerMock) GetHighestRound() int64
- func (bsm *BootstrapStorerMock) IsInterfaceNil() bool
- func (bsm *BootstrapStorerMock) Put(round int64, bootData bootstrapStorage.BootstrapData) error
- func (bsm *BootstrapStorerMock) SaveLastRound(_ 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) GetAllStorers() map[dataRetriever.UnitType]storage.Storer
- func (bc *ChainStorerMock) GetStorer(unitType dataRetriever.UnitType) storage.Storer
- func (bc *ChainStorerMock) Has(unitType dataRetriever.UnitType, key []byte) error
- func (bc *ChainStorerMock) IsInterfaceNil() bool
- func (bc *ChainStorerMock) Put(unitType dataRetriever.UnitType, key []byte, value []byte) error
- func (bc *ChainStorerMock) SetEpochForPutOperation(_ uint32)
- type ChainStorerStub
- func (bc *ChainStorerStub) AddStorer(key dataRetriever.UnitType, s storage.Storer)
- func (bc *ChainStorerStub) CloseAll() error
- func (bc *ChainStorerStub) Destroy() error
- func (bc *ChainStorerStub) Get(unitType dataRetriever.UnitType, key []byte) ([]byte, error)
- func (bc *ChainStorerStub) GetAll(unitType dataRetriever.UnitType, keys [][]byte) (map[string][]byte, error)
- func (bc *ChainStorerStub) GetAllStorers() map[dataRetriever.UnitType]storage.Storer
- func (bc *ChainStorerStub) GetStorer(unitType dataRetriever.UnitType) storage.Storer
- func (bc *ChainStorerStub) Has(unitType dataRetriever.UnitType, key []byte) error
- func (bc *ChainStorerStub) IsInterfaceNil() bool
- func (bc *ChainStorerStub) Put(unitType dataRetriever.UnitType, key []byte, value []byte) error
- func (bc *ChainStorerStub) SetEpochForPutOperation(_ uint32)
- type CoreComponentsMock
- func (ccm *CoreComponentsMock) AddressPubKeyConverter() core.PubkeyConverter
- func (ccm *CoreComponentsMock) AlarmScheduler() core.TimersScheduler
- func (ccm *CoreComponentsMock) ChainID() string
- func (ccm *CoreComponentsMock) ChanStopNodeProcess() chan endProcess.ArgEndProcess
- func (ccm *CoreComponentsMock) EconomicsData() process.EconomicsDataHandler
- func (ccm *CoreComponentsMock) EncodedAddressLen() uint32
- func (ccm *CoreComponentsMock) EpochNotifier() process.EpochNotifier
- func (ccm *CoreComponentsMock) EpochStartNotifierWithConfirm() factory.EpochStartNotifierWithConfirm
- func (ccm *CoreComponentsMock) GenesisNodesSetup() sharding.GenesisNodesSetupHandler
- func (ccm *CoreComponentsMock) GenesisTime() time.Time
- func (ccm *CoreComponentsMock) Hasher() hashing.Hasher
- func (ccm *CoreComponentsMock) InternalMarshalizer() marshal.Marshalizer
- func (ccm *CoreComponentsMock) IsInterfaceNil() bool
- func (ccm *CoreComponentsMock) MinTransactionVersion() uint32
- func (ccm *CoreComponentsMock) NodeTypeProvider() core.NodeTypeProviderHandler
- func (ccm *CoreComponentsMock) NodesShuffler() sharding.NodesShuffler
- func (ccm *CoreComponentsMock) PathHandler() storage.PathManagerHandler
- func (ccm *CoreComponentsMock) Rater() sharding.PeerAccountListAndRatingHandler
- func (ccm *CoreComponentsMock) RatingsData() process.RatingsInfoHandler
- func (ccm *CoreComponentsMock) RoundHandler() consensus.RoundHandler
- func (ccm *CoreComponentsMock) SetInternalMarshalizer(m marshal.Marshalizer) error
- func (ccm *CoreComponentsMock) StatusHandler() core.AppStatusHandler
- func (ccm *CoreComponentsMock) StatusHandlerUtils() nodeFactory.StatusHandlersUtils
- func (ccm *CoreComponentsMock) SyncTimer() ntp.SyncTimer
- func (ccm *CoreComponentsMock) TxMarshalizer() marshal.Marshalizer
- func (ccm *CoreComponentsMock) TxSignHasher() hashing.Hasher
- func (ccm *CoreComponentsMock) TxVersionChecker() process.TxVersionCheckerHandler
- func (ccm *CoreComponentsMock) Uint64ByteSliceConverter() typeConverters.Uint64ByteSliceConverter
- func (ccm *CoreComponentsMock) ValidatorPubKeyConverter() core.PubkeyConverter
- func (ccm *CoreComponentsMock) VmMarshalizer() marshal.Marshalizer
- func (ccm *CoreComponentsMock) Watchdog() core.WatchdogTimer
- type CryptoComponentsMock
- func (ccm *CryptoComponentsMock) BlockSignKeyGen() crypto.KeyGenerator
- func (ccm *CryptoComponentsMock) BlockSigner() crypto.SingleSigner
- func (ccm *CryptoComponentsMock) Clone() interface{}
- func (ccm *CryptoComponentsMock) IsInterfaceNil() bool
- func (ccm *CryptoComponentsMock) MessageSignVerifier() vm.MessageSignVerifier
- func (ccm *CryptoComponentsMock) MultiSigner() crypto.MultiSigner
- func (ccm *CryptoComponentsMock) PeerSignatureHandler() crypto.PeerSignatureHandler
- func (ccm *CryptoComponentsMock) PrivateKey() crypto.PrivateKey
- func (ccm *CryptoComponentsMock) PrivateKeyBytes() []byte
- func (ccm *CryptoComponentsMock) PublicKey() crypto.PublicKey
- func (ccm *CryptoComponentsMock) PublicKeyBytes() []byte
- func (ccm *CryptoComponentsMock) PublicKeyString() string
- func (ccm *CryptoComponentsMock) SetMultiSigner(ms crypto.MultiSigner) error
- func (ccm *CryptoComponentsMock) TxSignKeyGen() crypto.KeyGenerator
- func (ccm *CryptoComponentsMock) TxSingleSigner() crypto.SingleSigner
- type DataComponentsMock
- func (dcm *DataComponentsMock) Blockchain() data.ChainHandler
- func (dcm *DataComponentsMock) Clone() interface{}
- func (dcm *DataComponentsMock) Datapool() dataRetriever.PoolsHolder
- func (dcm *DataComponentsMock) EconomicsHandler() factory.EconomicsHandler
- func (dcm *DataComponentsMock) IsInterfaceNil() bool
- func (dcm *DataComponentsMock) MiniBlocksProvider() factory.MiniBlockProvider
- func (dcm *DataComponentsMock) SetBlockchain(chain data.ChainHandler)
- func (dcm *DataComponentsMock) StorageService() dataRetriever.StorageService
- type EpochNotifierStub
- func (ens *EpochNotifierStub) CheckEpoch(header data.HeaderHandler)
- func (ens *EpochNotifierStub) CurrentEpoch() uint32
- func (ens *EpochNotifierStub) IsInterfaceNil() bool
- func (ens *EpochNotifierStub) NewEpoch(epoch uint32, timestamp uint64)
- func (ens *EpochNotifierStub) RegisterHandler(handler epochStart.ActionHandler)
- func (ens *EpochNotifierStub) RegisterNotifyHandler(handler vmcommon.EpochSubscriberHandler)
- type EpochStartNotifierStub
- func (esnm *EpochStartNotifierStub) IsInterfaceNil() bool
- func (esnm *EpochStartNotifierStub) NotifyAll(hdr data.HeaderHandler)
- func (esnm *EpochStartNotifierStub) NotifyAllPrepare(metaHdr data.HeaderHandler, body data.BodyHandler)
- func (esnm *EpochStartNotifierStub) NotifyEpochChangeConfirmed(epoch uint32)
- func (esnm *EpochStartNotifierStub) RegisterHandler(handler epochStart.ActionHandler)
- func (esnm *EpochStartNotifierStub) UnregisterHandler(handler epochStart.ActionHandler)
- type EpochStartTriggerStub
- func (e *EpochStartTriggerStub) Close() error
- func (e *EpochStartTriggerStub) Epoch() uint32
- func (e *EpochStartTriggerStub) EpochFinalityAttestingRound() uint64
- func (e *EpochStartTriggerStub) EpochStartMetaHdrHash() []byte
- func (e *EpochStartTriggerStub) EpochStartRound() uint64
- func (e *EpochStartTriggerStub) ForceEpochStart(round uint64)
- func (e *EpochStartTriggerStub) GetRoundsPerEpoch() uint64
- func (e *EpochStartTriggerStub) GetSavedStateKey() []byte
- func (e *EpochStartTriggerStub) IsEpochStart() bool
- func (e *EpochStartTriggerStub) IsInterfaceNil() bool
- func (e *EpochStartTriggerStub) LoadState(_ []byte) error
- func (e *EpochStartTriggerStub) MetaEpoch() uint32
- func (e *EpochStartTriggerStub) NotifyAll(_ data.HeaderHandler)
- func (e *EpochStartTriggerStub) ReceivedHeader(header data.HeaderHandler)
- func (e *EpochStartTriggerStub) RequestEpochStartIfNeeded(_ data.HeaderHandler)
- func (e *EpochStartTriggerStub) Revert(_ data.HeaderHandler)
- func (e *EpochStartTriggerStub) RevertStateToBlock(_ data.HeaderHandler) error
- func (e *EpochStartTriggerStub) SetAppStatusHandler(_ core.AppStatusHandler) error
- func (e *EpochStartTriggerStub) SetCurrentEpochStartRound(_ uint64)
- func (e *EpochStartTriggerStub) SetEpoch(_ uint32)
- func (e *EpochStartTriggerStub) SetFinalityAttestingRound(_ uint64)
- func (e *EpochStartTriggerStub) SetProcessed(header data.HeaderHandler, _ data.BodyHandler)
- func (e *EpochStartTriggerStub) SetRoundsPerEpoch(_ uint64)
- func (e *EpochStartTriggerStub) SetTrigger(_ epochStart.TriggerHandler)
- func (e *EpochStartTriggerStub) Update(round uint64, nonce uint64)
- type 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 ForkDetectorStub
- func (fdm *ForkDetectorStub) AddHeader(header data.HeaderHandler, hash []byte, state process.BlockHeaderState, ...) error
- func (fdm *ForkDetectorStub) CheckFork() *process.ForkInfo
- func (fdm *ForkDetectorStub) GetHighestFinalBlockHash() []byte
- func (fdm *ForkDetectorStub) GetHighestFinalBlockNonce() uint64
- func (fdm *ForkDetectorStub) GetNotarizedHeaderHash(nonce uint64) []byte
- func (fdm *ForkDetectorStub) IsInterfaceNil() bool
- func (fdm *ForkDetectorStub) ProbableHighestNonce() uint64
- func (fdm *ForkDetectorStub) RemoveHeader(nonce uint64, hash []byte)
- func (fdm *ForkDetectorStub) ResetFork()
- func (fdm *ForkDetectorStub) ResetProbableHighestNonce()
- func (fdm *ForkDetectorStub) RestoreToGenesis()
- func (fdm *ForkDetectorStub) SetFinalToLastCheckpoint()
- func (fdm *ForkDetectorStub) SetRollBackNonce(nonce uint64)
- type GasScheduleNotifierMock
- 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 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 HeaderValidatorStub
- 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)
- 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 KeyLoaderStub
- type ManualEpochStartNotifierStub
- type MarshalizerMock
- type MemDbMock
- func (s *MemDbMock) Close() error
- func (s *MemDbMock) Destroy() error
- func (s *MemDbMock) DestroyClosed() error
- func (s *MemDbMock) Get(key []byte) ([]byte, error)
- func (s *MemDbMock) Has(key []byte) error
- func (s *MemDbMock) Init() error
- func (s *MemDbMock) IsInterfaceNil() bool
- func (s *MemDbMock) Put(key, val []byte) error
- func (s *MemDbMock) Remove(key []byte) error
- type MiniBlocksProviderStub
- type MultipleShardsCoordinatorMock
- func (scm *MultipleShardsCoordinatorMock) CommunicationIdentifier(destShardID uint32) string
- func (scm *MultipleShardsCoordinatorMock) ComputeId(address []byte) uint32
- func (scm *MultipleShardsCoordinatorMock) IsInterfaceNil() bool
- func (scm *MultipleShardsCoordinatorMock) NumberOfShards() uint32
- func (scm *MultipleShardsCoordinatorMock) SameShard(_, _ []byte) bool
- func (scm *MultipleShardsCoordinatorMock) SelfId() uint32
- func (scm *MultipleShardsCoordinatorMock) SetNoShards(noShards uint32)
- func (scm *MultipleShardsCoordinatorMock) SetSelfId(_ uint32) error
- type NetworkComponentsMock
- func (ncm *NetworkComponentsMock) CheckSubcomponents() error
- func (ncm *NetworkComponentsMock) Close() error
- func (ncm *NetworkComponentsMock) Create() error
- func (ncm *NetworkComponentsMock) InputAntiFloodHandler() factory.P2PAntifloodHandler
- func (ncm *NetworkComponentsMock) IsInterfaceNil() bool
- func (ncm *NetworkComponentsMock) NetworkMessenger() p2p.Messenger
- func (ncm *NetworkComponentsMock) OutputAntiFloodHandler() factory.P2PAntifloodHandler
- func (ncm *NetworkComponentsMock) PeerBlackListHandler() process.PeerBlackListCacher
- func (ncm *NetworkComponentsMock) PeerHonestyHandler() factory.PeerHonestyHandler
- func (ncm *NetworkComponentsMock) PreferredPeersHolderHandler() factory.PreferredPeersHolderHandler
- func (ncm *NetworkComponentsMock) PubKeyCacher() process.TimeCacher
- type NodeShufflerMock
- type NodesCoordinatorMock
- func (ncm *NodesCoordinatorMock) ComputeAdditionalLeaving(_ []*state.ShardValidatorInfo) (map[uint32][]sharding.Validator, error)
- func (ncm *NodesCoordinatorMock) ComputeConsensusGroup(randomess []byte, round uint64, shardId uint32, epoch uint32) ([]sharding.Validator, error)
- func (ncm *NodesCoordinatorMock) ConsensusGroupSize(shardId uint32) int
- func (ncm *NodesCoordinatorMock) GetAllEligibleValidatorsPublicKeys(epoch 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(selection []byte, shardId uint32, epoch uint32) (publicKeys []string, err error)
- func (ncm *NodesCoordinatorMock) GetValidatorWithPublicKey(publicKey []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) SetNodesPerShards(eligible map[uint32][]sharding.Validator, _ map[uint32][]sharding.Validator, ...) error
- func (ncm *NodesCoordinatorMock) ShardIdForEpoch(_ uint32) (uint32, error)
- func (ncm *NodesCoordinatorMock) ShuffleOutForEpoch(_ uint32)
- func (ncm *NodesCoordinatorMock) ValidatorsWeights(validators []sharding.Validator) ([]uint32, error)
- type NodesSetupStub
- func (n *NodesSetupStub) GetAdaptivity() bool
- func (n *NodesSetupStub) GetChainId() string
- func (n *NodesSetupStub) GetHysteresis() float32
- func (n *NodesSetupStub) GetMetaConsensusGroupSize() uint32
- func (n *NodesSetupStub) GetMinTransactionVersion() uint32
- func (n *NodesSetupStub) GetRoundDuration() uint64
- func (n *NodesSetupStub) GetShardConsensusGroupSize() uint32
- func (n *NodesSetupStub) GetStartTime() int64
- func (n *NodesSetupStub) InitialNodesInfo() (map[uint32][]sharding.GenesisNodeInfoHandler, ...)
- func (n *NodesSetupStub) InitialNodesInfoForShard(shardId uint32) ([]sharding.GenesisNodeInfoHandler, []sharding.GenesisNodeInfoHandler, error)
- func (n *NodesSetupStub) IsInterfaceNil() bool
- func (n *NodesSetupStub) MinNumberOfMetaNodes() uint32
- func (n *NodesSetupStub) MinNumberOfNodes() uint32
- func (n *NodesSetupStub) MinNumberOfShardNodes() uint32
- func (n *NodesSetupStub) NumberOfShards() uint32
- type P2PAntifloodHandlerStub
- func (p2pahs *P2PAntifloodHandlerStub) ApplyConsensusSize(size int)
- func (p2pahs *P2PAntifloodHandlerStub) BlacklistPeer(peer core.PeerID, reason string, duration time.Duration)
- func (p2pahs *P2PAntifloodHandlerStub) CanProcessMessage(message p2p.MessageP2P, fromConnectedPeer core.PeerID) error
- func (p2pahs *P2PAntifloodHandlerStub) CanProcessMessagesOnTopic(peer core.PeerID, topic string, numMessages uint32, totalSize uint64, ...) error
- func (p2pahs *P2PAntifloodHandlerStub) Close() error
- func (p2pahs *P2PAntifloodHandlerStub) IsInterfaceNil() bool
- func (p2pahs *P2PAntifloodHandlerStub) IsOriginatorEligibleForTopic(pid core.PeerID, topic string) error
- func (p2pahs *P2PAntifloodHandlerStub) ResetForTopic(_ string)
- func (p2pahs *P2PAntifloodHandlerStub) SetDebugger(debugger process.AntifloodDebugger) error
- func (p2pahs *P2PAntifloodHandlerStub) SetMaxMessagesForTopic(_ string, _ uint32)
- func (p2pahs *P2PAntifloodHandlerStub) SetPeerValidatorMapper(_ process.PeerValidatorMapper) error
- func (p2pahs *P2PAntifloodHandlerStub) SetTopicsForAll(_ ...string)
- type PeerBlackListHandlerStub
- type PeerHonestyHandlerStub
- 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 PointMock
- func (po *PointMock) Add(_ crypto.Point) (crypto.Point, error)
- func (po *PointMock) Base() crypto.Point
- func (po *PointMock) Clone() crypto.Point
- func (po *PointMock) Equal(p crypto.Point) (bool, error)
- func (po *PointMock) GetUnderlyingObj() interface{}
- func (po *PointMock) IsInterfaceNil() bool
- func (po *PointMock) MarshalBinary() ([]byte, error)
- func (po *PointMock) Mul(s crypto.Scalar) (crypto.Point, error)
- func (po *PointMock) Neg() crypto.Point
- func (po *PointMock) Null() crypto.Point
- func (po *PointMock) Pick() (crypto.Point, error)
- func (po *PointMock) Set(_ crypto.Point) error
- func (po *PointMock) Sub(_ crypto.Point) (crypto.Point, error)
- func (po *PointMock) UnmarshalBinary(point []byte) error
- type PrivateKeyStub
- type ProcessComponentsMock
- func (pcm *ProcessComponentsMock) ArwenChangeLocker() process.Locker
- func (pcm *ProcessComponentsMock) BlackListHandler() process.TimeCacher
- func (pcm *ProcessComponentsMock) BlockProcessor() process.BlockProcessor
- func (pcm *ProcessComponentsMock) BlockTracker() process.BlockTracker
- func (pcm *ProcessComponentsMock) BootStorer() process.BootStorer
- func (pcm *ProcessComponentsMock) CheckSubcomponents() error
- func (pcm *ProcessComponentsMock) Close() error
- func (pcm *ProcessComponentsMock) Create() error
- func (pcm *ProcessComponentsMock) CurrentEpochProvider() process.CurrentNetworkEpochProviderHandler
- func (pcm *ProcessComponentsMock) EpochStartNotifier() factory.EpochStartNotifier
- func (pcm *ProcessComponentsMock) EpochStartTrigger() epochStart.TriggerHandler
- func (pcm *ProcessComponentsMock) FallbackHeaderValidator() process.FallbackHeaderValidator
- func (pcm *ProcessComponentsMock) ForkDetector() process.ForkDetector
- func (pcm *ProcessComponentsMock) HeaderConstructionValidator() process.HeaderConstructionValidator
- func (pcm *ProcessComponentsMock) HeaderIntegrityVerifier() process.HeaderIntegrityVerifier
- func (pcm *ProcessComponentsMock) HeaderSigVerifier() process.InterceptedHeaderSigVerifier
- func (pcm *ProcessComponentsMock) HistoryRepository() dblookupext.HistoryRepository
- func (pcm *ProcessComponentsMock) ImportStartHandler() update.ImportStartHandler
- func (pcm *ProcessComponentsMock) InterceptorsContainer() process.InterceptorsContainer
- func (pcm *ProcessComponentsMock) IsInterfaceNil() bool
- func (pcm *ProcessComponentsMock) NodeRedundancyHandler() consensus.NodeRedundancyHandler
- func (pcm *ProcessComponentsMock) NodesCoordinator() sharding.NodesCoordinator
- func (pcm *ProcessComponentsMock) PeerShardMapper() process.NetworkShardingCollector
- func (pcm *ProcessComponentsMock) PendingMiniBlocksHandler() process.PendingMiniBlocksHandler
- func (pcm *ProcessComponentsMock) RequestHandler() process.RequestHandler
- func (pcm *ProcessComponentsMock) RequestedItemsHandler() dataRetriever.RequestedItemsHandler
- func (pcm *ProcessComponentsMock) ResolversFinder() dataRetriever.ResolversFinder
- func (pcm *ProcessComponentsMock) RoundHandler() consensus.RoundHandler
- func (pcm *ProcessComponentsMock) ShardCoordinator() sharding.Coordinator
- func (pcm *ProcessComponentsMock) String() string
- func (pcm *ProcessComponentsMock) TransactionSimulatorProcessor() factory.TransactionSimulatorProcessor
- func (pcm *ProcessComponentsMock) TxLogsProcessor() process.TransactionLogProcessorDatabase
- func (pcm *ProcessComponentsMock) ValidatorsProvider() process.ValidatorsProvider
- func (pcm *ProcessComponentsMock) ValidatorsStatistics() process.ValidatorStatisticsProcessor
- func (pcm *ProcessComponentsMock) WhiteListHandler() process.WhiteListHandler
- func (pcm *ProcessComponentsMock) WhiteListerVerifiedTxs() process.WhiteListHandler
- type PubkeyConverterStub
- type PublicKeyMock
- type RedundancyHandlerStub
- func (rhs *RedundancyHandlerStub) AdjustInactivityIfNeeded(selfPubKey string, consensusPubKeys []string, roundIndex int64)
- func (rhs *RedundancyHandlerStub) IsInterfaceNil() bool
- func (rhs *RedundancyHandlerStub) IsMainMachineActive() bool
- func (rhs *RedundancyHandlerStub) IsRedundancyNode() bool
- func (rhs *RedundancyHandlerStub) ObserverPrivateKey() crypto.PrivateKey
- func (rhs *RedundancyHandlerStub) ResetInactivityIfNeeded(selfPubKey string, consensusMsgPubKey string, consensusMsgPeerID core.PeerID)
- type ResolversFinderStub
- func (rfs *ResolversFinderStub) Add(key string, val dataRetriever.Resolver) error
- func (rfs *ResolversFinderStub) AddMultiple(_ []string, _ []dataRetriever.Resolver) error
- func (rfs *ResolversFinderStub) Close() 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 RoundHandlerMock
- func (rndm *RoundHandlerMock) BeforeGenesis() bool
- func (rndm *RoundHandlerMock) Index() int64
- func (rndm *RoundHandlerMock) IsInterfaceNil() bool
- func (rndm *RoundHandlerMock) RemainingTime(_ time.Time, _ time.Duration) time.Duration
- func (rndm *RoundHandlerMock) TimeDuration() time.Duration
- func (rndm *RoundHandlerMock) TimeStamp() time.Time
- func (rndm *RoundHandlerMock) UpdateRound(genesisRoundTimeStamp time.Time, timeStamp time.Time)
- type ScalarMock
- func (sm *ScalarMock) Add(_ crypto.Scalar) (crypto.Scalar, error)
- func (sm *ScalarMock) Clone() crypto.Scalar
- func (sm *ScalarMock) Div(_ crypto.Scalar) (crypto.Scalar, error)
- func (sm *ScalarMock) Equal(_ crypto.Scalar) (bool, error)
- func (sm *ScalarMock) GetUnderlyingObj() interface{}
- func (sm *ScalarMock) Inv(_ crypto.Scalar) (crypto.Scalar, error)
- func (sm *ScalarMock) IsInterfaceNil() bool
- func (sm *ScalarMock) MarshalBinary() ([]byte, error)
- func (sm *ScalarMock) Mul(_ crypto.Scalar) (crypto.Scalar, error)
- func (sm *ScalarMock) Neg() crypto.Scalar
- func (sm *ScalarMock) One() crypto.Scalar
- func (sm *ScalarMock) Pick() (crypto.Scalar, error)
- func (sm *ScalarMock) Set(_ crypto.Scalar) error
- func (sm *ScalarMock) SetBytes([]byte) (crypto.Scalar, error)
- func (sm *ScalarMock) SetInt64(_ int64)
- func (sm *ScalarMock) Sub(_ crypto.Scalar) (crypto.Scalar, error)
- func (sm *ScalarMock) UnmarshalBinary(val []byte) error
- func (sm *ScalarMock) Zero() crypto.Scalar
- type SinglesignFailMock
- type SinglesignMock
- type SinglesignStub
- type SmartContractParserStub
- func (scps *SmartContractParserStub) GetDeployedSCAddresses(scType string) (map[string]struct{}, error)
- func (scps *SmartContractParserStub) InitialSmartContracts() []genesis.InitialSmartContractHandler
- func (scps *SmartContractParserStub) InitialSmartContractsSplitOnOwnersShards(shardCoordinator sharding.Coordinator) (map[uint32][]genesis.InitialSmartContractHandler, error)
- func (scps *SmartContractParserStub) IsInterfaceNil() bool
- type StateComponentsHolderStub
- func (s *StateComponentsHolderStub) AccountsAdapter() state.AccountsAdapter
- func (s *StateComponentsHolderStub) AccountsAdapterAPI() state.AccountsAdapter
- func (s *StateComponentsHolderStub) IsInterfaceNil() bool
- func (s *StateComponentsHolderStub) PeerAccounts() state.AccountsAdapter
- func (s *StateComponentsHolderStub) TrieStorageManagers() map[string]common.StorageManager
- func (s *StateComponentsHolderStub) TriesContainer() state.TriesHolder
- type StatusHandlersFactoryMock
- type StatusHandlersUtilsMock
- func (shum *StatusHandlersUtilsMock) IsInterfaceNil() bool
- func (shum *StatusHandlersUtilsMock) Metrics() external.StatusMetricsHandler
- func (shum *StatusHandlersUtilsMock) SignalLogRewrite()
- func (shum *StatusHandlersUtilsMock) SignalStartViews()
- func (shum *StatusHandlersUtilsMock) StatusHandler() core.AppStatusHandler
- func (shum *StatusHandlersUtilsMock) UpdateStorerAndMetricsForPersistentHandler(_ storage.Storer) error
- type Streamer
- type SuiteStub
- func (s *SuiteStub) CheckPointValid(pointBytes []byte) error
- func (s *SuiteStub) CreateKeyPair() (crypto.Scalar, crypto.Point)
- func (s *SuiteStub) CreatePoint() crypto.Point
- func (s *SuiteStub) CreatePointForScalar(scalar crypto.Scalar) (crypto.Point, error)
- func (s *SuiteStub) CreateScalar() crypto.Scalar
- func (s *SuiteStub) GetUnderlyingSuite() interface{}
- func (s *SuiteStub) IsInterfaceNil() bool
- func (s *SuiteStub) PointLen() int
- func (s *SuiteStub) RandomStream() cipher.Stream
- func (s *SuiteStub) ScalarLen() int
- func (s *SuiteStub) String() string
- type TriesHolderStub
- func (ths *TriesHolderStub) Get(key []byte) common.Trie
- func (ths *TriesHolderStub) GetAll() []common.Trie
- func (ths *TriesHolderStub) IsInterfaceNil() bool
- func (ths *TriesHolderStub) Put(key []byte, trie common.Trie)
- func (ths *TriesHolderStub) Replace(key []byte, trie common.Trie)
- func (ths *TriesHolderStub) Reset()
- type TxLogProcessorMock
- type ValidatorStatisticsProcessorStub
- func (vsp *ValidatorStatisticsProcessorStub) Commit() ([]byte, error)
- func (vsp *ValidatorStatisticsProcessorStub) DisplayRatings(_ uint32)
- func (vsp *ValidatorStatisticsProcessorStub) GetPeerAccount(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
Constants ¶
This section is empty.
Variables ¶
var ErrMockMarshalizer = errors.New("MarshalizerMock generic error")
ErrMockMarshalizer -
Functions ¶
func ShardIdToString ¶ added in v1.2.0
ShardIdToString returns the string according to the shard id
Types ¶
type AccountsFactoryStub ¶ added in v1.2.0
type AccountsFactoryStub struct {
CreateAccountCalled func(address []byte) (vmcommon.AccountHandler, error)
}
AccountsFactoryStub -
func (*AccountsFactoryStub) CreateAccount ¶ added in v1.2.0
func (afs *AccountsFactoryStub) CreateAccount(address []byte) (vmcommon.AccountHandler, error)
CreateAccount -
func (*AccountsFactoryStub) IsInterfaceNil ¶ added in v1.2.0
func (afs *AccountsFactoryStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type AccountsParserStub ¶ added in v1.2.0
type AccountsParserStub struct { InitialAccountsSplitOnAddressesShardsCalled func(shardCoordinator sharding.Coordinator) (map[uint32][]genesis.InitialAccountHandler, error) InitialAccountsSplitOnDelegationAddressesShardsCalled func(shardCoordinator sharding.Coordinator) (map[uint32][]genesis.InitialAccountHandler, error) InitialAccountsCalled func() []genesis.InitialAccountHandler GetTotalStakedForDelegationAddressCalled func(delegationAddress string) *big.Int GetInitialAccountsForDelegatedCalled func(addressBytes []byte) []genesis.InitialAccountHandler }
AccountsParserStub -
func (*AccountsParserStub) GetInitialAccountsForDelegated ¶ added in v1.2.0
func (aps *AccountsParserStub) GetInitialAccountsForDelegated(addressBytes []byte) []genesis.InitialAccountHandler
GetInitialAccountsForDelegated -
func (*AccountsParserStub) GetTotalStakedForDelegationAddress ¶ added in v1.2.0
func (aps *AccountsParserStub) GetTotalStakedForDelegationAddress(delegationAddress string) *big.Int
GetTotalStakedForDelegationAddress -
func (*AccountsParserStub) InitialAccounts ¶ added in v1.2.0
func (aps *AccountsParserStub) InitialAccounts() []genesis.InitialAccountHandler
InitialAccounts -
func (*AccountsParserStub) InitialAccountsSplitOnAddressesShards ¶ added in v1.2.0
func (aps *AccountsParserStub) InitialAccountsSplitOnAddressesShards(shardCoordinator sharding.Coordinator) (map[uint32][]genesis.InitialAccountHandler, error)
InitialAccountsSplitOnAddressesShards -
func (*AccountsParserStub) InitialAccountsSplitOnDelegationAddressesShards ¶ added in v1.2.0
func (aps *AccountsParserStub) InitialAccountsSplitOnDelegationAddressesShards(shardCoordinator sharding.Coordinator) (map[uint32][]genesis.InitialAccountHandler, error)
InitialAccountsSplitOnDelegationAddressesShards -
func (*AccountsParserStub) IsInterfaceNil ¶ added in v1.2.0
func (aps *AccountsParserStub) IsInterfaceNil() bool
IsInterfaceNil -
type AppStatusHandlerMock ¶
type AppStatusHandlerMock struct {
CloseCalled func()
}
AppStatusHandlerMock -
func (*AppStatusHandlerMock) AddUint64 ¶
func (a *AppStatusHandlerMock) AddUint64(_ string, _ uint64)
AddUint64 -
func (*AppStatusHandlerMock) Decrement ¶
func (a *AppStatusHandlerMock) Decrement(_ string)
Decrement -
func (*AppStatusHandlerMock) Increment ¶
func (a *AppStatusHandlerMock) Increment(_ string)
Increment -
func (*AppStatusHandlerMock) IsInterfaceNil ¶
func (a *AppStatusHandlerMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*AppStatusHandlerMock) SetInt64Value ¶
func (a *AppStatusHandlerMock) SetInt64Value(_ string, _ int64)
SetInt64Value -
func (*AppStatusHandlerMock) SetStringValue ¶
func (a *AppStatusHandlerMock) SetStringValue(_ string, _ string)
SetStringValue -
func (*AppStatusHandlerMock) SetUInt64Value ¶
func (a *AppStatusHandlerMock) SetUInt64Value(_ string, _ uint64)
SetUInt64Value -
type BlockProcessorStub ¶ added in v1.2.0
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 }
BlockProcessorStub mocks the implementation for a blockProcessor
func (*BlockProcessorStub) AddLastNotarizedHdr ¶ added in v1.2.0
func (bps *BlockProcessorStub) AddLastNotarizedHdr(shardId uint32, processedHdr data.HeaderHandler)
AddLastNotarizedHdr -
func (*BlockProcessorStub) ApplyProcessedMiniBlocks ¶ added in v1.2.0
func (bps *BlockProcessorStub) ApplyProcessedMiniBlocks(_ *processedMb.ProcessedMiniBlockTracker)
ApplyProcessedMiniBlocks -
func (*BlockProcessorStub) Close ¶ added in v1.2.0
func (bps *BlockProcessorStub) Close() error
Close -
func (*BlockProcessorStub) CommitBlock ¶ added in v1.2.0
func (bps *BlockProcessorStub) CommitBlock(header data.HeaderHandler, body data.BodyHandler) error
CommitBlock mocks the commit of a block
func (*BlockProcessorStub) CreateBlock ¶ added in v1.2.0
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 ¶ added in v1.2.0
func (bps *BlockProcessorStub) CreateGenesisBlock(balances map[string]*big.Int) (data.HeaderHandler, error)
CreateGenesisBlock mocks the creation of a genesis block body
func (*BlockProcessorStub) CreateNewHeader ¶ added in v1.2.0
func (bps *BlockProcessorStub) CreateNewHeader(round uint64, nonce uint64) data.HeaderHandler
CreateNewHeader creates a new header
func (*BlockProcessorStub) DecodeBlockBody ¶ added in v1.2.0
func (bps *BlockProcessorStub) DecodeBlockBody(dta []byte) data.BodyHandler
DecodeBlockBody -
func (*BlockProcessorStub) DecodeBlockHeader ¶ added in v1.2.0
func (bps *BlockProcessorStub) DecodeBlockHeader(dta []byte) data.HeaderHandler
DecodeBlockHeader -
func (*BlockProcessorStub) IsInterfaceNil ¶ added in v1.2.0
func (bps *BlockProcessorStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*BlockProcessorStub) MarshalizedDataToBroadcast ¶ added in v1.2.0
func (bps *BlockProcessorStub) MarshalizedDataToBroadcast(header data.HeaderHandler, body data.BodyHandler) (map[uint32][]byte, map[string][][]byte, error)
MarshalizedDataToBroadcast -
func (*BlockProcessorStub) ProcessBlock ¶ added in v1.2.0
func (bps *BlockProcessorStub) ProcessBlock(header data.HeaderHandler, body data.BodyHandler, haveTime func() time.Duration) error
ProcessBlock mocks pocessing a block
func (*BlockProcessorStub) PruneStateOnRollback ¶ added in v1.2.0
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 ¶ added in v1.2.0
func (bps *BlockProcessorStub) RestoreBlockIntoPools(header data.HeaderHandler, body data.BodyHandler) error
RestoreBlockIntoPools -
func (*BlockProcessorStub) RestoreLastNotarizedHrdsToGenesis ¶ added in v1.2.0
func (bps *BlockProcessorStub) RestoreLastNotarizedHrdsToGenesis()
RestoreLastNotarizedHrdsToGenesis -
func (*BlockProcessorStub) RevertAccountState ¶ added in v1.2.0
func (bps *BlockProcessorStub) RevertAccountState(header data.HeaderHandler)
RevertAccountState mocks revert of the accounts state
func (*BlockProcessorStub) RevertStateToBlock ¶ added in v1.2.0
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 ¶ added in v1.2.0
func (bps *BlockProcessorStub) SetNumProcessedObj(_ uint64)
SetNumProcessedObj -
type BlockTrackerStub ¶ added in v1.2.0
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) CheckBlockAgainstRoundHandlerCalled 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 ¶ added in v1.2.0
func (bts *BlockTrackerStub) AddCrossNotarizedHeader(shardID uint32, crossNotarizedHeader data.HeaderHandler, crossNotarizedHeaderHash []byte)
AddCrossNotarizedHeader -
func (*BlockTrackerStub) AddSelfNotarizedHeader ¶ added in v1.2.0
func (bts *BlockTrackerStub) AddSelfNotarizedHeader(shardID uint32, selfNotarizedHeader data.HeaderHandler, selfNotarizedHeaderHash []byte)
AddSelfNotarizedHeader -
func (*BlockTrackerStub) AddTrackedHeader ¶ added in v1.2.0
func (bts *BlockTrackerStub) AddTrackedHeader(header data.HeaderHandler, hash []byte)
AddTrackedHeader -
func (*BlockTrackerStub) CheckBlockAgainstFinal ¶ added in v1.2.0
func (bts *BlockTrackerStub) CheckBlockAgainstFinal(headerHandler data.HeaderHandler) error
CheckBlockAgainstFinal -
func (*BlockTrackerStub) CheckBlockAgainstRoundHandler ¶ added in v1.2.0
func (bts *BlockTrackerStub) CheckBlockAgainstRoundHandler(headerHandler data.HeaderHandler) error
CheckBlockAgainstRoundHandler -
func (*BlockTrackerStub) CheckBlockAgainstWhitelist ¶ added in v1.2.0
func (bts *BlockTrackerStub) CheckBlockAgainstWhitelist(interceptedData process.InterceptedData) bool
CheckBlockAgainstWhitelist -
func (*BlockTrackerStub) CleanupHeadersBehindNonce ¶ added in v1.2.0
func (bts *BlockTrackerStub) CleanupHeadersBehindNonce(shardID uint32, selfNotarizedNonce uint64, crossNotarizedNonce uint64)
CleanupHeadersBehindNonce -
func (*BlockTrackerStub) CleanupInvalidCrossHeaders ¶ added in v1.2.0
func (bts *BlockTrackerStub) CleanupInvalidCrossHeaders(_ uint32, _ uint64)
CleanupInvalidCrossHeaders -
func (*BlockTrackerStub) ComputeLongestChain ¶ added in v1.2.0
func (bts *BlockTrackerStub) ComputeLongestChain(shardID uint32, header data.HeaderHandler) ([]data.HeaderHandler, [][]byte)
ComputeLongestChain -
func (*BlockTrackerStub) ComputeLongestMetaChainFromLastNotarized ¶ added in v1.2.0
func (bts *BlockTrackerStub) ComputeLongestMetaChainFromLastNotarized() ([]data.HeaderHandler, [][]byte, error)
ComputeLongestMetaChainFromLastNotarized -
func (*BlockTrackerStub) ComputeLongestShardsChainsFromLastNotarized ¶ added in v1.2.0
func (bts *BlockTrackerStub) ComputeLongestShardsChainsFromLastNotarized() ([]data.HeaderHandler, [][]byte, map[uint32][]data.HeaderHandler, error)
ComputeLongestShardsChainsFromLastNotarized -
func (*BlockTrackerStub) DisplayTrackedHeaders ¶ added in v1.2.0
func (bts *BlockTrackerStub) DisplayTrackedHeaders()
DisplayTrackedHeaders -
func (*BlockTrackerStub) GetCrossNotarizedHeader ¶ added in v1.2.0
func (bts *BlockTrackerStub) GetCrossNotarizedHeader(shardID uint32, offset uint64) (data.HeaderHandler, []byte, error)
GetCrossNotarizedHeader -
func (*BlockTrackerStub) GetLastCrossNotarizedHeader ¶ added in v1.2.0
func (bts *BlockTrackerStub) GetLastCrossNotarizedHeader(shardID uint32) (data.HeaderHandler, []byte, error)
GetLastCrossNotarizedHeader -
func (*BlockTrackerStub) GetLastCrossNotarizedHeadersForAllShards ¶ added in v1.2.0
func (bts *BlockTrackerStub) GetLastCrossNotarizedHeadersForAllShards() (map[uint32]data.HeaderHandler, error)
GetLastCrossNotarizedHeadersForAllShards -
func (*BlockTrackerStub) GetLastSelfNotarizedHeader ¶ added in v1.2.0
func (bts *BlockTrackerStub) GetLastSelfNotarizedHeader(shardID uint32) (data.HeaderHandler, []byte, error)
GetLastSelfNotarizedHeader -
func (*BlockTrackerStub) GetSelfNotarizedHeader ¶ added in v1.2.0
func (bts *BlockTrackerStub) GetSelfNotarizedHeader(shardID uint32, offset uint64) (data.HeaderHandler, []byte, error)
GetSelfNotarizedHeader -
func (*BlockTrackerStub) GetTrackedHeaders ¶ added in v1.2.0
func (bts *BlockTrackerStub) GetTrackedHeaders(shardID uint32) ([]data.HeaderHandler, [][]byte)
GetTrackedHeaders -
func (*BlockTrackerStub) GetTrackedHeadersForAllShards ¶ added in v1.2.0
func (bts *BlockTrackerStub) GetTrackedHeadersForAllShards() map[uint32][]data.HeaderHandler
GetTrackedHeadersForAllShards -
func (*BlockTrackerStub) GetTrackedHeadersWithNonce ¶ added in v1.2.0
func (bts *BlockTrackerStub) GetTrackedHeadersWithNonce(shardID uint32, nonce uint64) ([]data.HeaderHandler, [][]byte)
GetTrackedHeadersWithNonce -
func (*BlockTrackerStub) IsInterfaceNil ¶ added in v1.2.0
func (bts *BlockTrackerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*BlockTrackerStub) IsShardStuck ¶ added in v1.2.0
func (bts *BlockTrackerStub) IsShardStuck(shardId uint32) bool
IsShardStuck -
func (*BlockTrackerStub) RegisterCrossNotarizedHeadersHandler ¶ added in v1.2.0
func (bts *BlockTrackerStub) RegisterCrossNotarizedHeadersHandler(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte))
RegisterCrossNotarizedHeadersHandler -
func (*BlockTrackerStub) RegisterFinalMetachainHeadersHandler ¶ added in v1.2.0
func (bts *BlockTrackerStub) RegisterFinalMetachainHeadersHandler(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte))
RegisterFinalMetachainHeadersHandler -
func (*BlockTrackerStub) RegisterSelfNotarizedFromCrossHeadersHandler ¶ added in v1.2.0
func (bts *BlockTrackerStub) RegisterSelfNotarizedFromCrossHeadersHandler(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte))
RegisterSelfNotarizedFromCrossHeadersHandler -
func (*BlockTrackerStub) RegisterSelfNotarizedHeadersHandler ¶ added in v1.2.0
func (bts *BlockTrackerStub) RegisterSelfNotarizedHeadersHandler(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte))
RegisterSelfNotarizedHeadersHandler -
func (*BlockTrackerStub) RemoveLastNotarizedHeaders ¶ added in v1.2.0
func (bts *BlockTrackerStub) RemoveLastNotarizedHeaders()
RemoveLastNotarizedHeaders -
func (*BlockTrackerStub) RestoreToGenesis ¶ added in v1.2.0
func (bts *BlockTrackerStub) RestoreToGenesis()
RestoreToGenesis -
func (*BlockTrackerStub) ShouldAddHeader ¶ added in v1.2.0
func (bts *BlockTrackerStub) ShouldAddHeader(headerHandler data.HeaderHandler) bool
ShouldAddHeader -
type BoostrapStorerStub ¶ added in v1.2.0
type BoostrapStorerStub struct { PutCalled func(round int64, bootData bootstrapStorage.BootstrapData) error GetCalled func(round int64) (bootstrapStorage.BootstrapData, error) GetHighestRoundCalled func() int64 }
BoostrapStorerStub -
func (*BoostrapStorerStub) Get ¶ added in v1.2.0
func (bsm *BoostrapStorerStub) Get(round int64) (bootstrapStorage.BootstrapData, error)
Get -
func (*BoostrapStorerStub) GetHighestRound ¶ added in v1.2.0
func (bsm *BoostrapStorerStub) GetHighestRound() int64
GetHighestRound -
func (*BoostrapStorerStub) IsInterfaceNil ¶ added in v1.2.0
func (bsm *BoostrapStorerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*BoostrapStorerStub) Put ¶ added in v1.2.0
func (bsm *BoostrapStorerStub) Put(round int64, bootData bootstrapStorage.BootstrapData) error
Put -
func (*BoostrapStorerStub) SaveLastRound ¶ added in v1.2.0
func (bsm *BoostrapStorerStub) SaveLastRound(_ int64) error
SaveLastRound -
type BootstrapStorerMock ¶ added in v1.2.0
type BootstrapStorerMock struct { PutCalled func(round int64, bootData bootstrapStorage.BootstrapData) error GetCalled func(round int64) (bootstrapStorage.BootstrapData, error) GetHighestRoundCalled func() int64 }
BootstrapStorerMock -
func (*BootstrapStorerMock) Get ¶ added in v1.2.0
func (bsm *BootstrapStorerMock) Get(round int64) (bootstrapStorage.BootstrapData, error)
Get -
func (*BootstrapStorerMock) GetHighestRound ¶ added in v1.2.0
func (bsm *BootstrapStorerMock) GetHighestRound() int64
GetHighestRound -
func (*BootstrapStorerMock) IsInterfaceNil ¶ added in v1.2.0
func (bsm *BootstrapStorerMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*BootstrapStorerMock) Put ¶ added in v1.2.0
func (bsm *BootstrapStorerMock) Put(round int64, bootData bootstrapStorage.BootstrapData) error
Put -
func (*BootstrapStorerMock) SaveLastRound ¶ added in v1.2.0
func (bsm *BootstrapStorerMock) SaveLastRound(_ int64) error
SaveLastRound -
type ChainHandlerStub ¶ added in v1.2.0
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 ¶ added in v1.2.0
func (chs *ChainHandlerStub) CreateNewHeader() data.HeaderHandler
CreateNewHeader -
func (*ChainHandlerStub) GetCurrentBlockHeader ¶ added in v1.2.0
func (chs *ChainHandlerStub) GetCurrentBlockHeader() data.HeaderHandler
GetCurrentBlockHeader -
func (*ChainHandlerStub) GetCurrentBlockHeaderHash ¶ added in v1.2.0
func (chs *ChainHandlerStub) GetCurrentBlockHeaderHash() []byte
GetCurrentBlockHeaderHash -
func (*ChainHandlerStub) GetGenesisHeader ¶ added in v1.2.0
func (chs *ChainHandlerStub) GetGenesisHeader() data.HeaderHandler
GetGenesisHeader -
func (*ChainHandlerStub) GetGenesisHeaderHash ¶ added in v1.2.0
func (chs *ChainHandlerStub) GetGenesisHeaderHash() []byte
GetGenesisHeaderHash -
func (*ChainHandlerStub) IsInterfaceNil ¶ added in v1.2.0
func (chs *ChainHandlerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ChainHandlerStub) SetCurrentBlockHeader ¶ added in v1.2.0
func (chs *ChainHandlerStub) SetCurrentBlockHeader(bh data.HeaderHandler) error
SetCurrentBlockHeader -
func (*ChainHandlerStub) SetCurrentBlockHeaderHash ¶ added in v1.2.0
func (chs *ChainHandlerStub) SetCurrentBlockHeaderHash(_ []byte)
SetCurrentBlockHeaderHash -
func (*ChainHandlerStub) SetGenesisHeader ¶ added in v1.2.0
func (chs *ChainHandlerStub) SetGenesisHeader(gb data.HeaderHandler) error
SetGenesisHeader -
func (*ChainHandlerStub) SetGenesisHeaderHash ¶ added in v1.2.0
func (chs *ChainHandlerStub) SetGenesisHeaderHash(hash []byte)
SetGenesisHeaderHash -
type ChainStorerMock ¶ added in v1.2.0
type ChainStorerMock struct { AddStorerCalled func(key dataRetriever.UnitType, s storage.Storer) GetStorerCalled func(unitType dataRetriever.UnitType) storage.Storer HasCalled func(unitType dataRetriever.UnitType, key []byte) error GetCalled func(unitType dataRetriever.UnitType, key []byte) ([]byte, error) PutCalled func(unitType dataRetriever.UnitType, key []byte, value []byte) error GetAllCalled func(unitType dataRetriever.UnitType, keys [][]byte) (map[string][]byte, error) GetAllStorersCalled func() map[dataRetriever.UnitType]storage.Storer DestroyCalled func() error CloseAllCalled func() error }
ChainStorerMock is a mock implementation of the ChainStorer interface
func (*ChainStorerMock) AddStorer ¶ added in v1.2.0
func (bc *ChainStorerMock) AddStorer(key dataRetriever.UnitType, s storage.Storer)
AddStorer will add a new storer to the chain map
func (*ChainStorerMock) CloseAll ¶ added in v1.2.0
func (bc *ChainStorerMock) CloseAll() error
CloseAll -
func (*ChainStorerMock) Destroy ¶ added in v1.2.0
func (bc *ChainStorerMock) Destroy() error
Destroy removes the underlying files/resources used by the storage service
func (*ChainStorerMock) Get ¶ added in v1.2.0
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 ¶ added in v1.2.0
func (bc *ChainStorerMock) GetAll(unitType dataRetriever.UnitType, keys [][]byte) (map[string][]byte, error)
GetAll gets all the elements with keys in the keys array, from the selected storage unit It can report an error if the provided unit type is not supported, if there is a missing key in the unit, or if the underlying implementation of the storage unit reports an error.
func (*ChainStorerMock) GetAllStorers ¶ added in v1.2.4
func (bc *ChainStorerMock) GetAllStorers() map[dataRetriever.UnitType]storage.Storer
GetAllStorers -
func (*ChainStorerMock) GetStorer ¶ added in v1.2.0
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 ¶ added in v1.2.0
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 ¶ added in v1.2.0
func (bc *ChainStorerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ChainStorerMock) Put ¶ added in v1.2.0
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.2.0
func (bc *ChainStorerMock) SetEpochForPutOperation(_ uint32)
SetEpochForPutOperation won't do anything
type ChainStorerStub ¶ added in v1.2.0
type ChainStorerStub struct { AddStorerCalled func(key dataRetriever.UnitType, s storage.Storer) GetStorerCalled func(unitType dataRetriever.UnitType) storage.Storer HasCalled func(unitType dataRetriever.UnitType, key []byte) error GetCalled func(unitType dataRetriever.UnitType, key []byte) ([]byte, error) PutCalled func(unitType dataRetriever.UnitType, key []byte, value []byte) error GetAllCalled func(unitType dataRetriever.UnitType, keys [][]byte) (map[string][]byte, error) GetAllStorersCalled func() map[dataRetriever.UnitType]storage.Storer DestroyCalled func() error CloseAllCalled func() error }
ChainStorerStub is a mock implementation of the ChainStorer interface
func (*ChainStorerStub) AddStorer ¶ added in v1.2.0
func (bc *ChainStorerStub) AddStorer(key dataRetriever.UnitType, s storage.Storer)
AddStorer will add a new storer to the chain map
func (*ChainStorerStub) CloseAll ¶ added in v1.2.0
func (bc *ChainStorerStub) CloseAll() error
CloseAll -
func (*ChainStorerStub) Destroy ¶ added in v1.2.0
func (bc *ChainStorerStub) Destroy() error
Destroy removes the underlying files/resources used by the storage service
func (*ChainStorerStub) Get ¶ added in v1.2.0
func (bc *ChainStorerStub) 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 (*ChainStorerStub) GetAll ¶ added in v1.2.0
func (bc *ChainStorerStub) 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 (*ChainStorerStub) GetAllStorers ¶ added in v1.2.4
func (bc *ChainStorerStub) GetAllStorers() map[dataRetriever.UnitType]storage.Storer
GetAllStorers -
func (*ChainStorerStub) GetStorer ¶ added in v1.2.0
func (bc *ChainStorerStub) GetStorer(unitType dataRetriever.UnitType) storage.Storer
GetStorer returns the storer from the chain map or nil if the storer was not found
func (*ChainStorerStub) Has ¶ added in v1.2.0
func (bc *ChainStorerStub) 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 (*ChainStorerStub) IsInterfaceNil ¶ added in v1.2.0
func (bc *ChainStorerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ChainStorerStub) Put ¶ added in v1.2.0
func (bc *ChainStorerStub) 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 (*ChainStorerStub) SetEpochForPutOperation ¶ added in v1.2.0
func (bc *ChainStorerStub) SetEpochForPutOperation(_ uint32)
SetEpochForPutOperation won't do anything
type CoreComponentsMock ¶ added in v1.2.0
type CoreComponentsMock struct { IntMarsh marshal.Marshalizer TxMarsh marshal.Marshalizer VmMarsh marshal.Marshalizer Hash hashing.Hasher TxSignHasherField hashing.Hasher UInt64ByteSliceConv typeConverters.Uint64ByteSliceConverter AddrPubKeyConv core.PubkeyConverter ValPubKeyConv core.PubkeyConverter StatusHdlUtils nodeFactory.StatusHandlersUtils AppStatusHdl core.AppStatusHandler PathHdl storage.PathManagerHandler WatchdogTimer core.WatchdogTimer AlarmSch core.TimersScheduler NtpSyncTimer ntp.SyncTimer GenesisBlockTime time.Time ChainIdCalled func() string MinTransactionVersionCalled func() uint32 RoundHandlerField consensus.RoundHandler EconomicsHandler process.EconomicsDataHandler RatingsConfig process.RatingsInfoHandler RatingHandler sharding.PeerAccountListAndRatingHandler NodesConfig sharding.GenesisNodesSetupHandler Shuffler sharding.NodesShuffler EpochChangeNotifier process.EpochNotifier EpochNotifierWithConfirm factory.EpochStartNotifierWithConfirm TxVersionCheckHandler process.TxVersionCheckerHandler ChanStopProcess chan endProcess.ArgEndProcess StartTime time.Time NodeTypeProviderField core.NodeTypeProviderHandler // contains filtered or unexported fields }
CoreComponentsMock -
func (*CoreComponentsMock) AddressPubKeyConverter ¶ added in v1.2.0
func (ccm *CoreComponentsMock) AddressPubKeyConverter() core.PubkeyConverter
AddressPubKeyConverter -
func (*CoreComponentsMock) AlarmScheduler ¶ added in v1.2.0
func (ccm *CoreComponentsMock) AlarmScheduler() core.TimersScheduler
AlarmScheduler -
func (*CoreComponentsMock) ChainID ¶ added in v1.2.0
func (ccm *CoreComponentsMock) ChainID() string
ChainID -
func (*CoreComponentsMock) ChanStopNodeProcess ¶ added in v1.2.0
func (ccm *CoreComponentsMock) ChanStopNodeProcess() chan endProcess.ArgEndProcess
ChanStopNodeProcess -
func (*CoreComponentsMock) EconomicsData ¶ added in v1.2.0
func (ccm *CoreComponentsMock) EconomicsData() process.EconomicsDataHandler
EconomicsData -
func (*CoreComponentsMock) EncodedAddressLen ¶ added in v1.2.0
func (ccm *CoreComponentsMock) EncodedAddressLen() uint32
EncodedAddressLen -
func (*CoreComponentsMock) EpochNotifier ¶ added in v1.2.0
func (ccm *CoreComponentsMock) EpochNotifier() process.EpochNotifier
EpochNotifier -
func (*CoreComponentsMock) EpochStartNotifierWithConfirm ¶ added in v1.2.0
func (ccm *CoreComponentsMock) EpochStartNotifierWithConfirm() factory.EpochStartNotifierWithConfirm
EpochStartNotifierWithConfirm -
func (*CoreComponentsMock) GenesisNodesSetup ¶ added in v1.2.0
func (ccm *CoreComponentsMock) GenesisNodesSetup() sharding.GenesisNodesSetupHandler
GenesisNodesSetup -
func (*CoreComponentsMock) GenesisTime ¶ added in v1.2.0
func (ccm *CoreComponentsMock) GenesisTime() time.Time
GenesisTime -
func (*CoreComponentsMock) Hasher ¶ added in v1.2.0
func (ccm *CoreComponentsMock) Hasher() hashing.Hasher
Hasher -
func (*CoreComponentsMock) InternalMarshalizer ¶ added in v1.2.0
func (ccm *CoreComponentsMock) InternalMarshalizer() marshal.Marshalizer
InternalMarshalizer -
func (*CoreComponentsMock) IsInterfaceNil ¶ added in v1.2.0
func (ccm *CoreComponentsMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*CoreComponentsMock) MinTransactionVersion ¶ added in v1.2.0
func (ccm *CoreComponentsMock) MinTransactionVersion() uint32
MinTransactionVersion -
func (*CoreComponentsMock) NodeTypeProvider ¶ added in v1.2.4
func (ccm *CoreComponentsMock) NodeTypeProvider() core.NodeTypeProviderHandler
NodeTypeProvider -
func (*CoreComponentsMock) NodesShuffler ¶ added in v1.2.0
func (ccm *CoreComponentsMock) NodesShuffler() sharding.NodesShuffler
NodesShuffler -
func (*CoreComponentsMock) PathHandler ¶ added in v1.2.0
func (ccm *CoreComponentsMock) PathHandler() storage.PathManagerHandler
PathHandler -
func (*CoreComponentsMock) Rater ¶ added in v1.2.0
func (ccm *CoreComponentsMock) Rater() sharding.PeerAccountListAndRatingHandler
Rater -
func (*CoreComponentsMock) RatingsData ¶ added in v1.2.0
func (ccm *CoreComponentsMock) RatingsData() process.RatingsInfoHandler
RatingsData -
func (*CoreComponentsMock) RoundHandler ¶ added in v1.2.0
func (ccm *CoreComponentsMock) RoundHandler() consensus.RoundHandler
RoundHandler -
func (*CoreComponentsMock) SetInternalMarshalizer ¶ added in v1.2.0
func (ccm *CoreComponentsMock) SetInternalMarshalizer(m marshal.Marshalizer) error
SetInternalMarshalizer -
func (*CoreComponentsMock) StatusHandler ¶ added in v1.2.0
func (ccm *CoreComponentsMock) StatusHandler() core.AppStatusHandler
StatusHandler -
func (*CoreComponentsMock) StatusHandlerUtils ¶ added in v1.2.0
func (ccm *CoreComponentsMock) StatusHandlerUtils() nodeFactory.StatusHandlersUtils
StatusHandlerUtils -
func (*CoreComponentsMock) SyncTimer ¶ added in v1.2.0
func (ccm *CoreComponentsMock) SyncTimer() ntp.SyncTimer
SyncTimer -
func (*CoreComponentsMock) TxMarshalizer ¶ added in v1.2.0
func (ccm *CoreComponentsMock) TxMarshalizer() marshal.Marshalizer
TxMarshalizer -
func (*CoreComponentsMock) TxSignHasher ¶ added in v1.2.0
func (ccm *CoreComponentsMock) TxSignHasher() hashing.Hasher
TxSignHasher -
func (*CoreComponentsMock) TxVersionChecker ¶ added in v1.2.0
func (ccm *CoreComponentsMock) TxVersionChecker() process.TxVersionCheckerHandler
TxVersionChecker -
func (*CoreComponentsMock) Uint64ByteSliceConverter ¶ added in v1.2.0
func (ccm *CoreComponentsMock) Uint64ByteSliceConverter() typeConverters.Uint64ByteSliceConverter
Uint64ByteSliceConverter -
func (*CoreComponentsMock) ValidatorPubKeyConverter ¶ added in v1.2.0
func (ccm *CoreComponentsMock) ValidatorPubKeyConverter() core.PubkeyConverter
ValidatorPubKeyConverter -
func (*CoreComponentsMock) VmMarshalizer ¶ added in v1.2.0
func (ccm *CoreComponentsMock) VmMarshalizer() marshal.Marshalizer
VmMarshalizer -
func (*CoreComponentsMock) Watchdog ¶ added in v1.2.0
func (ccm *CoreComponentsMock) Watchdog() core.WatchdogTimer
Watchdog -
type CryptoComponentsMock ¶ added in v1.2.0
type CryptoComponentsMock struct { PubKey crypto.PublicKey PrivKey crypto.PrivateKey PubKeyString string PrivKeyBytes []byte PubKeyBytes []byte BlockSig crypto.SingleSigner TxSig crypto.SingleSigner MultiSig crypto.MultiSigner PeerSignHandler crypto.PeerSignatureHandler BlKeyGen crypto.KeyGenerator TxKeyGen crypto.KeyGenerator MsgSigVerifier vm.MessageSignVerifier // contains filtered or unexported fields }
CryptoComponentsMock -
func (*CryptoComponentsMock) BlockSignKeyGen ¶ added in v1.2.0
func (ccm *CryptoComponentsMock) BlockSignKeyGen() crypto.KeyGenerator
BlockSignKeyGen -
func (*CryptoComponentsMock) BlockSigner ¶ added in v1.2.0
func (ccm *CryptoComponentsMock) BlockSigner() crypto.SingleSigner
BlockSigner -
func (*CryptoComponentsMock) Clone ¶ added in v1.2.0
func (ccm *CryptoComponentsMock) Clone() interface{}
Clone -
func (*CryptoComponentsMock) IsInterfaceNil ¶ added in v1.2.0
func (ccm *CryptoComponentsMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*CryptoComponentsMock) MessageSignVerifier ¶ added in v1.2.0
func (ccm *CryptoComponentsMock) MessageSignVerifier() vm.MessageSignVerifier
MessageSignVerifier -
func (*CryptoComponentsMock) MultiSigner ¶ added in v1.2.0
func (ccm *CryptoComponentsMock) MultiSigner() crypto.MultiSigner
MultiSigner -
func (*CryptoComponentsMock) PeerSignatureHandler ¶ added in v1.2.0
func (ccm *CryptoComponentsMock) PeerSignatureHandler() crypto.PeerSignatureHandler
PeerSignatureHandler -
func (*CryptoComponentsMock) PrivateKey ¶ added in v1.2.0
func (ccm *CryptoComponentsMock) PrivateKey() crypto.PrivateKey
PrivateKey -
func (*CryptoComponentsMock) PrivateKeyBytes ¶ added in v1.2.0
func (ccm *CryptoComponentsMock) PrivateKeyBytes() []byte
PrivateKeyBytes -
func (*CryptoComponentsMock) PublicKey ¶ added in v1.2.0
func (ccm *CryptoComponentsMock) PublicKey() crypto.PublicKey
PublicKey -
func (*CryptoComponentsMock) PublicKeyBytes ¶ added in v1.2.0
func (ccm *CryptoComponentsMock) PublicKeyBytes() []byte
PublicKeyBytes -
func (*CryptoComponentsMock) PublicKeyString ¶ added in v1.2.0
func (ccm *CryptoComponentsMock) PublicKeyString() string
PublicKeyString -
func (*CryptoComponentsMock) SetMultiSigner ¶ added in v1.2.0
func (ccm *CryptoComponentsMock) SetMultiSigner(ms crypto.MultiSigner) error
SetMultiSigner -
func (*CryptoComponentsMock) TxSignKeyGen ¶ added in v1.2.0
func (ccm *CryptoComponentsMock) TxSignKeyGen() crypto.KeyGenerator
TxSignKeyGen -
func (*CryptoComponentsMock) TxSingleSigner ¶ added in v1.2.0
func (ccm *CryptoComponentsMock) TxSingleSigner() crypto.SingleSigner
TxSingleSigner -
type DataComponentsMock ¶ added in v1.2.0
type DataComponentsMock struct { Storage dataRetriever.StorageService Blkc data.ChainHandler DataPool dataRetriever.PoolsHolder MiniBlockProvider factory.MiniBlockProvider EconomicsData factory.EconomicsHandler }
DataComponentsMock -
func (*DataComponentsMock) Blockchain ¶ added in v1.2.0
func (dcm *DataComponentsMock) Blockchain() data.ChainHandler
Blockchain -
func (*DataComponentsMock) Clone ¶ added in v1.2.0
func (dcm *DataComponentsMock) Clone() interface{}
Clone -
func (*DataComponentsMock) Datapool ¶ added in v1.2.0
func (dcm *DataComponentsMock) Datapool() dataRetriever.PoolsHolder
Datapool -
func (*DataComponentsMock) EconomicsHandler ¶ added in v1.2.0
func (dcm *DataComponentsMock) EconomicsHandler() factory.EconomicsHandler
EconomicsHandler -
func (*DataComponentsMock) IsInterfaceNil ¶ added in v1.2.0
func (dcm *DataComponentsMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*DataComponentsMock) MiniBlocksProvider ¶ added in v1.2.0
func (dcm *DataComponentsMock) MiniBlocksProvider() factory.MiniBlockProvider
MiniBlocksProvider -
func (*DataComponentsMock) SetBlockchain ¶ added in v1.2.0
func (dcm *DataComponentsMock) SetBlockchain(chain data.ChainHandler)
SetBlockchain -
func (*DataComponentsMock) StorageService ¶ added in v1.2.0
func (dcm *DataComponentsMock) StorageService() dataRetriever.StorageService
StorageService -
type EpochNotifierStub ¶ added in v1.2.0
type EpochNotifierStub struct { NewEpochCalled func(epoch uint32, timestamp uint64) RegisterHandlerCalled func(handler epochStart.ActionHandler) CheckEpochCalled func(header data.HeaderHandler) CurrentEpochCalled func() uint32 RegisterNotifyHandlerCalled func(handler vmcommon.EpochSubscriberHandler) }
EpochNotifierStub -
func (*EpochNotifierStub) CheckEpoch ¶ added in v1.2.0
func (ens *EpochNotifierStub) CheckEpoch(header data.HeaderHandler)
CheckEpoch -
func (*EpochNotifierStub) CurrentEpoch ¶ added in v1.2.0
func (ens *EpochNotifierStub) CurrentEpoch() uint32
CurrentEpoch -
func (*EpochNotifierStub) IsInterfaceNil ¶ added in v1.2.0
func (ens *EpochNotifierStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*EpochNotifierStub) NewEpoch ¶ added in v1.2.0
func (ens *EpochNotifierStub) NewEpoch(epoch uint32, timestamp uint64)
NewEpoch -
func (*EpochNotifierStub) RegisterHandler ¶ added in v1.2.0
func (ens *EpochNotifierStub) RegisterHandler(handler epochStart.ActionHandler)
RegisterHandler -
func (*EpochNotifierStub) RegisterNotifyHandler ¶ added in v1.2.0
func (ens *EpochNotifierStub) RegisterNotifyHandler(handler vmcommon.EpochSubscriberHandler)
RegisterNotifyHandler -
type EpochStartNotifierStub ¶
type EpochStartNotifierStub struct { RegisterHandlerCalled func(handler epochStart.ActionHandler) UnregisterHandlerCalled func(handler epochStart.ActionHandler) NotifyAllPrepareCalled func(hdr data.HeaderHandler, body data.BodyHandler) NotifyAllCalled func(hdr data.HeaderHandler) NotifyEpochChangeConfirmedCalled func(epoch uint32) }
EpochStartNotifierStub -
func (*EpochStartNotifierStub) IsInterfaceNil ¶
func (esnm *EpochStartNotifierStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*EpochStartNotifierStub) NotifyAll ¶
func (esnm *EpochStartNotifierStub) NotifyAll(hdr data.HeaderHandler)
NotifyAll -
func (*EpochStartNotifierStub) NotifyAllPrepare ¶
func (esnm *EpochStartNotifierStub) NotifyAllPrepare(metaHdr data.HeaderHandler, body data.BodyHandler)
NotifyAllPrepare -
func (*EpochStartNotifierStub) NotifyEpochChangeConfirmed ¶ added in v1.2.0
func (esnm *EpochStartNotifierStub) NotifyEpochChangeConfirmed(epoch uint32)
NotifyEpochChangeConfirmed -
func (*EpochStartNotifierStub) RegisterHandler ¶
func (esnm *EpochStartNotifierStub) RegisterHandler(handler epochStart.ActionHandler)
RegisterHandler -
func (*EpochStartNotifierStub) UnregisterHandler ¶
func (esnm *EpochStartNotifierStub) UnregisterHandler(handler epochStart.ActionHandler)
UnregisterHandler -
type EpochStartTriggerStub ¶ added in v1.2.0
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.2.0
func (e *EpochStartTriggerStub) Close() error
Close -
func (*EpochStartTriggerStub) Epoch ¶ added in v1.2.0
func (e *EpochStartTriggerStub) Epoch() uint32
Epoch -
func (*EpochStartTriggerStub) EpochFinalityAttestingRound ¶ added in v1.2.0
func (e *EpochStartTriggerStub) EpochFinalityAttestingRound() uint64
EpochFinalityAttestingRound -
func (*EpochStartTriggerStub) EpochStartMetaHdrHash ¶ added in v1.2.0
func (e *EpochStartTriggerStub) EpochStartMetaHdrHash() []byte
EpochStartMetaHdrHash -
func (*EpochStartTriggerStub) EpochStartRound ¶ added in v1.2.0
func (e *EpochStartTriggerStub) EpochStartRound() uint64
EpochStartRound -
func (*EpochStartTriggerStub) ForceEpochStart ¶ added in v1.2.0
func (e *EpochStartTriggerStub) ForceEpochStart(round uint64)
ForceEpochStart -
func (*EpochStartTriggerStub) GetRoundsPerEpoch ¶ added in v1.2.0
func (e *EpochStartTriggerStub) GetRoundsPerEpoch() uint64
GetRoundsPerEpoch -
func (*EpochStartTriggerStub) GetSavedStateKey ¶ added in v1.2.0
func (e *EpochStartTriggerStub) GetSavedStateKey() []byte
GetSavedStateKey -
func (*EpochStartTriggerStub) IsEpochStart ¶ added in v1.2.0
func (e *EpochStartTriggerStub) IsEpochStart() bool
IsEpochStart -
func (*EpochStartTriggerStub) IsInterfaceNil ¶ added in v1.2.0
func (e *EpochStartTriggerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*EpochStartTriggerStub) LoadState ¶ added in v1.2.0
func (e *EpochStartTriggerStub) LoadState(_ []byte) error
LoadState -
func (*EpochStartTriggerStub) MetaEpoch ¶ added in v1.2.0
func (e *EpochStartTriggerStub) MetaEpoch() uint32
MetaEpoch -
func (*EpochStartTriggerStub) NotifyAll ¶ added in v1.2.0
func (e *EpochStartTriggerStub) NotifyAll(_ data.HeaderHandler)
NotifyAll -
func (*EpochStartTriggerStub) ReceivedHeader ¶ added in v1.2.0
func (e *EpochStartTriggerStub) ReceivedHeader(header data.HeaderHandler)
ReceivedHeader -
func (*EpochStartTriggerStub) RequestEpochStartIfNeeded ¶ added in v1.2.0
func (e *EpochStartTriggerStub) RequestEpochStartIfNeeded(_ data.HeaderHandler)
RequestEpochStartIfNeeded -
func (*EpochStartTriggerStub) Revert ¶ added in v1.2.0
func (e *EpochStartTriggerStub) Revert(_ data.HeaderHandler)
Revert -
func (*EpochStartTriggerStub) RevertStateToBlock ¶ added in v1.2.0
func (e *EpochStartTriggerStub) RevertStateToBlock(_ data.HeaderHandler) error
RevertStateToBlock -
func (*EpochStartTriggerStub) SetAppStatusHandler ¶ added in v1.2.0
func (e *EpochStartTriggerStub) SetAppStatusHandler(_ core.AppStatusHandler) error
SetAppStatusHandler -
func (*EpochStartTriggerStub) SetCurrentEpochStartRound ¶ added in v1.2.0
func (e *EpochStartTriggerStub) SetCurrentEpochStartRound(_ uint64)
SetCurrentEpochStartRound -
func (*EpochStartTriggerStub) SetEpoch ¶ added in v1.2.0
func (e *EpochStartTriggerStub) SetEpoch(_ uint32)
SetEpoch -
func (*EpochStartTriggerStub) SetFinalityAttestingRound ¶ added in v1.2.0
func (e *EpochStartTriggerStub) SetFinalityAttestingRound(_ uint64)
SetFinalityAttestingRound -
func (*EpochStartTriggerStub) SetProcessed ¶ added in v1.2.0
func (e *EpochStartTriggerStub) SetProcessed(header data.HeaderHandler, _ data.BodyHandler)
SetProcessed -
func (*EpochStartTriggerStub) SetRoundsPerEpoch ¶ added in v1.2.0
func (e *EpochStartTriggerStub) SetRoundsPerEpoch(_ uint64)
SetRoundsPerEpoch -
func (*EpochStartTriggerStub) SetTrigger ¶ added in v1.2.0
func (e *EpochStartTriggerStub) SetTrigger(_ epochStart.TriggerHandler)
SetTrigger -
func (*EpochStartTriggerStub) Update ¶ added in v1.2.0
func (e *EpochStartTriggerStub) Update(round uint64, nonce uint64)
Update -
type ForkDetectorMock ¶ added in v1.2.0
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 ¶ added in v1.2.0
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 ¶ added in v1.2.0
func (fdm *ForkDetectorMock) CheckFork() *process.ForkInfo
CheckFork is a mock implementation for CheckFork
func (*ForkDetectorMock) GetHighestFinalBlockHash ¶ added in v1.2.0
func (fdm *ForkDetectorMock) GetHighestFinalBlockHash() []byte
GetHighestFinalBlockHash -
func (*ForkDetectorMock) GetHighestFinalBlockNonce ¶ added in v1.2.0
func (fdm *ForkDetectorMock) GetHighestFinalBlockNonce() uint64
GetHighestFinalBlockNonce is a mock implementation for GetHighestFinalBlockNonce
func (*ForkDetectorMock) GetNotarizedHeaderHash ¶ added in v1.2.0
func (fdm *ForkDetectorMock) GetNotarizedHeaderHash(nonce uint64) []byte
GetNotarizedHeaderHash -
func (*ForkDetectorMock) IsInterfaceNil ¶ added in v1.2.0
func (fdm *ForkDetectorMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ForkDetectorMock) ProbableHighestNonce ¶ added in v1.2.0
func (fdm *ForkDetectorMock) ProbableHighestNonce() uint64
ProbableHighestNonce is a mock implementation for GetProbableHighestNonce
func (*ForkDetectorMock) RemoveHeader ¶ added in v1.2.0
func (fdm *ForkDetectorMock) RemoveHeader(nonce uint64, hash []byte)
RemoveHeader is a mock implementation for RemoveHeader
func (*ForkDetectorMock) ResetFork ¶ added in v1.2.0
func (fdm *ForkDetectorMock) ResetFork()
ResetFork -
func (*ForkDetectorMock) ResetProbableHighestNonce ¶ added in v1.2.0
func (fdm *ForkDetectorMock) ResetProbableHighestNonce()
ResetProbableHighestNonce -
func (*ForkDetectorMock) RestoreToGenesis ¶ added in v1.2.0
func (fdm *ForkDetectorMock) RestoreToGenesis()
RestoreToGenesis -
func (*ForkDetectorMock) SetFinalToLastCheckpoint ¶ added in v1.2.0
func (fdm *ForkDetectorMock) SetFinalToLastCheckpoint()
SetFinalToLastCheckpoint -
func (*ForkDetectorMock) SetRollBackNonce ¶ added in v1.2.0
func (fdm *ForkDetectorMock) SetRollBackNonce(nonce uint64)
SetRollBackNonce -
type ForkDetectorStub ¶ added in v1.2.0
type ForkDetectorStub struct { AddHeaderCalled func(header data.HeaderHandler, hash []byte, state process.BlockHeaderState, selfNotarizedHeaders []data.HeaderHandler, selfNotarizedHeadersHashes [][]byte) error RemoveHeaderCalled func(nonce uint64, hash []byte) CheckForkCalled func() *process.ForkInfo GetHighestFinalBlockNonceCalled func() uint64 GetHighestFinalBlockHashCalled func() []byte ProbableHighestNonceCalled func() uint64 ResetForkCalled func() GetNotarizedHeaderHashCalled func(nonce uint64) []byte SetRollBackNonceCalled func(nonce uint64) RestoreToGenesisCalled func() ResetProbableHighestNonceCalled func() SetFinalToLastCheckpointCalled func() }
ForkDetectorStub -
func (*ForkDetectorStub) AddHeader ¶ added in v1.2.0
func (fdm *ForkDetectorStub) AddHeader(header data.HeaderHandler, hash []byte, state process.BlockHeaderState, selfNotarizedHeaders []data.HeaderHandler, selfNotarizedHeadersHashes [][]byte) error
AddHeader -
func (*ForkDetectorStub) CheckFork ¶ added in v1.2.0
func (fdm *ForkDetectorStub) CheckFork() *process.ForkInfo
CheckFork -
func (*ForkDetectorStub) GetHighestFinalBlockHash ¶ added in v1.2.0
func (fdm *ForkDetectorStub) GetHighestFinalBlockHash() []byte
GetHighestFinalBlockHash -
func (*ForkDetectorStub) GetHighestFinalBlockNonce ¶ added in v1.2.0
func (fdm *ForkDetectorStub) GetHighestFinalBlockNonce() uint64
GetHighestFinalBlockNonce -
func (*ForkDetectorStub) GetNotarizedHeaderHash ¶ added in v1.2.0
func (fdm *ForkDetectorStub) GetNotarizedHeaderHash(nonce uint64) []byte
GetNotarizedHeaderHash -
func (*ForkDetectorStub) IsInterfaceNil ¶ added in v1.2.0
func (fdm *ForkDetectorStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ForkDetectorStub) ProbableHighestNonce ¶ added in v1.2.0
func (fdm *ForkDetectorStub) ProbableHighestNonce() uint64
ProbableHighestNonce -
func (*ForkDetectorStub) RemoveHeader ¶ added in v1.2.0
func (fdm *ForkDetectorStub) RemoveHeader(nonce uint64, hash []byte)
RemoveHeader -
func (*ForkDetectorStub) ResetFork ¶ added in v1.2.0
func (fdm *ForkDetectorStub) ResetFork()
ResetFork -
func (*ForkDetectorStub) ResetProbableHighestNonce ¶ added in v1.2.0
func (fdm *ForkDetectorStub) ResetProbableHighestNonce()
ResetProbableHighestNonce -
func (*ForkDetectorStub) RestoreToGenesis ¶ added in v1.2.0
func (fdm *ForkDetectorStub) RestoreToGenesis()
RestoreToGenesis -
func (*ForkDetectorStub) SetFinalToLastCheckpoint ¶ added in v1.2.0
func (fdm *ForkDetectorStub) SetFinalToLastCheckpoint()
SetFinalToLastCheckpoint -
func (*ForkDetectorStub) SetRollBackNonce ¶ added in v1.2.0
func (fdm *ForkDetectorStub) SetRollBackNonce(nonce uint64)
SetRollBackNonce -
type GasScheduleNotifierMock ¶ added in v1.2.0
GasScheduleNotifierMock -
func NewGasScheduleNotifierMock ¶ added in v1.2.0
func NewGasScheduleNotifierMock(gasSchedule map[string]map[string]uint64) *GasScheduleNotifierMock
NewGasScheduleNotifierMock -
func (*GasScheduleNotifierMock) IsInterfaceNil ¶ added in v1.2.0
func (g *GasScheduleNotifierMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*GasScheduleNotifierMock) LatestGasSchedule ¶ added in v1.2.0
func (g *GasScheduleNotifierMock) LatestGasSchedule() map[string]map[string]uint64
LatestGasSchedule -
func (*GasScheduleNotifierMock) RegisterNotifyHandler ¶ added in v1.2.0
func (g *GasScheduleNotifierMock) RegisterNotifyHandler(handler core.GasScheduleSubscribeHandler)
RegisterNotifyHandler -
func (*GasScheduleNotifierMock) UnRegisterAll ¶ added in v1.2.0
func (g *GasScheduleNotifierMock) UnRegisterAll()
UnRegisterAll -
type HardforkTriggerStub ¶ added in v1.2.0
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.2.0
func (hts *HardforkTriggerStub) AddCloser(closer update.Closer) error
AddCloser -
func (*HardforkTriggerStub) CreateData ¶ added in v1.2.0
func (hts *HardforkTriggerStub) CreateData() []byte
CreateData -
func (*HardforkTriggerStub) IsInterfaceNil ¶ added in v1.2.0
func (hts *HardforkTriggerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*HardforkTriggerStub) IsSelfTrigger ¶ added in v1.2.0
func (hts *HardforkTriggerStub) IsSelfTrigger() bool
IsSelfTrigger -
func (*HardforkTriggerStub) NotifyTriggerReceived ¶ added in v1.2.0
func (hts *HardforkTriggerStub) NotifyTriggerReceived() <-chan struct{}
NotifyTriggerReceived -
func (*HardforkTriggerStub) RecordedTriggerMessage ¶ added in v1.2.0
func (hts *HardforkTriggerStub) RecordedTriggerMessage() ([]byte, bool)
RecordedTriggerMessage -
func (*HardforkTriggerStub) Trigger ¶ added in v1.2.0
func (hts *HardforkTriggerStub) Trigger(epoch uint32, withEarlyEndOfEpoch bool) error
Trigger -
func (*HardforkTriggerStub) TriggerReceived ¶ added in v1.2.0
func (hts *HardforkTriggerStub) TriggerReceived(payload []byte, data []byte, pkBytes []byte) (bool, error)
TriggerReceived -
type HasherMock ¶
type HasherMock struct { }
HasherMock that will be used for testing
func (HasherMock) Compute ¶
func (sha HasherMock) Compute(s string) []byte
Compute will output the SHA's equivalent of the input string
func (HasherMock) EmptyHash ¶
func (sha HasherMock) EmptyHash() []byte
EmptyHash will return the equivalent of empty string SHA's
func (HasherMock) IsInterfaceNil ¶
func (sha HasherMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type HeaderIntegrityVerifierStub ¶ added in v1.2.0
type HeaderIntegrityVerifierStub struct { VerifyCalled func(header data.HeaderHandler) error GetVersionCalled func(epoch uint32) string }
HeaderIntegrityVerifierStub -
func (*HeaderIntegrityVerifierStub) GetVersion ¶ added in v1.2.0
func (h *HeaderIntegrityVerifierStub) GetVersion(epoch uint32) string
GetVersion -
func (*HeaderIntegrityVerifierStub) IsInterfaceNil ¶ added in v1.2.0
func (h *HeaderIntegrityVerifierStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*HeaderIntegrityVerifierStub) Verify ¶ added in v1.2.0
func (h *HeaderIntegrityVerifierStub) Verify(header data.HeaderHandler) error
Verify -
type HeaderResolverStub ¶ added in v1.2.0
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 ¶ added in v1.2.0
func (hrs *HeaderResolverStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*HeaderResolverStub) NumPeersToQuery ¶ added in v1.2.0
func (hrs *HeaderResolverStub) NumPeersToQuery() (int, int)
NumPeersToQuery -
func (*HeaderResolverStub) ProcessReceivedMessage ¶ added in v1.2.0
func (hrs *HeaderResolverStub) ProcessReceivedMessage(message p2p.MessageP2P, _ core.PeerID) error
ProcessReceivedMessage -
func (*HeaderResolverStub) RequestDataFromEpoch ¶ added in v1.2.0
func (hrs *HeaderResolverStub) RequestDataFromEpoch(identifier []byte) error
RequestDataFromEpoch -
func (*HeaderResolverStub) RequestDataFromHash ¶ added in v1.2.0
func (hrs *HeaderResolverStub) RequestDataFromHash(hash []byte, epoch uint32) error
RequestDataFromHash -
func (*HeaderResolverStub) RequestDataFromNonce ¶ added in v1.2.0
func (hrs *HeaderResolverStub) RequestDataFromNonce(nonce uint64, epoch uint32) error
RequestDataFromNonce -
func (*HeaderResolverStub) SetEpochHandler ¶ added in v1.2.0
func (hrs *HeaderResolverStub) SetEpochHandler(epochHandler dataRetriever.EpochHandler) error
SetEpochHandler -
func (*HeaderResolverStub) SetNumPeersToQuery ¶ added in v1.2.0
func (hrs *HeaderResolverStub) SetNumPeersToQuery(intra int, cross int)
SetNumPeersToQuery -
func (*HeaderResolverStub) SetResolverDebugHandler ¶ added in v1.2.0
func (hrs *HeaderResolverStub) SetResolverDebugHandler(handler dataRetriever.ResolverDebugHandler) error
SetResolverDebugHandler -
type HeaderSigVerifierStub ¶ added in v1.2.0
type HeaderSigVerifierStub struct { VerifyRandSeedAndLeaderSignatureCalled func(header data.HeaderHandler) error VerifyRandSeedCalled func(header data.HeaderHandler) error VerifyLeaderSignatureCalled func(header data.HeaderHandler) error VerifySignatureCalled func(header data.HeaderHandler) error }
HeaderSigVerifierStub -
func (*HeaderSigVerifierStub) IsInterfaceNil ¶ added in v1.2.0
func (hsvm *HeaderSigVerifierStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*HeaderSigVerifierStub) VerifyLeaderSignature ¶ added in v1.2.0
func (hsvm *HeaderSigVerifierStub) VerifyLeaderSignature(header data.HeaderHandler) error
VerifyLeaderSignature -
func (*HeaderSigVerifierStub) VerifyRandSeed ¶ added in v1.2.0
func (hsvm *HeaderSigVerifierStub) VerifyRandSeed(header data.HeaderHandler) error
VerifyRandSeed -
func (*HeaderSigVerifierStub) VerifyRandSeedAndLeaderSignature ¶ added in v1.2.0
func (hsvm *HeaderSigVerifierStub) VerifyRandSeedAndLeaderSignature(header data.HeaderHandler) error
VerifyRandSeedAndLeaderSignature -
func (*HeaderSigVerifierStub) VerifySignature ¶ added in v1.2.0
func (hsvm *HeaderSigVerifierStub) VerifySignature(header data.HeaderHandler) error
VerifySignature -
type HeaderValidatorStub ¶ added in v1.2.0
type HeaderValidatorStub struct {
IsHeaderConstructionValidCalled func(currHdr, prevHdr data.HeaderHandler) error
}
HeaderValidatorStub -
func (*HeaderValidatorStub) IsHeaderConstructionValid ¶ added in v1.2.0
func (hvs *HeaderValidatorStub) IsHeaderConstructionValid(currHdr, prevHdr data.HeaderHandler) error
IsHeaderConstructionValid -
func (*HeaderValidatorStub) IsInterfaceNil ¶ added in v1.2.0
func (hvs *HeaderValidatorStub) IsInterfaceNil() bool
IsInterfaceNil returns if underlying object is true
type IndexerStub ¶ added in v1.2.0
type IndexerStub struct {
SaveBlockCalled func(args *indexer.ArgsSaveBlockData)
}
IndexerStub is a mock implementation fot the Indexer interface
func (*IndexerStub) Close ¶ added in v1.2.0
func (im *IndexerStub) Close() error
Close will do nothing
func (*IndexerStub) IsInterfaceNil ¶ added in v1.2.0
func (im *IndexerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*IndexerStub) IsNilIndexer ¶ added in v1.2.0
func (im *IndexerStub) IsNilIndexer() bool
IsNilIndexer -
func (*IndexerStub) RevertIndexedBlock ¶ added in v1.2.0
func (im *IndexerStub) RevertIndexedBlock(_ data.HeaderHandler, _ data.BodyHandler)
RevertIndexedBlock -
func (*IndexerStub) SaveAccounts ¶ added in v1.2.0
func (im *IndexerStub) SaveAccounts(_ uint64, _ []state.UserAccountHandler)
SaveAccounts -
func (*IndexerStub) SaveBlock ¶ added in v1.2.0
func (im *IndexerStub) SaveBlock(args *indexer.ArgsSaveBlockData)
SaveBlock -
func (*IndexerStub) SaveRoundsInfo ¶ added in v1.2.0
func (im *IndexerStub) SaveRoundsInfo(_ []*indexer.RoundInfo)
SaveRoundsInfo -
func (*IndexerStub) SaveValidatorsPubKeys ¶ added in v1.2.0
func (im *IndexerStub) SaveValidatorsPubKeys(_ map[uint32][][]byte, _ uint32)
SaveValidatorsPubKeys -
func (*IndexerStub) SaveValidatorsRating ¶ added in v1.2.0
func (im *IndexerStub) SaveValidatorsRating(_ string, _ []*indexer.ValidatorRatingInfo)
SaveValidatorsRating -
func (*IndexerStub) SetTxLogsProcessor ¶ added in v1.2.0
func (im *IndexerStub) SetTxLogsProcessor(_ process.TransactionLogProcessorDatabase)
SetTxLogsProcessor will do nothing
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 KeyLoaderStub ¶ added in v1.2.0
type KeyLoaderStub struct {
LoadKeyCalled func(relativePath string, skIndex int) ([]byte, string, error)
}
KeyLoaderStub -
type ManualEpochStartNotifierStub ¶ added in v1.2.0
type ManualEpochStartNotifierStub struct { NewEpochCalled func(epoch uint32) CurrentEpochCalled func() uint32 RegisterHandlerCalled func(handler epochStart.ActionHandler) }
ManualEpochStartNotifierStub -
func (*ManualEpochStartNotifierStub) CurrentEpoch ¶ added in v1.2.0
func (mesns *ManualEpochStartNotifierStub) CurrentEpoch() uint32
CurrentEpoch -
func (*ManualEpochStartNotifierStub) IsInterfaceNil ¶ added in v1.2.0
func (mesns *ManualEpochStartNotifierStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*ManualEpochStartNotifierStub) NewEpoch ¶ added in v1.2.0
func (mesns *ManualEpochStartNotifierStub) NewEpoch(epoch uint32)
NewEpoch -
func (*ManualEpochStartNotifierStub) RegisterHandler ¶ added in v1.2.0
func (mesns *ManualEpochStartNotifierStub) RegisterHandler(handler epochStart.ActionHandler)
RegisterHandler -
type MarshalizerMock ¶
type MarshalizerMock struct {
Fail bool
}
MarshalizerMock that will be used for testing
func (MarshalizerMock) IsInterfaceNil ¶
func (mm MarshalizerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (MarshalizerMock) Marshal ¶
func (mm MarshalizerMock) Marshal(obj interface{}) ([]byte, error)
Marshal converts the input object in a slice of bytes
func (MarshalizerMock) Unmarshal ¶
func (mm MarshalizerMock) Unmarshal(obj interface{}, buff []byte) error
Unmarshal applies the serialized values over an instantiated object
type MemDbMock ¶ added in v1.2.0
type MemDbMock struct {
// contains filtered or unexported fields
}
MemDbMock represents the memory database storage. It holds a map of key value pairs and a mutex to handle concurrent accesses to the map
func NewMemDbMock ¶ added in v1.2.0
func NewMemDbMock() *MemDbMock
NewMemDbMock creates a new memorydb object
func (*MemDbMock) Close ¶ added in v1.2.0
Close closes the files/resources associated to the storage medium
func (*MemDbMock) DestroyClosed ¶ added in v1.2.0
DestroyClosed removes the already closed storage medium stored data
func (*MemDbMock) Get ¶ added in v1.2.0
Get gets the value associated to the key, or reports an error
func (*MemDbMock) Has ¶ added in v1.2.0
Has returns true if the given key is present in the persistence medium, false otherwise
func (*MemDbMock) Init ¶ added in v1.2.0
Init initializes the storage medium and prepares it for usage
func (*MemDbMock) IsInterfaceNil ¶ added in v1.2.0
IsInterfaceNil returns true if there is no value under the interface
type MiniBlocksProviderStub ¶ added in v1.2.0
type MiniBlocksProviderStub struct { GetMiniBlocksCalled func(hashes [][]byte) ([]*block.MiniblockAndHash, [][]byte) GetMiniBlocksFromPoolCalled func(hashes [][]byte) ([]*block.MiniblockAndHash, [][]byte) }
MiniBlocksProviderStub -
func (*MiniBlocksProviderStub) GetMiniBlocks ¶ added in v1.2.0
func (mbps *MiniBlocksProviderStub) GetMiniBlocks(hashes [][]byte) ([]*block.MiniblockAndHash, [][]byte)
GetMiniBlocks -
func (*MiniBlocksProviderStub) GetMiniBlocksFromPool ¶ added in v1.2.0
func (mbps *MiniBlocksProviderStub) GetMiniBlocksFromPool(hashes [][]byte) ([]*block.MiniblockAndHash, [][]byte)
GetMiniBlocksFromPool -
func (*MiniBlocksProviderStub) IsInterfaceNil ¶ added in v1.2.0
func (mbps *MiniBlocksProviderStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type MultipleShardsCoordinatorMock ¶
type MultipleShardsCoordinatorMock struct { NoShards uint32 CurrentShard uint32 ComputeIdCalled func(address []byte) uint32 SelfIDCalled func() uint32 }
MultipleShardsCoordinatorMock -
func NewMultiShardsCoordinatorMock ¶
func NewMultiShardsCoordinatorMock(nrShard uint32) *MultipleShardsCoordinatorMock
NewMultiShardsCoordinatorMock -
func (*MultipleShardsCoordinatorMock) CommunicationIdentifier ¶
func (scm *MultipleShardsCoordinatorMock) CommunicationIdentifier(destShardID uint32) string
CommunicationIdentifier returns the identifier between current shard ID and destination shard ID identifier is generated such as the first shard from identifier is always smaller than the last
func (*MultipleShardsCoordinatorMock) ComputeId ¶
func (scm *MultipleShardsCoordinatorMock) ComputeId(address []byte) uint32
ComputeId -
func (*MultipleShardsCoordinatorMock) IsInterfaceNil ¶
func (scm *MultipleShardsCoordinatorMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*MultipleShardsCoordinatorMock) NumberOfShards ¶
func (scm *MultipleShardsCoordinatorMock) NumberOfShards() uint32
NumberOfShards -
func (*MultipleShardsCoordinatorMock) SameShard ¶
func (scm *MultipleShardsCoordinatorMock) SameShard(_, _ []byte) bool
SameShard -
func (*MultipleShardsCoordinatorMock) SelfId ¶
func (scm *MultipleShardsCoordinatorMock) SelfId() uint32
SelfId -
func (*MultipleShardsCoordinatorMock) SetNoShards ¶
func (scm *MultipleShardsCoordinatorMock) SetNoShards(noShards uint32)
SetNoShards -
func (*MultipleShardsCoordinatorMock) SetSelfId ¶
func (scm *MultipleShardsCoordinatorMock) SetSelfId(_ uint32) error
SetSelfId -
type NetworkComponentsMock ¶ added in v1.2.0
type NetworkComponentsMock struct { Messenger p2p.Messenger InputAntiFlood factory.P2PAntifloodHandler OutputAntiFlood factory.P2PAntifloodHandler PeerBlackList process.PeerBlackListCacher PreferredPeersHolder factory.PreferredPeersHolderHandler }
NetworkComponentsMock -
func (*NetworkComponentsMock) CheckSubcomponents ¶ added in v1.2.0
func (ncm *NetworkComponentsMock) CheckSubcomponents() error
CheckSubcomponents -
func (*NetworkComponentsMock) Close ¶ added in v1.2.0
func (ncm *NetworkComponentsMock) Close() error
Close -
func (*NetworkComponentsMock) Create ¶ added in v1.2.0
func (ncm *NetworkComponentsMock) Create() error
Create -
func (*NetworkComponentsMock) InputAntiFloodHandler ¶ added in v1.2.0
func (ncm *NetworkComponentsMock) InputAntiFloodHandler() factory.P2PAntifloodHandler
InputAntiFloodHandler -
func (*NetworkComponentsMock) IsInterfaceNil ¶ added in v1.2.0
func (ncm *NetworkComponentsMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*NetworkComponentsMock) NetworkMessenger ¶ added in v1.2.0
func (ncm *NetworkComponentsMock) NetworkMessenger() p2p.Messenger
NetworkMessenger -
func (*NetworkComponentsMock) OutputAntiFloodHandler ¶ added in v1.2.0
func (ncm *NetworkComponentsMock) OutputAntiFloodHandler() factory.P2PAntifloodHandler
OutputAntiFloodHandler -
func (*NetworkComponentsMock) PeerBlackListHandler ¶ added in v1.2.0
func (ncm *NetworkComponentsMock) PeerBlackListHandler() process.PeerBlackListCacher
PeerBlackListHandler -
func (*NetworkComponentsMock) PeerHonestyHandler ¶ added in v1.2.0
func (ncm *NetworkComponentsMock) PeerHonestyHandler() factory.PeerHonestyHandler
PeerHonestyHandler -
func (*NetworkComponentsMock) PreferredPeersHolderHandler ¶ added in v1.2.3
func (ncm *NetworkComponentsMock) PreferredPeersHolderHandler() factory.PreferredPeersHolderHandler
PreferredPeersHolderHandler -
func (*NetworkComponentsMock) PubKeyCacher ¶ added in v1.2.0
func (ncm *NetworkComponentsMock) PubKeyCacher() process.TimeCacher
PubKeyCacher -
type NodeShufflerMock ¶ added in v1.2.0
type NodeShufflerMock struct { }
NodeShufflerMock -
func (*NodeShufflerMock) IsInterfaceNil ¶ added in v1.2.0
func (nsm *NodeShufflerMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*NodeShufflerMock) UpdateNodeLists ¶ added in v1.2.0
func (nsm *NodeShufflerMock) UpdateNodeLists(args sharding.ArgsUpdateNodes) (*sharding.ResUpdateNodes, error)
UpdateNodeLists -
func (*NodeShufflerMock) UpdateParams ¶ added in v1.2.0
func (nsm *NodeShufflerMock) UpdateParams( _ uint32, _ uint32, _ float32, _ bool, )
UpdateParams -
type NodesCoordinatorMock ¶ added in v1.2.0
type NodesCoordinatorMock struct { Validators map[uint32][]sharding.Validator ShardConsensusSize uint32 MetaConsensusSize uint32 ShardId uint32 NbShards uint32 GetSelectedPublicKeysCalled func(selection []byte, shardId uint32, epoch uint32) (publicKeys []string, err 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) SetNodesPerShardsCalled func(nodes map[uint32][]sharding.Validator, epoch uint32) error ComputeValidatorsGroupCalled func(randomness []byte, round uint64, shardId uint32, epoch uint32) (validatorsGroup []sharding.Validator, err error) GetValidatorWithPublicKeyCalled func(publicKey []byte) (validator sharding.Validator, shardId uint32, err error) GetAllEligibleValidatorsPublicKeysCalled func(epoch uint32) (map[uint32][][]byte, error) GetAllWaitingValidatorsPublicKeysCalled func() (map[uint32][][]byte, error) ConsensusGroupSizeCalled func(uint32) int }
NodesCoordinatorMock defines the behaviour of a struct able to do validator group selection
func (*NodesCoordinatorMock) ComputeAdditionalLeaving ¶ added in v1.2.0
func (ncm *NodesCoordinatorMock) ComputeAdditionalLeaving(_ []*state.ShardValidatorInfo) (map[uint32][]sharding.Validator, error)
ComputeAdditionalLeaving -
func (*NodesCoordinatorMock) ComputeConsensusGroup ¶ added in v1.2.0
func (ncm *NodesCoordinatorMock) ComputeConsensusGroup( randomess []byte, round uint64, shardId uint32, epoch uint32, ) ([]sharding.Validator, error)
ComputeConsensusGroup -
func (*NodesCoordinatorMock) ConsensusGroupSize ¶ added in v1.2.0
func (ncm *NodesCoordinatorMock) ConsensusGroupSize(shardId uint32) int
ConsensusGroupSize -
func (*NodesCoordinatorMock) GetAllEligibleValidatorsPublicKeys ¶ added in v1.2.0
func (ncm *NodesCoordinatorMock) GetAllEligibleValidatorsPublicKeys(epoch uint32) (map[uint32][][]byte, error)
GetAllEligibleValidatorsPublicKeys -
func (*NodesCoordinatorMock) GetAllLeavingValidatorsPublicKeys ¶ added in v1.2.0
func (ncm *NodesCoordinatorMock) GetAllLeavingValidatorsPublicKeys(_ uint32) (map[uint32][][]byte, error)
GetAllLeavingValidatorsPublicKeys -
func (*NodesCoordinatorMock) GetAllWaitingValidatorsPublicKeys ¶ added in v1.2.0
func (ncm *NodesCoordinatorMock) GetAllWaitingValidatorsPublicKeys(_ uint32) (map[uint32][][]byte, error)
GetAllWaitingValidatorsPublicKeys -
func (*NodesCoordinatorMock) GetChance ¶ added in v1.2.0
func (ncm *NodesCoordinatorMock) GetChance(uint32) uint32
GetChance -
func (*NodesCoordinatorMock) GetConsensusValidatorsPublicKeys ¶ added in v1.2.0
func (ncm *NodesCoordinatorMock) GetConsensusValidatorsPublicKeys( randomness []byte, round uint64, shardId uint32, epoch uint32, ) ([]string, error)
GetConsensusValidatorsPublicKeys -
func (*NodesCoordinatorMock) GetConsensusWhitelistedNodes ¶ added in v1.2.0
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 ¶ added in v1.2.0
func (ncm *NodesCoordinatorMock) GetNumTotalEligible() uint64
GetNumTotalEligible -
func (*NodesCoordinatorMock) GetOwnPublicKey ¶ added in v1.2.0
func (ncm *NodesCoordinatorMock) GetOwnPublicKey() []byte
GetOwnPublicKey -
func (*NodesCoordinatorMock) GetSavedStateKey ¶ added in v1.2.0
func (ncm *NodesCoordinatorMock) GetSavedStateKey() []byte
GetSavedStateKey -
func (*NodesCoordinatorMock) GetSelectedPublicKeys ¶ added in v1.2.0
func (ncm *NodesCoordinatorMock) GetSelectedPublicKeys(selection []byte, shardId uint32, epoch uint32) (publicKeys []string, err error)
GetSelectedPublicKeys -
func (*NodesCoordinatorMock) GetValidatorWithPublicKey ¶ added in v1.2.0
func (ncm *NodesCoordinatorMock) GetValidatorWithPublicKey(publicKey []byte) (sharding.Validator, uint32, error)
GetValidatorWithPublicKey -
func (*NodesCoordinatorMock) GetValidatorsIndexes ¶ added in v1.2.0
func (ncm *NodesCoordinatorMock) GetValidatorsIndexes(_ []string, _ uint32) ([]uint64, error)
GetValidatorsIndexes -
func (*NodesCoordinatorMock) IsInterfaceNil ¶ added in v1.2.0
func (ncm *NodesCoordinatorMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*NodesCoordinatorMock) LoadState ¶ added in v1.2.0
func (ncm *NodesCoordinatorMock) LoadState(_ []byte) error
LoadState -
func (*NodesCoordinatorMock) SetNodesPerShards ¶ added in v1.2.0
func (ncm *NodesCoordinatorMock) SetNodesPerShards( eligible map[uint32][]sharding.Validator, _ map[uint32][]sharding.Validator, epoch uint32, ) error
SetNodesPerShards -
func (*NodesCoordinatorMock) ShardIdForEpoch ¶ added in v1.2.0
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.2.0
func (ncm *NodesCoordinatorMock) ShuffleOutForEpoch(_ uint32)
ShuffleOutForEpoch verifies if the shards changed in the new epoch and calls the shuffleOutHandler
func (*NodesCoordinatorMock) ValidatorsWeights ¶ added in v1.2.0
func (ncm *NodesCoordinatorMock) ValidatorsWeights(validators []sharding.Validator) ([]uint32, error)
ValidatorsWeights -
type NodesSetupStub ¶
type NodesSetupStub struct { InitialNodesInfoForShardCalled func(shardId uint32) ([]sharding.GenesisNodeInfoHandler, []sharding.GenesisNodeInfoHandler, error) InitialNodesInfoCalled func() (map[uint32][]sharding.GenesisNodeInfoHandler, map[uint32][]sharding.GenesisNodeInfoHandler) GetStartTimeCalled func() int64 GetRoundDurationCalled func() uint64 GetChainIdCalled func() string GetMinTransactionVersionCalled func() uint32 GetShardConsensusGroupSizeCalled func() uint32 GetMetaConsensusGroupSizeCalled func() uint32 NumberOfShardsCalled func() uint32 MinNumberOfNodesCalled func() uint32 MinNumberOfShardNodesCalled func() uint32 MinNumberOfMetaNodesCalled func() uint32 GetHysteresisCalled func() float32 GetAdaptivityCalled func() bool }
NodesSetupStub -
func (*NodesSetupStub) GetAdaptivity ¶ added in v1.2.0
func (n *NodesSetupStub) GetAdaptivity() bool
GetAdaptivity -
func (*NodesSetupStub) GetChainId ¶ added in v1.2.0
func (n *NodesSetupStub) GetChainId() string
GetChainId -
func (*NodesSetupStub) GetHysteresis ¶ added in v1.2.0
func (n *NodesSetupStub) GetHysteresis() float32
GetHysteresis -
func (*NodesSetupStub) GetMetaConsensusGroupSize ¶ added in v1.2.0
func (n *NodesSetupStub) GetMetaConsensusGroupSize() uint32
GetMetaConsensusGroupSize -
func (*NodesSetupStub) GetMinTransactionVersion ¶ added in v1.2.0
func (n *NodesSetupStub) GetMinTransactionVersion() uint32
GetMinTransactionVersion -
func (*NodesSetupStub) GetRoundDuration ¶ added in v1.2.0
func (n *NodesSetupStub) GetRoundDuration() uint64
GetRoundDuration -
func (*NodesSetupStub) GetShardConsensusGroupSize ¶ added in v1.2.0
func (n *NodesSetupStub) GetShardConsensusGroupSize() uint32
GetShardConsensusGroupSize -
func (*NodesSetupStub) GetStartTime ¶ added in v1.2.0
func (n *NodesSetupStub) GetStartTime() int64
GetStartTime -
func (*NodesSetupStub) InitialNodesInfo ¶ added in v1.2.0
func (n *NodesSetupStub) InitialNodesInfo() (map[uint32][]sharding.GenesisNodeInfoHandler, map[uint32][]sharding.GenesisNodeInfoHandler)
InitialNodesInfo -
func (*NodesSetupStub) InitialNodesInfoForShard ¶ added in v1.2.0
func (n *NodesSetupStub) InitialNodesInfoForShard(shardId uint32) ([]sharding.GenesisNodeInfoHandler, []sharding.GenesisNodeInfoHandler, error)
InitialNodesInfoForShard -
func (*NodesSetupStub) IsInterfaceNil ¶
func (n *NodesSetupStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*NodesSetupStub) MinNumberOfMetaNodes ¶ added in v1.2.0
func (n *NodesSetupStub) MinNumberOfMetaNodes() uint32
MinNumberOfMetaNodes -
func (*NodesSetupStub) MinNumberOfNodes ¶ added in v1.2.0
func (n *NodesSetupStub) MinNumberOfNodes() uint32
MinNumberOfNodes -
func (*NodesSetupStub) MinNumberOfShardNodes ¶ added in v1.2.0
func (n *NodesSetupStub) MinNumberOfShardNodes() uint32
MinNumberOfShardNodes -
func (*NodesSetupStub) NumberOfShards ¶ added in v1.2.0
func (n *NodesSetupStub) NumberOfShards() uint32
NumberOfShards -
type P2PAntifloodHandlerStub ¶ added in v1.2.0
type P2PAntifloodHandlerStub struct { CanProcessMessageCalled func(message p2p.MessageP2P, fromConnectedPeer core.PeerID) error CanProcessMessagesOnTopicCalled func(peer core.PeerID, topic string, numMessages uint32, totalSize uint64, sequence []byte) error ApplyConsensusSizeCalled func(size int) SetDebuggerCalled func(debugger process.AntifloodDebugger) error BlacklistPeerCalled func(peer core.PeerID, reason string, duration time.Duration) IsOriginatorEligibleForTopicCalled func(pid core.PeerID, topic string) error }
P2PAntifloodHandlerStub -
func (*P2PAntifloodHandlerStub) ApplyConsensusSize ¶ added in v1.2.0
func (p2pahs *P2PAntifloodHandlerStub) ApplyConsensusSize(size int)
ApplyConsensusSize -
func (*P2PAntifloodHandlerStub) BlacklistPeer ¶ added in v1.2.0
func (p2pahs *P2PAntifloodHandlerStub) BlacklistPeer(peer core.PeerID, reason string, duration time.Duration)
BlacklistPeer -
func (*P2PAntifloodHandlerStub) CanProcessMessage ¶ added in v1.2.0
func (p2pahs *P2PAntifloodHandlerStub) CanProcessMessage(message p2p.MessageP2P, fromConnectedPeer core.PeerID) error
CanProcessMessage -
func (*P2PAntifloodHandlerStub) CanProcessMessagesOnTopic ¶ added in v1.2.0
func (p2pahs *P2PAntifloodHandlerStub) CanProcessMessagesOnTopic(peer core.PeerID, topic string, numMessages uint32, totalSize uint64, sequence []byte) error
CanProcessMessagesOnTopic -
func (*P2PAntifloodHandlerStub) Close ¶ added in v1.2.0
func (p2pahs *P2PAntifloodHandlerStub) Close() error
Close -
func (*P2PAntifloodHandlerStub) IsInterfaceNil ¶ added in v1.2.0
func (p2pahs *P2PAntifloodHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*P2PAntifloodHandlerStub) IsOriginatorEligibleForTopic ¶ added in v1.2.0
func (p2pahs *P2PAntifloodHandlerStub) IsOriginatorEligibleForTopic(pid core.PeerID, topic string) error
IsOriginatorEligibleForTopic -
func (*P2PAntifloodHandlerStub) ResetForTopic ¶ added in v1.2.0
func (p2pahs *P2PAntifloodHandlerStub) ResetForTopic(_ string)
ResetForTopic -
func (*P2PAntifloodHandlerStub) SetDebugger ¶ added in v1.2.0
func (p2pahs *P2PAntifloodHandlerStub) SetDebugger(debugger process.AntifloodDebugger) error
SetDebugger -
func (*P2PAntifloodHandlerStub) SetMaxMessagesForTopic ¶ added in v1.2.0
func (p2pahs *P2PAntifloodHandlerStub) SetMaxMessagesForTopic(_ string, _ uint32)
SetMaxMessagesForTopic -
func (*P2PAntifloodHandlerStub) SetPeerValidatorMapper ¶ added in v1.2.0
func (p2pahs *P2PAntifloodHandlerStub) SetPeerValidatorMapper(_ process.PeerValidatorMapper) error
SetPeerValidatorMapper -
func (*P2PAntifloodHandlerStub) SetTopicsForAll ¶ added in v1.2.0
func (p2pahs *P2PAntifloodHandlerStub) SetTopicsForAll(_ ...string)
SetTopicsForAll -
type PeerBlackListHandlerStub ¶ added in v1.2.0
type PeerBlackListHandlerStub struct { UpsertCalled func(pid core.PeerID, span time.Duration) error HasCalled func(pid core.PeerID) bool SweepCalled func() }
PeerBlackListHandlerStub -
func (*PeerBlackListHandlerStub) Has ¶ added in v1.2.0
func (pblhs *PeerBlackListHandlerStub) Has(pid core.PeerID) bool
Has -
func (*PeerBlackListHandlerStub) IsInterfaceNil ¶ added in v1.2.0
func (pblhs *PeerBlackListHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*PeerBlackListHandlerStub) Sweep ¶ added in v1.2.0
func (pblhs *PeerBlackListHandlerStub) Sweep()
Sweep -
type PeerHonestyHandlerStub ¶ added in v1.2.0
PeerHonestyHandlerStub -
func (*PeerHonestyHandlerStub) ChangeScore ¶ added in v1.2.0
func (phhs *PeerHonestyHandlerStub) ChangeScore(pk string, topic string, units int)
ChangeScore -
func (*PeerHonestyHandlerStub) Close ¶ added in v1.2.0
func (phhs *PeerHonestyHandlerStub) Close() error
Close -
func (*PeerHonestyHandlerStub) IsInterfaceNil ¶ added in v1.2.0
func (phhs *PeerHonestyHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
type PeerSignatureHandler ¶ added in v1.2.0
type PeerSignatureHandler struct{}
PeerSignatureHandler -
func (*PeerSignatureHandler) GetPeerSignature ¶ added in v1.2.0
func (p *PeerSignatureHandler) GetPeerSignature(_ crypto.PrivateKey, _ []byte) ([]byte, error)
GetPeerSignature -
func (*PeerSignatureHandler) IsInterfaceNil ¶ added in v1.2.0
func (p *PeerSignatureHandler) IsInterfaceNil() bool
IsInterfaceNil -
func (*PeerSignatureHandler) VerifyPeerSignature ¶ added in v1.2.0
VerifyPeerSignature -
type PendingMiniBlocksHandlerStub ¶ added in v1.2.0
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 ¶ added in v1.2.0
func (p *PendingMiniBlocksHandlerStub) AddProcessedHeader(handler data.HeaderHandler) error
AddProcessedHeader -
func (*PendingMiniBlocksHandlerStub) GetPendingMiniBlocks ¶ added in v1.2.0
func (p *PendingMiniBlocksHandlerStub) GetPendingMiniBlocks(shardID uint32) [][]byte
GetPendingMiniBlocks -
func (*PendingMiniBlocksHandlerStub) IsInterfaceNil ¶ added in v1.2.0
func (p *PendingMiniBlocksHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*PendingMiniBlocksHandlerStub) RevertHeader ¶ added in v1.2.0
func (p *PendingMiniBlocksHandlerStub) RevertHeader(handler data.HeaderHandler) error
RevertHeader -
func (*PendingMiniBlocksHandlerStub) SetPendingMiniBlocks ¶ added in v1.2.0
func (p *PendingMiniBlocksHandlerStub) SetPendingMiniBlocks(shardID uint32, mbHashes [][]byte)
SetPendingMiniBlocks -
type PointMock ¶
type PointMock struct { X int Y int GetUnderlyingObjStub func() interface{} MarshalBinaryStub func(x, y int) ([]byte, error) UnmarshalBinaryStub func([]byte) (x, y int, err error) }
PointMock represents a mock implementation for a Point
func (*PointMock) Add ¶
Add returns the result of adding receiver with Point p given as parameter, so that their scalars add homomorphically
func (*PointMock) Base ¶
func (po *PointMock) Base() crypto.Point
Base returns the Group's base point.
func (*PointMock) Clone ¶
func (po *PointMock) Clone() crypto.Point
Clone returns a clone of the receiver.
func (*PointMock) Equal ¶
Equal tests if receiver is equal with the Point p given as parameter. Both Points need to be derived from the same Group
func (*PointMock) GetUnderlyingObj ¶
func (po *PointMock) GetUnderlyingObj() interface{}
GetUnderlyingObj returns the object the implementation wraps
func (*PointMock) IsInterfaceNil ¶
IsInterfaceNil returns true if there is no value under the interface
func (*PointMock) MarshalBinary ¶
MarshalBinary transforms the Point into a byte array
func (*PointMock) Mul ¶
Mul returns the result of multiplying receiver by the scalar s. Mock multiplies the scalar to both X and Y fields
func (*PointMock) Neg ¶
func (po *PointMock) Neg() crypto.Point
Neg returns the negation of receiver
func (*PointMock) Null ¶
func (po *PointMock) Null() crypto.Point
Null returns the neutral identity element.
func (*PointMock) Sub ¶
Sub returns the result of subtracting from receiver the Point p given as parameter, so that their scalars subtract homomorphically
func (*PointMock) UnmarshalBinary ¶
UnmarshalBinary recreates the Point from a byte array
type PrivateKeyStub ¶ added in v1.2.0
type PrivateKeyStub struct { ToByteArrayHandler func() ([]byte, error) GeneratePublicHandler func() crypto.PublicKey SuiteHandler func() crypto.Suite ScalarHandler func() crypto.Scalar }
PrivateKeyStub -
func (*PrivateKeyStub) GeneratePublic ¶ added in v1.2.0
func (sk *PrivateKeyStub) GeneratePublic() crypto.PublicKey
GeneratePublic -
func (*PrivateKeyStub) IsInterfaceNil ¶ added in v1.2.0
func (sk *PrivateKeyStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*PrivateKeyStub) Scalar ¶ added in v1.2.0
func (sk *PrivateKeyStub) Scalar() crypto.Scalar
Scalar -
func (*PrivateKeyStub) Suite ¶ added in v1.2.0
func (sk *PrivateKeyStub) Suite() crypto.Suite
Suite -
func (*PrivateKeyStub) ToByteArray ¶ added in v1.2.0
func (sk *PrivateKeyStub) ToByteArray() ([]byte, error)
ToByteArray -
type ProcessComponentsMock ¶ added in v1.2.0
type ProcessComponentsMock struct { NodesCoord sharding.NodesCoordinator ShardCoord sharding.Coordinator IntContainer process.InterceptorsContainer ResFinder dataRetriever.ResolversFinder RoundHandlerField consensus.RoundHandler EpochTrigger epochStart.TriggerHandler EpochNotifier factory.EpochStartNotifier ForkDetect process.ForkDetector BlockProcess process.BlockProcessor BlackListHdl process.TimeCacher BootSore process.BootStorer HeaderSigVerif process.InterceptedHeaderSigVerifier HeaderIntegrVerif process.HeaderIntegrityVerifier ValidatorStatistics process.ValidatorStatisticsProcessor ValidatorProvider process.ValidatorsProvider BlockTrack process.BlockTracker PendingMiniBlocksHdl process.PendingMiniBlocksHandler ReqHandler process.RequestHandler TxLogsProcess process.TransactionLogProcessorDatabase HeaderConstructValidator process.HeaderConstructionValidator PeerMapper process.NetworkShardingCollector TxSimulatorProcessor factory.TransactionSimulatorProcessor FallbackHdrValidator process.FallbackHeaderValidator WhiteListHandlerInternal process.WhiteListHandler WhiteListerVerifiedTxsInternal process.WhiteListHandler HistoryRepositoryInternal dblookupext.HistoryRepository ImportStartHandlerInternal update.ImportStartHandler RequestedItemsHandlerInternal dataRetriever.RequestedItemsHandler NodeRedundancyHandlerInternal consensus.NodeRedundancyHandler ArwenChangeLockerInternal process.Locker CurrentEpochProviderInternal process.CurrentNetworkEpochProviderHandler }
ProcessComponentsMock -
func (*ProcessComponentsMock) ArwenChangeLocker ¶ added in v1.2.1
func (pcm *ProcessComponentsMock) ArwenChangeLocker() process.Locker
ArwenChangeLocker -
func (*ProcessComponentsMock) BlackListHandler ¶ added in v1.2.0
func (pcm *ProcessComponentsMock) BlackListHandler() process.TimeCacher
BlackListHandler -
func (*ProcessComponentsMock) BlockProcessor ¶ added in v1.2.0
func (pcm *ProcessComponentsMock) BlockProcessor() process.BlockProcessor
BlockProcessor -
func (*ProcessComponentsMock) BlockTracker ¶ added in v1.2.0
func (pcm *ProcessComponentsMock) BlockTracker() process.BlockTracker
BlockTracker -
func (*ProcessComponentsMock) BootStorer ¶ added in v1.2.0
func (pcm *ProcessComponentsMock) BootStorer() process.BootStorer
BootStorer -
func (*ProcessComponentsMock) CheckSubcomponents ¶ added in v1.2.0
func (pcm *ProcessComponentsMock) CheckSubcomponents() error
CheckSubcomponents -
func (*ProcessComponentsMock) Close ¶ added in v1.2.0
func (pcm *ProcessComponentsMock) Close() error
Close -
func (*ProcessComponentsMock) Create ¶ added in v1.2.0
func (pcm *ProcessComponentsMock) Create() error
Create -
func (*ProcessComponentsMock) CurrentEpochProvider ¶ added in v1.2.4
func (pcm *ProcessComponentsMock) CurrentEpochProvider() process.CurrentNetworkEpochProviderHandler
CurrentEpochProvider -
func (*ProcessComponentsMock) EpochStartNotifier ¶ added in v1.2.0
func (pcm *ProcessComponentsMock) EpochStartNotifier() factory.EpochStartNotifier
EpochStartNotifier -
func (*ProcessComponentsMock) EpochStartTrigger ¶ added in v1.2.0
func (pcm *ProcessComponentsMock) EpochStartTrigger() epochStart.TriggerHandler
EpochStartTrigger -
func (*ProcessComponentsMock) FallbackHeaderValidator ¶ added in v1.2.0
func (pcm *ProcessComponentsMock) FallbackHeaderValidator() process.FallbackHeaderValidator
FallbackHeaderValidator -
func (*ProcessComponentsMock) ForkDetector ¶ added in v1.2.0
func (pcm *ProcessComponentsMock) ForkDetector() process.ForkDetector
ForkDetector -
func (*ProcessComponentsMock) HeaderConstructionValidator ¶ added in v1.2.0
func (pcm *ProcessComponentsMock) HeaderConstructionValidator() process.HeaderConstructionValidator
HeaderConstructionValidator -
func (*ProcessComponentsMock) HeaderIntegrityVerifier ¶ added in v1.2.0
func (pcm *ProcessComponentsMock) HeaderIntegrityVerifier() process.HeaderIntegrityVerifier
HeaderIntegrityVerifier -
func (*ProcessComponentsMock) HeaderSigVerifier ¶ added in v1.2.0
func (pcm *ProcessComponentsMock) HeaderSigVerifier() process.InterceptedHeaderSigVerifier
HeaderSigVerifier -
func (*ProcessComponentsMock) HistoryRepository ¶ added in v1.2.0
func (pcm *ProcessComponentsMock) HistoryRepository() dblookupext.HistoryRepository
HistoryRepository -
func (*ProcessComponentsMock) ImportStartHandler ¶ added in v1.2.0
func (pcm *ProcessComponentsMock) ImportStartHandler() update.ImportStartHandler
ImportStartHandler -
func (*ProcessComponentsMock) InterceptorsContainer ¶ added in v1.2.0
func (pcm *ProcessComponentsMock) InterceptorsContainer() process.InterceptorsContainer
InterceptorsContainer -
func (*ProcessComponentsMock) IsInterfaceNil ¶ added in v1.2.0
func (pcm *ProcessComponentsMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*ProcessComponentsMock) NodeRedundancyHandler ¶ added in v1.2.0
func (pcm *ProcessComponentsMock) NodeRedundancyHandler() consensus.NodeRedundancyHandler
NodeRedundancyHandler -
func (*ProcessComponentsMock) NodesCoordinator ¶ added in v1.2.0
func (pcm *ProcessComponentsMock) NodesCoordinator() sharding.NodesCoordinator
NodesCoordinator -
func (*ProcessComponentsMock) PeerShardMapper ¶ added in v1.2.0
func (pcm *ProcessComponentsMock) PeerShardMapper() process.NetworkShardingCollector
PeerShardMapper -
func (*ProcessComponentsMock) PendingMiniBlocksHandler ¶ added in v1.2.0
func (pcm *ProcessComponentsMock) PendingMiniBlocksHandler() process.PendingMiniBlocksHandler
PendingMiniBlocksHandler -
func (*ProcessComponentsMock) RequestHandler ¶ added in v1.2.0
func (pcm *ProcessComponentsMock) RequestHandler() process.RequestHandler
RequestHandler -
func (*ProcessComponentsMock) RequestedItemsHandler ¶ added in v1.2.0
func (pcm *ProcessComponentsMock) RequestedItemsHandler() dataRetriever.RequestedItemsHandler
RequestedItemsHandler -
func (*ProcessComponentsMock) ResolversFinder ¶ added in v1.2.0
func (pcm *ProcessComponentsMock) ResolversFinder() dataRetriever.ResolversFinder
ResolversFinder -
func (*ProcessComponentsMock) RoundHandler ¶ added in v1.2.0
func (pcm *ProcessComponentsMock) RoundHandler() consensus.RoundHandler
RoundHandler -
func (*ProcessComponentsMock) ShardCoordinator ¶ added in v1.2.0
func (pcm *ProcessComponentsMock) ShardCoordinator() sharding.Coordinator
ShardCoordinator -
func (*ProcessComponentsMock) String ¶ added in v1.2.12
func (pcm *ProcessComponentsMock) String() string
String -
func (*ProcessComponentsMock) TransactionSimulatorProcessor ¶ added in v1.2.0
func (pcm *ProcessComponentsMock) TransactionSimulatorProcessor() factory.TransactionSimulatorProcessor
TransactionSimulatorProcessor -
func (*ProcessComponentsMock) TxLogsProcessor ¶ added in v1.2.0
func (pcm *ProcessComponentsMock) TxLogsProcessor() process.TransactionLogProcessorDatabase
TxLogsProcessor -
func (*ProcessComponentsMock) ValidatorsProvider ¶ added in v1.2.0
func (pcm *ProcessComponentsMock) ValidatorsProvider() process.ValidatorsProvider
ValidatorsProvider -
func (*ProcessComponentsMock) ValidatorsStatistics ¶ added in v1.2.0
func (pcm *ProcessComponentsMock) ValidatorsStatistics() process.ValidatorStatisticsProcessor
ValidatorsStatistics -
func (*ProcessComponentsMock) WhiteListHandler ¶ added in v1.2.0
func (pcm *ProcessComponentsMock) WhiteListHandler() process.WhiteListHandler
WhiteListHandler -
func (*ProcessComponentsMock) WhiteListerVerifiedTxs ¶ added in v1.2.0
func (pcm *ProcessComponentsMock) WhiteListerVerifiedTxs() process.WhiteListHandler
WhiteListerVerifiedTxs -
type PubkeyConverterStub ¶
type PubkeyConverterStub struct { LenCalled func() int DecodeCalled func(humanReadable string) ([]byte, error) EncodeCalled func(pkBytes []byte) string }
PubkeyConverterStub -
func (*PubkeyConverterStub) Decode ¶
func (pcs *PubkeyConverterStub) Decode(humanReadable string) ([]byte, error)
Decode -
func (*PubkeyConverterStub) Encode ¶
func (pcs *PubkeyConverterStub) Encode(pkBytes []byte) string
Encode -
func (*PubkeyConverterStub) IsInterfaceNil ¶
func (pcs *PubkeyConverterStub) IsInterfaceNil() bool
IsInterfaceNil -
type 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 RedundancyHandlerStub ¶ added in v1.2.0
type RedundancyHandlerStub struct { IsRedundancyNodeCalled func() bool IsMainMachineActiveCalled func() bool ObserverPrivateKeyCalled func() crypto.PrivateKey AdjustInactivityIfNeededCalled func(selfPubKey string, consensusPubKeys []string, roundIndex int64) ResetInactivityIfNeededCalled func(selfPubKey string, consensusMsgPubKey string, consensusMsgPeerID core.PeerID) }
RedundancyHandlerStub -
func (*RedundancyHandlerStub) AdjustInactivityIfNeeded ¶ added in v1.2.0
func (rhs *RedundancyHandlerStub) AdjustInactivityIfNeeded(selfPubKey string, consensusPubKeys []string, roundIndex int64)
AdjustInactivityIfNeeded -
func (*RedundancyHandlerStub) IsInterfaceNil ¶ added in v1.2.0
func (rhs *RedundancyHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*RedundancyHandlerStub) IsMainMachineActive ¶ added in v1.2.0
func (rhs *RedundancyHandlerStub) IsMainMachineActive() bool
IsMainMachineActive -
func (*RedundancyHandlerStub) IsRedundancyNode ¶ added in v1.2.0
func (rhs *RedundancyHandlerStub) IsRedundancyNode() bool
IsRedundancyNode -
func (*RedundancyHandlerStub) ObserverPrivateKey ¶ added in v1.2.0
func (rhs *RedundancyHandlerStub) ObserverPrivateKey() crypto.PrivateKey
ObserverPrivateKey -
func (*RedundancyHandlerStub) ResetInactivityIfNeeded ¶ added in v1.2.0
func (rhs *RedundancyHandlerStub) ResetInactivityIfNeeded(selfPubKey string, consensusMsgPubKey string, consensusMsgPeerID core.PeerID)
ResetInactivityIfNeeded -
type ResolversFinderStub ¶ added in v1.2.0
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) CloseCalled func() error }
ResolversFinderStub -
func (*ResolversFinderStub) Add ¶ added in v1.2.0
func (rfs *ResolversFinderStub) Add(key string, val dataRetriever.Resolver) error
Add -
func (*ResolversFinderStub) AddMultiple ¶ added in v1.2.0
func (rfs *ResolversFinderStub) AddMultiple(_ []string, _ []dataRetriever.Resolver) error
AddMultiple -
func (*ResolversFinderStub) Close ¶ added in v1.2.0
func (rfs *ResolversFinderStub) Close() error
Close -
func (*ResolversFinderStub) CrossShardResolver ¶ added in v1.2.0
func (rfs *ResolversFinderStub) CrossShardResolver(baseTopic string, crossShard uint32) (dataRetriever.Resolver, error)
CrossShardResolver -
func (*ResolversFinderStub) Get ¶ added in v1.2.0
func (rfs *ResolversFinderStub) Get(key string) (dataRetriever.Resolver, error)
Get -
func (*ResolversFinderStub) IntraShardResolver ¶ added in v1.2.0
func (rfs *ResolversFinderStub) IntraShardResolver(baseTopic string) (dataRetriever.Resolver, error)
IntraShardResolver -
func (*ResolversFinderStub) IsInterfaceNil ¶ added in v1.2.0
func (rfs *ResolversFinderStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ResolversFinderStub) Iterate ¶ added in v1.2.0
func (rfs *ResolversFinderStub) Iterate(handler func(key string, resolver dataRetriever.Resolver) bool)
Iterate -
func (*ResolversFinderStub) MetaChainResolver ¶ added in v1.2.0
func (rfs *ResolversFinderStub) MetaChainResolver(baseTopic string) (dataRetriever.Resolver, error)
MetaChainResolver -
func (*ResolversFinderStub) MetaCrossShardResolver ¶ added in v1.2.0
func (rfs *ResolversFinderStub) MetaCrossShardResolver(baseTopic string, crossShard uint32) (dataRetriever.Resolver, error)
MetaCrossShardResolver -
func (*ResolversFinderStub) Remove ¶ added in v1.2.0
func (rfs *ResolversFinderStub) Remove(key string)
Remove -
func (*ResolversFinderStub) Replace ¶ added in v1.2.0
func (rfs *ResolversFinderStub) Replace(key string, val dataRetriever.Resolver) error
Replace -
func (*ResolversFinderStub) ResolverKeys ¶ added in v1.2.0
func (rfs *ResolversFinderStub) ResolverKeys() string
ResolverKeys -
type RoundHandlerMock ¶ added in v1.2.0
type RoundHandlerMock struct { RoundIndex int64 RoundTimeStamp time.Time RoundTimeDuration time.Duration // contains filtered or unexported fields }
RoundHandlerMock -
func (*RoundHandlerMock) BeforeGenesis ¶ added in v1.2.0
func (rndm *RoundHandlerMock) BeforeGenesis() bool
BeforeGenesis -
func (*RoundHandlerMock) Index ¶ added in v1.2.0
func (rndm *RoundHandlerMock) Index() int64
Index -
func (*RoundHandlerMock) IsInterfaceNil ¶ added in v1.2.0
func (rndm *RoundHandlerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*RoundHandlerMock) RemainingTime ¶ added in v1.2.0
RemainingTime -
func (*RoundHandlerMock) TimeDuration ¶ added in v1.2.0
func (rndm *RoundHandlerMock) TimeDuration() time.Duration
TimeDuration -
func (*RoundHandlerMock) TimeStamp ¶ added in v1.2.0
func (rndm *RoundHandlerMock) TimeStamp() time.Time
TimeStamp -
func (*RoundHandlerMock) UpdateRound ¶ added in v1.2.0
func (rndm *RoundHandlerMock) UpdateRound(genesisRoundTimeStamp time.Time, timeStamp time.Time)
UpdateRound -
type ScalarMock ¶
type ScalarMock struct { X int MarshalBinaryStub func(x int) ([]byte, error) UnmarshalBinaryStub func([]byte) (int, error) GetUnderlyingObjStub func() interface{} }
ScalarMock represents a mock implementation of a Scalar
func (*ScalarMock) Add ¶
func (sm *ScalarMock) Add(_ crypto.Scalar) (crypto.Scalar, error)
Add returns the modular sum of receiver with scalar s given as parameter
func (*ScalarMock) Clone ¶
func (sm *ScalarMock) Clone() crypto.Scalar
Clone creates a new Scalar with same value as receiver
func (*ScalarMock) Div ¶
func (sm *ScalarMock) Div(_ crypto.Scalar) (crypto.Scalar, error)
Div returns the modular division between receiver and scalar s given as parameter
func (*ScalarMock) Equal ¶
func (sm *ScalarMock) Equal(_ crypto.Scalar) (bool, error)
Equal tests if receiver is equal with the scalar s given as parameter. Both scalars need to be derived from the same Group
func (*ScalarMock) GetUnderlyingObj ¶
func (sm *ScalarMock) GetUnderlyingObj() interface{}
GetUnderlyingObj returns the object the implementation wraps
func (*ScalarMock) Inv ¶
func (sm *ScalarMock) Inv(_ crypto.Scalar) (crypto.Scalar, error)
Inv returns the modular inverse of scalar s given as parameter
func (*ScalarMock) IsInterfaceNil ¶
func (sm *ScalarMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ScalarMock) MarshalBinary ¶
func (sm *ScalarMock) MarshalBinary() ([]byte, error)
MarshalBinary transforms the Scalar into a byte array
func (*ScalarMock) Mul ¶
func (sm *ScalarMock) Mul(_ crypto.Scalar) (crypto.Scalar, error)
Mul returns the modular product of receiver with scalar s given as parameter
func (*ScalarMock) Neg ¶
func (sm *ScalarMock) Neg() crypto.Scalar
Neg returns the modular negation of receiver
func (*ScalarMock) One ¶
func (sm *ScalarMock) One() crypto.Scalar
One returns the multiplicative identity (1)
func (*ScalarMock) Pick ¶
func (sm *ScalarMock) Pick() (crypto.Scalar, error)
Pick returns a fresh random or pseudo-random scalar For the mock set X to the original scalar.X *2
func (*ScalarMock) Set ¶
func (sm *ScalarMock) Set(_ crypto.Scalar) error
Set sets the receiver to Scalar s given as parameter
func (*ScalarMock) SetBytes ¶
func (sm *ScalarMock) SetBytes([]byte) (crypto.Scalar, error)
SetBytes sets the scalar from a byte-slice, reducing if necessary to the appropriate modulus.
func (*ScalarMock) SetInt64 ¶
func (sm *ScalarMock) SetInt64(_ int64)
SetInt64 sets the receiver to a small integer value v given as parameter
func (*ScalarMock) Sub ¶
func (sm *ScalarMock) Sub(_ crypto.Scalar) (crypto.Scalar, error)
Sub returns the modular difference between receiver and scalar s given as parameter
func (*ScalarMock) UnmarshalBinary ¶
func (sm *ScalarMock) UnmarshalBinary(val []byte) error
UnmarshalBinary recreates the Scalar from a byte array
func (*ScalarMock) Zero ¶
func (sm *ScalarMock) Zero() crypto.Scalar
Zero returns the the additive identity (0)
type SinglesignFailMock ¶ added in v1.2.0
type SinglesignFailMock struct { }
SinglesignFailMock -
func (*SinglesignFailMock) IsInterfaceNil ¶ added in v1.2.0
func (s *SinglesignFailMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type SinglesignMock ¶ added in v1.2.0
type SinglesignMock struct { }
SinglesignMock -
func (*SinglesignMock) IsInterfaceNil ¶ added in v1.2.0
func (s *SinglesignMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type SinglesignStub ¶ added in v1.2.0
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 ¶ added in v1.2.0
func (s *SinglesignStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type SmartContractParserStub ¶ added in v1.2.0
type SmartContractParserStub struct { InitialSmartContractsSplitOnOwnersShardsCalled func(shardCoordinator sharding.Coordinator) (map[uint32][]genesis.InitialSmartContractHandler, error) InitialSmartContractsCalled func() []genesis.InitialSmartContractHandler GetDeployedSCAddressesCalled func(scType string) (map[string]struct{}, error) }
SmartContractParserStub -
func (*SmartContractParserStub) GetDeployedSCAddresses ¶ added in v1.2.0
func (scps *SmartContractParserStub) GetDeployedSCAddresses(scType string) (map[string]struct{}, error)
GetDeployedSCAddresses -
func (*SmartContractParserStub) InitialSmartContracts ¶ added in v1.2.0
func (scps *SmartContractParserStub) InitialSmartContracts() []genesis.InitialSmartContractHandler
InitialSmartContracts -
func (*SmartContractParserStub) InitialSmartContractsSplitOnOwnersShards ¶ added in v1.2.0
func (scps *SmartContractParserStub) InitialSmartContractsSplitOnOwnersShards(shardCoordinator sharding.Coordinator) (map[uint32][]genesis.InitialSmartContractHandler, error)
InitialSmartContractsSplitOnOwnersShards -
func (*SmartContractParserStub) IsInterfaceNil ¶ added in v1.2.0
func (scps *SmartContractParserStub) IsInterfaceNil() bool
IsInterfaceNil -
type StateComponentsHolderStub ¶ added in v1.2.0
type StateComponentsHolderStub struct { PeerAccountsCalled func() state.AccountsAdapter AccountsAdapterCalled func() state.AccountsAdapter AccountsAdapterAPICalled func() state.AccountsAdapter TriesContainerCalled func() state.TriesHolder TrieStorageManagersCalled func() map[string]common.StorageManager }
StateComponentsHolderStub -
func (*StateComponentsHolderStub) AccountsAdapter ¶ added in v1.2.0
func (s *StateComponentsHolderStub) AccountsAdapter() state.AccountsAdapter
AccountsAdapter -
func (*StateComponentsHolderStub) AccountsAdapterAPI ¶ added in v1.2.0
func (s *StateComponentsHolderStub) AccountsAdapterAPI() state.AccountsAdapter
AccountsAdapterAPI -
func (*StateComponentsHolderStub) IsInterfaceNil ¶ added in v1.2.0
func (s *StateComponentsHolderStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*StateComponentsHolderStub) PeerAccounts ¶ added in v1.2.0
func (s *StateComponentsHolderStub) PeerAccounts() state.AccountsAdapter
PeerAccounts -
func (*StateComponentsHolderStub) TrieStorageManagers ¶ added in v1.2.0
func (s *StateComponentsHolderStub) TrieStorageManagers() map[string]common.StorageManager
TrieStorageManagers -
func (*StateComponentsHolderStub) TriesContainer ¶ added in v1.2.0
func (s *StateComponentsHolderStub) TriesContainer() state.TriesHolder
TriesContainer -
type StatusHandlersFactoryMock ¶ added in v1.2.0
type StatusHandlersFactoryMock struct { }
StatusHandlersFactoryMock -
func (*StatusHandlersFactoryMock) Create ¶ added in v1.2.0
func (shfm *StatusHandlersFactoryMock) Create(_ marshal.Marshalizer, _ typeConverters.Uint64ByteSliceConverter) (factory.StatusHandlersUtils, error)
Create -
type StatusHandlersUtilsMock ¶ added in v1.2.0
type StatusHandlersUtilsMock struct {
AppStatusHandler core.AppStatusHandler
}
StatusHandlersUtilsMock -
func (*StatusHandlersUtilsMock) IsInterfaceNil ¶ added in v1.2.0
func (shum *StatusHandlersUtilsMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*StatusHandlersUtilsMock) Metrics ¶ added in v1.2.0
func (shum *StatusHandlersUtilsMock) Metrics() external.StatusMetricsHandler
Metrics -
func (*StatusHandlersUtilsMock) SignalLogRewrite ¶ added in v1.2.0
func (shum *StatusHandlersUtilsMock) SignalLogRewrite()
SignalLogRewrite -
func (*StatusHandlersUtilsMock) SignalStartViews ¶ added in v1.2.0
func (shum *StatusHandlersUtilsMock) SignalStartViews()
SignalStartViews -
func (*StatusHandlersUtilsMock) StatusHandler ¶ added in v1.2.0
func (shum *StatusHandlersUtilsMock) StatusHandler() core.AppStatusHandler
StatusHandler -
func (*StatusHandlersUtilsMock) UpdateStorerAndMetricsForPersistentHandler ¶ added in v1.2.0
func (shum *StatusHandlersUtilsMock) UpdateStorerAndMetricsForPersistentHandler(_ storage.Storer) error
UpdateStorerAndMetricsForPersistentHandler -
type Streamer ¶
type Streamer struct {
// contains filtered or unexported fields
}
Streamer -
func (*Streamer) XORKeyStream ¶
XORKeyStream -
type SuiteStub ¶
type SuiteStub 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, error) RandomStreamStub func() cipher.Stream CreateKeyPairStub func() (crypto.Scalar, crypto.Point) IsPointValidStub func([]byte) error GetUnderlyingSuiteStub func() interface{} }
SuiteStub -
func (*SuiteStub) CheckPointValid ¶ added in v1.0.120
CheckPointValid -
func (*SuiteStub) CreateKeyPair ¶
func (s *SuiteStub) CreateKeyPair() (crypto.Scalar, crypto.Point)
CreateKeyPair -
func (*SuiteStub) CreatePointForScalar ¶
CreatePointForScalar -
func (*SuiteStub) GetUnderlyingSuite ¶
func (s *SuiteStub) GetUnderlyingSuite() interface{}
GetUnderlyingSuite -
func (*SuiteStub) IsInterfaceNil ¶
IsInterfaceNil returns true if there is no value under the interface
type TriesHolderStub ¶ added in v1.2.0
type TriesHolderStub struct { PutCalled func([]byte, common.Trie) RemoveCalled func([]byte, common.Trie) GetCalled func([]byte) common.Trie GetAllCalled func() []common.Trie ResetCalled func() }
TriesHolderStub -
func (*TriesHolderStub) Get ¶ added in v1.2.0
func (ths *TriesHolderStub) Get(key []byte) common.Trie
Get -
func (*TriesHolderStub) GetAll ¶ added in v1.2.0
func (ths *TriesHolderStub) GetAll() []common.Trie
GetAll -
func (*TriesHolderStub) IsInterfaceNil ¶ added in v1.2.0
func (ths *TriesHolderStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*TriesHolderStub) Put ¶ added in v1.2.0
func (ths *TriesHolderStub) Put(key []byte, trie common.Trie)
Put -
type TxLogProcessorMock ¶ added in v1.2.0
type TxLogProcessorMock struct { }
TxLogProcessorMock -
func (*TxLogProcessorMock) EnableLogToBeSavedInCache ¶ added in v1.2.0
func (t *TxLogProcessorMock) EnableLogToBeSavedInCache()
EnableLogToBeSavedInCache -
func (*TxLogProcessorMock) GetLogFromCache ¶ added in v1.2.0
func (t *TxLogProcessorMock) GetLogFromCache(_ []byte) (data.LogHandler, bool)
GetLogFromCache -
func (*TxLogProcessorMock) IsInterfaceNil ¶ added in v1.2.0
func (t *TxLogProcessorMock) IsInterfaceNil() bool
IsInterfaceNil -
type ValidatorStatisticsProcessorStub ¶ added in v1.2.0
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 v1.2.0
func (vsp *ValidatorStatisticsProcessorStub) Commit() ([]byte, error)
Commit -
func (*ValidatorStatisticsProcessorStub) DisplayRatings ¶ added in v1.2.0
func (vsp *ValidatorStatisticsProcessorStub) DisplayRatings(_ uint32)
DisplayRatings -
func (*ValidatorStatisticsProcessorStub) GetPeerAccount ¶ added in v1.2.0
func (vsp *ValidatorStatisticsProcessorStub) GetPeerAccount(address []byte) (state.PeerAccountHandler, error)
GetPeerAccount -
func (*ValidatorStatisticsProcessorStub) GetValidatorInfoForRootHash ¶ added in v1.2.0
func (vsp *ValidatorStatisticsProcessorStub) GetValidatorInfoForRootHash(rootHash []byte) (map[uint32][]*state.ValidatorInfo, error)
GetValidatorInfoForRootHash -
func (*ValidatorStatisticsProcessorStub) IsInterfaceNil ¶ added in v1.2.0
func (vsp *ValidatorStatisticsProcessorStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*ValidatorStatisticsProcessorStub) LastFinalizedRootHash ¶ added in v1.2.0
func (vsp *ValidatorStatisticsProcessorStub) LastFinalizedRootHash() []byte
LastFinalizedRootHash -
func (*ValidatorStatisticsProcessorStub) PeerAccountToValidatorInfo ¶ added in v1.2.0
func (vsp *ValidatorStatisticsProcessorStub) PeerAccountToValidatorInfo(peerAccount state.PeerAccountHandler) *state.ValidatorInfo
PeerAccountToValidatorInfo -
func (*ValidatorStatisticsProcessorStub) Process ¶ added in v1.2.0
func (vsp *ValidatorStatisticsProcessorStub) Process(validatorInfo data.ShardValidatorInfoHandler) error
Process -
func (*ValidatorStatisticsProcessorStub) ProcessRatingsEndOfEpoch ¶ added in v1.2.0
func (vsp *ValidatorStatisticsProcessorStub) ProcessRatingsEndOfEpoch(validatorInfos map[uint32][]*state.ValidatorInfo, epoch uint32) error
ProcessRatingsEndOfEpoch -
func (*ValidatorStatisticsProcessorStub) ResetValidatorStatisticsAtNewEpoch ¶ added in v1.2.0
func (vsp *ValidatorStatisticsProcessorStub) ResetValidatorStatisticsAtNewEpoch(vInfos map[uint32][]*state.ValidatorInfo) error
ResetValidatorStatisticsAtNewEpoch -
func (*ValidatorStatisticsProcessorStub) RevertPeerState ¶ added in v1.2.0
func (vsp *ValidatorStatisticsProcessorStub) RevertPeerState(header data.HeaderHandler) error
RevertPeerState -
func (*ValidatorStatisticsProcessorStub) RootHash ¶ added in v1.2.0
func (vsp *ValidatorStatisticsProcessorStub) RootHash() ([]byte, error)
RootHash -
func (*ValidatorStatisticsProcessorStub) SaveNodesCoordinatorUpdates ¶ added in v1.2.0
func (vsp *ValidatorStatisticsProcessorStub) SaveNodesCoordinatorUpdates(epoch uint32) (bool, error)
SaveNodesCoordinatorUpdates -
func (*ValidatorStatisticsProcessorStub) SetLastFinalizedRootHash ¶ added in v1.2.0
func (vsp *ValidatorStatisticsProcessorStub) SetLastFinalizedRootHash(_ []byte)
SetLastFinalizedRootHash -
func (*ValidatorStatisticsProcessorStub) UpdatePeerState ¶ added in v1.2.0
func (vsp *ValidatorStatisticsProcessorStub) UpdatePeerState(header data.HeaderHandler, _ map[string]data.HeaderHandler) ([]byte, error)
UpdatePeerState -
type ValidatorsProviderStub ¶ added in v1.2.0
type ValidatorsProviderStub struct {
GetLatestValidatorsCalled func() map[string]*state.ValidatorApiResponse
}
ValidatorsProviderStub -
func (*ValidatorsProviderStub) Close ¶ added in v1.2.0
func (vp *ValidatorsProviderStub) Close() error
Close -
func (*ValidatorsProviderStub) GetLatestValidators ¶ added in v1.2.0
func (vp *ValidatorsProviderStub) GetLatestValidators() map[string]*state.ValidatorApiResponse
GetLatestValidators -
func (*ValidatorsProviderStub) IsInterfaceNil ¶ added in v1.2.0
func (vp *ValidatorsProviderStub) IsInterfaceNil() bool
IsInterfaceNil -
Source Files ¶
- accountFactoryStub.go
- accountsParserStub.go
- appStatusHandlerMock.go
- blockProcessorStub.go
- blockTrackerStub.go
- bootstrapStorerMock.go
- bootstrapStorerStub.go
- chainHandlerStub.go
- chainStorerMock.go
- chainStorerStub.go
- coreComponentsMock.go
- cryptoComponentsMock.go
- dataComponentsMock.go
- epochNotifierStub.go
- epochStartNotifierStub.go
- epochStartTriggerStub.go
- forkDetectorMock.go
- forkDetectorStub.go
- gasScheduleNotifierMock.go
- hardforkTriggerStub.go
- hasherMock.go
- headerIntegrityVerifierStub.go
- headerResolverStub.go
- headerSigVerifierStub.go
- headerValidatorStub.go
- indexerStub.go
- keyLoaderStub.go
- keyMock.go
- manualEpochStartNotifierStub.go
- marshalizerMock.go
- memDbMock.go
- miniBlocksProviderMock.go
- multiShardCoordinatorMock.go
- networkComponentsMock.go
- nodesCoordinatorMock.go
- nodesSetupStub.go
- p2pAntifloodHandlerStub.go
- peerBlackListCacher.go
- peerHonestyHandlerStub.go
- peerSignatureHandlerMock.go
- pendingMiniBlocksHandlerStub.go
- pointMock.go
- processComponentsStub.go
- pubKeyConverterStub.go
- redundancyHandlerStub.go
- resolversFinderStub.go
- rounderMock.go
- scalarMock.go
- shufflerMock.go
- singlesignerMock.go
- smartContractParserStub.go
- stateComponentsHolderStub.go
- statusHandlerUtilsFactoryMock.go
- statusHandlersUtilsMock.go
- suiteStub.go
- triesHolderStub.go
- txLogsProcessorMock.go
- validatorStatisticsProcessorStub.go
- validatorsProviderStub.go