Documentation
¶
Index ¶
- Constants
- Variables
- func AddTimestampSuffix(tag string) string
- func CreatePoolsHolder(numShards uint32, selfShard uint32) dataRetriever.PoolsHolder
- func CreatePoolsHolderWithTxPool(txPool dataRetriever.ShardedDataCacherNotifier) dataRetriever.PoolsHolder
- func CreateTxPool(numShards uint32, selfShard uint32) (dataRetriever.ShardedDataCacherNotifier, error)
- func GetGeneralConfig() config.Config
- func NewNonceHashConverterMock() *nonceHashConverterMock
- type AccountsStub
- func (as *AccountsStub) CancelPrune(rootHash []byte, identifier data.TriePruningIdentifier)
- func (as *AccountsStub) Close() error
- func (as *AccountsStub) Commit() ([]byte, error)
- func (as *AccountsStub) GetAllLeaves(rootHash []byte) (chan core.KeyValueHolder, error)
- func (as *AccountsStub) GetCode(codeHash []byte) []byte
- func (as *AccountsStub) GetExistingAccount(addressContainer []byte) (vmcommon.AccountHandler, error)
- func (as *AccountsStub) GetNumCheckpoints() uint32
- func (as *AccountsStub) GetTrie(codeHash []byte) (data.Trie, error)
- func (as *AccountsStub) IsInterfaceNil() bool
- func (as *AccountsStub) IsPruningEnabled() bool
- func (as *AccountsStub) JournalLen() int
- func (as *AccountsStub) LoadAccount(address []byte) (vmcommon.AccountHandler, error)
- func (as *AccountsStub) PruneTrie(rootHash []byte, identifier data.TriePruningIdentifier)
- func (as *AccountsStub) RecreateAllTries(rootHash []byte) (map[string]data.Trie, error)
- func (as *AccountsStub) RecreateTrie(rootHash []byte) error
- func (as *AccountsStub) RemoveAccount(addressContainer []byte) error
- func (as *AccountsStub) RevertToSnapshot(snapshot int) error
- func (as *AccountsStub) RootHash() ([]byte, error)
- func (as *AccountsStub) SaveAccount(account vmcommon.AccountHandler) error
- func (as *AccountsStub) SetStateCheckpoint(rootHash []byte)
- func (as *AccountsStub) SnapshotState(rootHash []byte)
- type AlarmSchedulerStub
- type AppStatusHandlerStub
- func (ashs *AppStatusHandlerStub) AddUint64(key string, value uint64)
- func (ashs *AppStatusHandlerStub) Close()
- func (ashs *AppStatusHandlerStub) Decrement(key string)
- func (ashs *AppStatusHandlerStub) Increment(key string)
- func (ashs *AppStatusHandlerStub) IsInterfaceNil() bool
- func (ashs *AppStatusHandlerStub) SetInt64Value(key string, value int64)
- func (ashs *AppStatusHandlerStub) SetStringValue(key string, value string)
- func (ashs *AppStatusHandlerStub) SetUInt64Value(key string, value uint64)
- type CacherMock
- func (cacher *CacherMock) Clear()
- func (cacher *CacherMock) Close() error
- func (cacher *CacherMock) Get(key []byte) (value interface{}, ok bool)
- func (cacher *CacherMock) Has(key []byte) bool
- func (cacher *CacherMock) HasOrAdd(key []byte, value interface{}, _ int) (has, added bool)
- func (cacher *CacherMock) IsInterfaceNil() bool
- func (cacher *CacherMock) Keys() [][]byte
- func (cacher *CacherMock) Len() int
- func (cacher *CacherMock) MaxSize() int
- func (cacher *CacherMock) Peek(key []byte) (value interface{}, ok bool)
- func (cacher *CacherMock) Put(key []byte, value interface{}, _ int) (evicted bool)
- func (cacher *CacherMock) RegisterHandler(handler func(key []byte, value interface{}), _ string)
- func (cacher *CacherMock) Remove(key []byte)
- func (cacher *CacherMock) SizeInBytesContained() uint64
- func (cacher *CacherMock) UnRegisterHandler(string)
- type CacherStub
- func (cacher *CacherStub) Clear()
- func (cacher *CacherStub) Close() error
- func (cacher *CacherStub) Get(key []byte) (value interface{}, ok bool)
- func (cacher *CacherStub) Has(key []byte) bool
- func (cacher *CacherStub) HasOrAdd(key []byte, value interface{}, sizeInBytes int) (has, added bool)
- func (cacher *CacherStub) IsInterfaceNil() bool
- func (cacher *CacherStub) Keys() [][]byte
- func (cacher *CacherStub) Len() int
- func (cacher *CacherStub) MaxSize() int
- func (cacher *CacherStub) Peek(key []byte) (value interface{}, ok bool)
- func (cacher *CacherStub) Put(key []byte, value interface{}, sizeInBytes int) (evicted bool)
- func (cacher *CacherStub) RegisterHandler(handler func(key []byte, value interface{}), _ string)
- func (cacher *CacherStub) Remove(key []byte)
- func (cacher *CacherStub) SizeInBytesContained() uint64
- func (cacher *CacherStub) UnRegisterHandler(id string)
- type CheckpointHashesHolderStub
- func (c *CheckpointHashesHolderStub) IsInterfaceNil() bool
- func (c *CheckpointHashesHolderStub) Put(rootHash []byte, hashes data.ModifiedHashes) bool
- func (c *CheckpointHashesHolderStub) Remove(hash []byte)
- func (c *CheckpointHashesHolderStub) RemoveCommitted(lastCommittedRootHash []byte)
- func (c *CheckpointHashesHolderStub) ShouldCommit(hash []byte) bool
- type CurrentEpochProviderStub
- type EpochStartTriggerStub
- func (e *EpochStartTriggerStub) Close() error
- func (e *EpochStartTriggerStub) Epoch() uint32
- func (e *EpochStartTriggerStub) EpochFinalityAttestingRound() uint64
- func (e *EpochStartTriggerStub) EpochStartMetaHdrHash() []byte
- func (e *EpochStartTriggerStub) EpochStartRound() uint64
- func (e *EpochStartTriggerStub) ForceEpochStart(round uint64)
- func (e *EpochStartTriggerStub) GetSavedStateKey() []byte
- func (e *EpochStartTriggerStub) IsEpochStart() bool
- func (e *EpochStartTriggerStub) IsInterfaceNil() bool
- func (e *EpochStartTriggerStub) LoadState(_ []byte) error
- func (e *EpochStartTriggerStub) MetaEpoch() uint32
- func (e *EpochStartTriggerStub) NotifyAll(_ data.HeaderHandler)
- func (e *EpochStartTriggerStub) RequestEpochStartIfNeeded(_ data.HeaderHandler)
- func (e *EpochStartTriggerStub) Revert(_ data.HeaderHandler)
- func (e *EpochStartTriggerStub) RevertStateToBlock(_ data.HeaderHandler) error
- func (e *EpochStartTriggerStub) SetAppStatusHandler(_ core.AppStatusHandler) error
- func (e *EpochStartTriggerStub) SetCurrentEpochStartRound(_ uint64)
- func (e *EpochStartTriggerStub) SetFinalityAttestingRound(_ uint64)
- func (e *EpochStartTriggerStub) SetProcessed(header data.HeaderHandler, _ data.BodyHandler)
- func (e *EpochStartTriggerStub) Update(round uint64, nonce uint64)
- type FallBackHeaderValidatorStub
- type HasherStub
- type HeaderHandlerStub
- func (hhs *HeaderHandlerStub) Clone() data.HeaderHandler
- func (hhs *HeaderHandlerStub) GetAccumulatedFees() *big.Int
- func (hhs *HeaderHandlerStub) GetChainID() []byte
- func (hhs *HeaderHandlerStub) GetDeveloperFees() *big.Int
- func (hhs *HeaderHandlerStub) GetEpoch() uint32
- func (hhs *HeaderHandlerStub) GetEpochStartMetaHash() []byte
- func (hhs *HeaderHandlerStub) GetLeaderSignature() []byte
- func (hhs *HeaderHandlerStub) GetMiniBlockHeadersHashes() [][]byte
- func (hhs *HeaderHandlerStub) GetMiniBlockHeadersWithDst(destId uint32) map[string]uint32
- func (hhs *HeaderHandlerStub) GetNonce() uint64
- func (hhs *HeaderHandlerStub) GetOrderedCrossMiniblocksWithDst(destId uint32) []*data.MiniBlockInfo
- func (hhs *HeaderHandlerStub) GetPrevHash() []byte
- func (hhs *HeaderHandlerStub) GetPrevRandSeed() []byte
- func (hhs *HeaderHandlerStub) GetPubKeysBitmap() []byte
- func (hhs *HeaderHandlerStub) GetRandSeed() []byte
- func (hhs *HeaderHandlerStub) GetReceiptsHash() []byte
- func (hhs *HeaderHandlerStub) GetReserved() []byte
- func (hhs *HeaderHandlerStub) GetRootHash() []byte
- func (hhs *HeaderHandlerStub) GetRound() uint64
- func (hhs *HeaderHandlerStub) GetShardID() uint32
- func (hhs *HeaderHandlerStub) GetSignature() []byte
- func (hhs *HeaderHandlerStub) GetSoftwareVersion() []byte
- func (hhs *HeaderHandlerStub) GetTimeStamp() uint64
- func (hhs *HeaderHandlerStub) GetTxCount() uint32
- func (hhs *HeaderHandlerStub) GetValidatorStatsRootHash() []byte
- func (hhs *HeaderHandlerStub) IsInterfaceNil() bool
- func (hhs *HeaderHandlerStub) IsStartOfEpochBlock() bool
- func (hhs *HeaderHandlerStub) SetAccumulatedFees(_ *big.Int)
- func (hhs *HeaderHandlerStub) SetChainID(_ []byte)
- func (hhs *HeaderHandlerStub) SetDeveloperFees(_ *big.Int)
- func (hhs *HeaderHandlerStub) SetEpoch(_ uint32)
- func (hhs *HeaderHandlerStub) SetLeaderSignature(_ []byte)
- func (hhs *HeaderHandlerStub) SetNonce(_ uint64)
- func (hhs *HeaderHandlerStub) SetPrevHash(_ []byte)
- func (hhs *HeaderHandlerStub) SetPrevRandSeed(_ []byte)
- func (hhs *HeaderHandlerStub) SetPubKeysBitmap(_ []byte)
- func (hhs *HeaderHandlerStub) SetRandSeed(_ []byte)
- func (hhs *HeaderHandlerStub) SetRootHash(_ []byte)
- func (hhs *HeaderHandlerStub) SetRound(_ uint64)
- func (hhs *HeaderHandlerStub) SetShardID(_ uint32)
- func (hhs *HeaderHandlerStub) SetSignature(_ []byte)
- func (hhs *HeaderHandlerStub) SetSoftwareVersion(_ []byte)
- func (hhs *HeaderHandlerStub) SetTimeStamp(_ uint64)
- func (hhs *HeaderHandlerStub) SetTxCount(_ uint32)
- func (hhs *HeaderHandlerStub) SetValidatorStatsRootHash(_ []byte)
- type ImportStartHandlerStub
- func (ish *ImportStartHandlerStub) IsAfterExportBeforeImport() bool
- func (ish *ImportStartHandlerStub) IsInterfaceNil() bool
- func (ish *ImportStartHandlerStub) ResetStartImport() error
- func (ish *ImportStartHandlerStub) SetStartImport() error
- func (ish *ImportStartHandlerStub) ShouldStartImport() bool
- type InterceptedDataStub
- func (ids *InterceptedDataStub) CheckValidity() error
- func (ids *InterceptedDataStub) Hash() []byte
- func (ids *InterceptedDataStub) Identifiers() [][]byte
- func (ids *InterceptedDataStub) IsForCurrentShard() bool
- func (ids *InterceptedDataStub) IsInterfaceNil() bool
- func (ids *InterceptedDataStub) String() string
- func (ids *InterceptedDataStub) Type() string
- type InterceptorStub
- func (is *InterceptorStub) Close() error
- func (is *InterceptorStub) IsInterfaceNil() bool
- func (is *InterceptorStub) ProcessReceivedMessage(message p2p.MessageP2P, _ core.PeerID) error
- func (is *InterceptorStub) RegisterHandler(handler func(topic string, hash []byte, data interface{}))
- func (is *InterceptorStub) SetInterceptedDebugHandler(debugger process.InterceptedDebugger) error
- type InterceptorsContainerStub
- func (ics *InterceptorsContainerStub) Add(key string, interceptor process.Interceptor) error
- func (ics *InterceptorsContainerStub) AddMultiple(keys []string, interceptors []process.Interceptor) error
- func (ics *InterceptorsContainerStub) Close() error
- func (ics *InterceptorsContainerStub) Get(topic string) (process.Interceptor, error)
- func (ics *InterceptorsContainerStub) IsInterfaceNil() bool
- func (ics *InterceptorsContainerStub) Iterate(handler func(key string, interceptor process.Interceptor) bool)
- func (ics *InterceptorsContainerStub) Len() int
- func (ics *InterceptorsContainerStub) Remove(key string)
- func (ics *InterceptorsContainerStub) Replace(key string, interceptor process.Interceptor) error
- type MarshalizerMock
- type MarshalizerStub
- type MessageSignVerifierMock
- type NodesSetupStub
- func (n *NodesSetupStub) AllInitialNodes() []sharding.GenesisNodeInfoHandler
- func (n *NodesSetupStub) GetAdaptivity() bool
- func (n *NodesSetupStub) GetHysteresis() float32
- func (n *NodesSetupStub) GetMetaConsensusGroupSize() uint32
- func (n *NodesSetupStub) GetRoundDuration() uint64
- func (n *NodesSetupStub) GetShardConsensusGroupSize() uint32
- func (n *NodesSetupStub) GetShardIDForPubKey(pubkey []byte) (uint32, error)
- func (n *NodesSetupStub) GetStartTime() int64
- func (n *NodesSetupStub) InitialEligibleNodesPubKeysForShard(shardId uint32) ([]string, error)
- func (n *NodesSetupStub) InitialNodesInfo() (map[uint32][]sharding.GenesisNodeInfoHandler, ...)
- func (n *NodesSetupStub) InitialNodesInfoForShard(shardId uint32) ([]sharding.GenesisNodeInfoHandler, []sharding.GenesisNodeInfoHandler, error)
- func (n *NodesSetupStub) InitialNodesPubKeys() map[uint32][]string
- func (n *NodesSetupStub) IsInterfaceNil() bool
- func (n *NodesSetupStub) MinNumberOfMetaNodes() uint32
- func (n *NodesSetupStub) MinNumberOfNodes() uint32
- func (n *NodesSetupStub) MinNumberOfNodesWithHysteresis() uint32
- func (n *NodesSetupStub) MinNumberOfShardNodes() uint32
- func (n *NodesSetupStub) NumberOfShards() uint32
- type OldDataCleanerProviderStub
- type PathManagerStub
- type PeerHonestyHandlerStub
- type PoolsHolderMock
- func (holder *PoolsHolderMock) CurrentBlockTxs() dataRetriever.TransactionCacher
- func (holder *PoolsHolderMock) Headers() dataRetriever.HeadersPool
- func (holder *PoolsHolderMock) IsInterfaceNil() bool
- func (holder *PoolsHolderMock) MiniBlocks() storage.Cacher
- func (holder *PoolsHolderMock) PeerChangesBlocks() storage.Cacher
- func (holder *PoolsHolderMock) RewardTransactions() dataRetriever.ShardedDataCacherNotifier
- func (holder *PoolsHolderMock) SetTransactions(pool dataRetriever.ShardedDataCacherNotifier)
- func (holder *PoolsHolderMock) SetUnsignedTransactions(pool dataRetriever.ShardedDataCacherNotifier)
- func (holder *PoolsHolderMock) SmartContracts() storage.Cacher
- func (holder *PoolsHolderMock) Transactions() dataRetriever.ShardedDataCacherNotifier
- func (holder *PoolsHolderMock) TrieNodes() storage.Cacher
- func (holder *PoolsHolderMock) TrieNodesChunks() storage.Cacher
- func (holder *PoolsHolderMock) UnsignedTransactions() dataRetriever.ShardedDataCacherNotifier
- type PoolsHolderStub
- func (holder *PoolsHolderStub) CurrentBlockTxs() dataRetriever.TransactionCacher
- func (holder *PoolsHolderStub) Headers() dataRetriever.HeadersPool
- func (holder *PoolsHolderStub) IsInterfaceNil() bool
- func (holder *PoolsHolderStub) MetaBlocks() storage.Cacher
- func (holder *PoolsHolderStub) MiniBlocks() storage.Cacher
- func (holder *PoolsHolderStub) PeerChangesBlocks() storage.Cacher
- func (holder *PoolsHolderStub) RewardTransactions() dataRetriever.ShardedDataCacherNotifier
- func (holder *PoolsHolderStub) SmartContracts() storage.Cacher
- func (holder *PoolsHolderStub) Transactions() dataRetriever.ShardedDataCacherNotifier
- func (holder *PoolsHolderStub) TrieNodes() storage.Cacher
- func (holder *PoolsHolderStub) TrieNodesChunks() storage.Cacher
- func (holder *PoolsHolderStub) UnsignedTransactions() dataRetriever.ShardedDataCacherNotifier
- type ProtoMarshalizerMock
- type PubkeyConverterMock
- type RaterMock
- func (rm *RaterMock) ComputeDecreaseProposer(shardId uint32, currentRating uint32, consecutiveMisses uint32) uint32
- func (rm *RaterMock) ComputeDecreaseValidator(shardId uint32, currentRating uint32) uint32
- func (rm *RaterMock) ComputeIncreaseProposer(shardId uint32, currentRating uint32) uint32
- func (rm *RaterMock) ComputeIncreaseValidator(shardId uint32, currentRating uint32) uint32
- func (rm *RaterMock) GetChance(rating uint32) uint32
- func (rm *RaterMock) GetRating(pk string) uint32
- func (rm *RaterMock) GetSignedBlocksThreshold() float32
- func (rm *RaterMock) GetStartRating() uint32
- func (rm *RaterMock) IsInterfaceNil() bool
- func (rm *RaterMock) RevertIncreaseValidator(shardId uint32, currentRating uint32, nrReverts uint32) uint32
- type RatingsInfoMock
- func (rd *RatingsInfoMock) IsInterfaceNil() bool
- func (rd *RatingsInfoMock) MaxRating() uint32
- func (rd *RatingsInfoMock) MetaChainRatingsStepHandler() process.RatingsStepHandler
- func (rd *RatingsInfoMock) MinRating() uint32
- func (rd *RatingsInfoMock) SelectionChances() []process.SelectionChance
- func (rd *RatingsInfoMock) ShardChainRatingsStepHandler() process.RatingsStepHandler
- func (rd *RatingsInfoMock) SignedBlocksThreshold() float32
- func (rd *RatingsInfoMock) StartRating() uint32
- type RequestHandlerStub
- func (rhs *RequestHandlerStub) CreateTrieNodeIdentifier(requestHash []byte, chunkIndex uint32) []byte
- func (rhs *RequestHandlerStub) GetNumPeersToQuery(key string) (int, int, error)
- func (rhs *RequestHandlerStub) IsInterfaceNil() bool
- func (rhs *RequestHandlerStub) RequestInterval() time.Duration
- func (rhs *RequestHandlerStub) RequestMetaHeader(hash []byte)
- func (rhs *RequestHandlerStub) RequestMetaHeaderByNonce(nonce uint64)
- func (rhs *RequestHandlerStub) RequestMiniBlock(destShardID uint32, miniblockHash []byte)
- func (rhs *RequestHandlerStub) RequestMiniBlocks(destShardID uint32, miniblocksHashes [][]byte)
- func (rhs *RequestHandlerStub) RequestRewardTransactions(destShardID uint32, txHashes [][]byte)
- func (rhs *RequestHandlerStub) RequestShardHeader(shardID uint32, hash []byte)
- func (rhs *RequestHandlerStub) RequestShardHeaderByNonce(shardID uint32, nonce uint64)
- func (rhs *RequestHandlerStub) RequestStartOfEpochMetaBlock(epoch uint32)
- func (rhs *RequestHandlerStub) RequestTransaction(destShardID uint32, txHashes [][]byte)
- func (rhs *RequestHandlerStub) RequestTrieNode(requestHash []byte, topic string, chunkIndex uint32)
- func (rhs *RequestHandlerStub) RequestTrieNodes(destShardID uint32, hashes [][]byte, topic string)
- func (rhs *RequestHandlerStub) RequestUnsignedTransactions(destShardID uint32, txHashes [][]byte)
- func (rhs *RequestHandlerStub) SetEpoch(_ uint32)
- func (rhs *RequestHandlerStub) SetNumPeersToQuery(key string, intra int, cross int) error
- type RequestedItemsHandlerStub
- type RewardTxProcessorMock
- type RoundHandlerMock
- func (rndm *RoundHandlerMock) BeforeGenesis() bool
- func (rndm *RoundHandlerMock) Index() int64
- func (rndm *RoundHandlerMock) IsInterfaceNil() bool
- func (rndm *RoundHandlerMock) RemainingTime(startTime time.Time, maxTime 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 SCProcessorMock
- func (sc *SCProcessorMock) ComputeTransactionType(tx data.TransactionHandler) (process.TransactionType, process.TransactionType)
- func (sc *SCProcessorMock) DeploySmartContract(tx data.TransactionHandler, acntSrc state.UserAccountHandler) (vmcommon.ReturnCode, error)
- func (sc *SCProcessorMock) ExecuteBuiltInFunction(tx data.TransactionHandler, acntSrc, acntDst state.UserAccountHandler) (vmcommon.ReturnCode, error)
- func (sc *SCProcessorMock) ExecuteSmartContractTransaction(tx data.TransactionHandler, acntSrc, acntDst state.UserAccountHandler) (vmcommon.ReturnCode, error)
- func (sc *SCProcessorMock) IsInterfaceNil() bool
- func (sc *SCProcessorMock) IsPayable(address []byte) (bool, error)
- func (sc *SCProcessorMock) ProcessIfError(acntSnd state.UserAccountHandler, txHash []byte, tx data.TransactionHandler, ...) error
- func (sc *SCProcessorMock) ProcessSmartContractResult(scr *smartContractResult.SmartContractResult) (vmcommon.ReturnCode, error)
- type ShardStatisticsMock
- func (ss *ShardStatisticsMock) AverageBlockTxCount() uint32
- func (ss *ShardStatisticsMock) AverageTPS() *big.Int
- func (ss *ShardStatisticsMock) CurrentBlockNonce() uint64
- func (ss *ShardStatisticsMock) IsInterfaceNil() bool
- func (ss *ShardStatisticsMock) LastBlockTxCount() uint32
- func (ss *ShardStatisticsMock) LiveTPS() float64
- func (ss *ShardStatisticsMock) PeakTPS() float64
- func (ss *ShardStatisticsMock) ShardID() uint32
- func (ss *ShardStatisticsMock) TotalProcessedTxCount() *big.Int
- type ShardedDataStub
- func (shardedData *ShardedDataStub) AddData(key []byte, data interface{}, sizeInBytes int, cacheID string)
- func (shardedData *ShardedDataStub) Clear()
- func (shardedData *ShardedDataStub) ClearShardStore(cacheID string)
- func (sd *ShardedDataStub) GetCounts() counting.CountsWithSize
- func (shardedData *ShardedDataStub) ImmunizeSetOfDataAgainstEviction(keys [][]byte, cacheID string)
- func (shardedData *ShardedDataStub) IsInterfaceNil() bool
- func (shardedData *ShardedDataStub) MergeShardStores(sourceCacheID, destCacheID string)
- func (shardedData *ShardedDataStub) RegisterOnAdded(handler func(key []byte, value interface{}))
- func (shardedData *ShardedDataStub) RemoveData(key []byte, cacheID string)
- func (shardedData *ShardedDataStub) RemoveDataFromAllShards(key []byte)
- func (shardedData *ShardedDataStub) RemoveSetOfDataFromPool(keys [][]byte, cacheID string)
- func (shardedData *ShardedDataStub) SearchFirstData(key []byte) (value interface{}, ok bool)
- func (shardedData *ShardedDataStub) ShardDataStore(cacheID string) storage.Cacher
- type ShardsCoordinatorMock
- func (scm *ShardsCoordinatorMock) CommunicationIdentifier(destShardID uint32) string
- func (scm *ShardsCoordinatorMock) ComputeId(address []byte) uint32
- func (scm *ShardsCoordinatorMock) IsInterfaceNil() bool
- func (scm *ShardsCoordinatorMock) NumberOfShards() uint32
- func (scm *ShardsCoordinatorMock) SameShard(_, _ []byte) bool
- func (scm *ShardsCoordinatorMock) SelfId() uint32
- func (scm *ShardsCoordinatorMock) SetNoShards(noShards uint32)
- func (scm *ShardsCoordinatorMock) SetSelfId(_ uint32) error
- type SmartContractResultsProcessorMock
- type StateComponentsMock
- func (scm *StateComponentsMock) AccountsAdapter() state.AccountsAdapter
- func (scm *StateComponentsMock) AccountsAdapterAPI() state.AccountsAdapter
- func (scm *StateComponentsMock) CheckSubcomponents() error
- func (scm *StateComponentsMock) Close() error
- func (scm *StateComponentsMock) Create() error
- func (scm *StateComponentsMock) IsInterfaceNil() bool
- func (scm *StateComponentsMock) PeerAccounts() state.AccountsAdapter
- func (scm *StateComponentsMock) TrieStorageManagers() map[string]data.StorageManager
- func (scm *StateComponentsMock) TriesContainer() state.TriesHolder
- type StorageManagerStub
- func (sms *StorageManagerStub) AddDirtyCheckpointHashes(rootHash []byte, hashes data.ModifiedHashes) bool
- func (sms *StorageManagerStub) Close() error
- func (sms *StorageManagerStub) Database() data.DBWriteCacher
- func (sms *StorageManagerStub) EnterPruningBufferingMode()
- func (sms *StorageManagerStub) ExitPruningBufferingMode()
- func (sms *StorageManagerStub) GetSnapshotDbBatchDelay() int
- func (sms *StorageManagerStub) GetSnapshotThatContainsHash(d []byte) data.SnapshotDbHandler
- func (sms *StorageManagerStub) IsInterfaceNil() bool
- func (sms *StorageManagerStub) IsPruningBlocked() bool
- func (sms *StorageManagerStub) IsPruningEnabled() bool
- func (sms *StorageManagerStub) Remove(hash []byte) error
- func (sms *StorageManagerStub) SetCheckpoint(rootHash []byte, leavesChan chan core.KeyValueHolder)
- func (sms *StorageManagerStub) TakeSnapshot(rootHash []byte, newDB bool, leavesChan chan core.KeyValueHolder)
- type StorerStub
- func (ss *StorerStub) ClearCache()
- func (ss *StorerStub) Close() error
- func (ss *StorerStub) DestroyUnit() error
- func (ss *StorerStub) Get(key []byte) ([]byte, error)
- func (ss *StorerStub) GetBulkFromEpoch(keys [][]byte, epoch uint32) (map[string][]byte, error)
- func (ss *StorerStub) GetFromEpoch(key []byte, epoch uint32) ([]byte, error)
- func (ss *StorerStub) GetOldestEpoch() (uint32, error)
- func (ss *StorerStub) Has(key []byte) error
- func (ss *StorerStub) IsInterfaceNil() bool
- func (ss *StorerStub) Put(key, data []byte) error
- func (ss *StorerStub) PutInEpoch(key, data []byte, epoch uint32) error
- func (ss *StorerStub) RangeKeys(handler func(key []byte, val []byte) bool)
- func (ss *StorerStub) Remove(key []byte) error
- func (ss *StorerStub) SearchFirst(key []byte) ([]byte, error)
- type SyncTimerStub
- type TimeCacheStub
- type TpsBenchmarkMock
- func (s *TpsBenchmarkMock) ActiveNodes() uint32
- func (s *TpsBenchmarkMock) AverageBlockTxCount() *big.Int
- func (s *TpsBenchmarkMock) BlockNumber() uint64
- func (s *TpsBenchmarkMock) IsInterfaceNil() bool
- func (s *TpsBenchmarkMock) LastBlockTxCount() uint32
- func (s *TpsBenchmarkMock) LiveTPS() float64
- func (s *TpsBenchmarkMock) NrOfShards() uint32
- func (s *TpsBenchmarkMock) PeakTPS() float64
- func (s *TpsBenchmarkMock) RoundNumber() uint64
- func (s *TpsBenchmarkMock) RoundTime() uint64
- func (s *TpsBenchmarkMock) ShardStatistic(shardID uint32) statistics.ShardStatistic
- func (s *TpsBenchmarkMock) ShardStatistics() map[uint32]statistics.ShardStatistic
- func (s *TpsBenchmarkMock) TotalProcessedTxCount() *big.Int
- func (s *TpsBenchmarkMock) Update(mb data.HeaderHandler)
- func (s *TpsBenchmarkMock) UpdateWithShardStats(mb *block.MetaBlock)
- type TrieStub
- func (ts *TrieStub) Close() error
- func (ts *TrieStub) Commit() error
- func (ts *TrieStub) Delete(key []byte) error
- func (ts *TrieStub) Get(key []byte) ([]byte, error)
- func (ts *TrieStub) GetAllHashes() ([][]byte, error)
- func (ts *TrieStub) GetAllLeavesOnChannel(rootHash []byte) (chan core.KeyValueHolder, error)
- func (ts *TrieStub) GetDirtyHashes() (data.ModifiedHashes, error)
- func (ts *TrieStub) GetNumNodes() data.NumNodesDTO
- func (ts *TrieStub) GetObsoleteHashes() [][]byte
- func (ts *TrieStub) GetOldRoot() []byte
- func (ts *TrieStub) GetProof(key []byte) ([][]byte, error)
- func (ts *TrieStub) GetSerializedNode(bytes []byte) ([]byte, error)
- func (ts *TrieStub) GetSerializedNodes(hash []byte, maxBuffToSend uint64) ([][]byte, uint64, error)
- func (ts *TrieStub) GetStorageManager() data.StorageManager
- func (ts *TrieStub) IsInterfaceNil() bool
- func (ts *TrieStub) Recreate(root []byte) (data.Trie, error)
- func (ts *TrieStub) RootHash() ([]byte, error)
- func (ts *TrieStub) SetNewHashes(_ data.ModifiedHashes)
- func (ts *TrieStub) String() string
- func (ts *TrieStub) Update(key, value []byte) error
- func (ts *TrieStub) VerifyProof(key []byte, proof [][]byte) (bool, error)
- type TxProcessorMock
- func (etm *TxProcessorMock) IsInterfaceNil() bool
- func (etm *TxProcessorMock) ProcessSmartContractResult(scr *smartContractResult.SmartContractResult) (vmcommon.ReturnCode, error)
- func (etm *TxProcessorMock) ProcessTransaction(transaction *transaction.Transaction) (vmcommon.ReturnCode, error)
- func (etm *TxProcessorMock) SetBalancesToTrie(accBalance map[string]*big.Int) (rootHash []byte, err error)
- type TxProcessorStub
- type TxTypeHandlerMock
- type UnsignedTxHandlerStub
- func (ut *UnsignedTxHandlerStub) AddRewardTxFromBlock(tx data.TransactionHandler)
- func (ut *UnsignedTxHandlerStub) CleanProcessedUTxs()
- func (ut *UnsignedTxHandlerStub) CreateAllUTxs() []data.TransactionHandler
- func (ut *UnsignedTxHandlerStub) CreateBlockStarted()
- func (ut *UnsignedTxHandlerStub) GetAccumulatedFees() *big.Int
- func (ut *UnsignedTxHandlerStub) GetDeveloperFees() *big.Int
- func (ut *UnsignedTxHandlerStub) IsInterfaceNil() bool
- func (ut *UnsignedTxHandlerStub) ProcessTransactionFee(cost *big.Int, devFee *big.Int, txHash []byte)
- func (ut *UnsignedTxHandlerStub) RevertFees(txHashes [][]byte)
- func (ut *UnsignedTxHandlerStub) VerifyCreatedUTxs() error
- type WatchdogMock
- type WhiteListHandlerStub
- func (w *WhiteListHandlerStub) Add(keys [][]byte)
- func (w *WhiteListHandlerStub) IsForCurrentShard(interceptedData process.InterceptedData) bool
- func (w *WhiteListHandlerStub) IsInterfaceNil() bool
- func (w *WhiteListHandlerStub) IsWhiteListed(interceptedData process.InterceptedData) bool
- func (w *WhiteListHandlerStub) IsWhiteListedAtLeastOne(identifiers [][]byte) bool
- func (w *WhiteListHandlerStub) Remove(keys [][]byte)
Constants ¶
const HashSize = 32
HashSize holds the size of a typical hash used by the protocol
Variables ¶
var ErrMockMarshalizer = errors.New("MarshalizerMock generic error")
ErrMockMarshalizer -
Functions ¶
func AddTimestampSuffix ¶ added in v1.0.147
AddTimestampSuffix -
func CreatePoolsHolder ¶
func CreatePoolsHolder(numShards uint32, selfShard uint32) dataRetriever.PoolsHolder
CreatePoolsHolder -
func CreatePoolsHolderWithTxPool ¶
func CreatePoolsHolderWithTxPool(txPool dataRetriever.ShardedDataCacherNotifier) dataRetriever.PoolsHolder
CreatePoolsHolderWithTxPool -
func CreateTxPool ¶
func CreateTxPool(numShards uint32, selfShard uint32) (dataRetriever.ShardedDataCacherNotifier, error)
CreateTxPool -
func GetGeneralConfig ¶
GetGeneralConfig returns the common configuration used for testing
func NewNonceHashConverterMock ¶ added in v1.2.0
func NewNonceHashConverterMock() *nonceHashConverterMock
NewNonceHashConverterMock -
Types ¶
type AccountsStub ¶ added in v1.2.4
type AccountsStub struct {
GetExistingAccountCalled func(addressContainer []byte) (vmcommon.AccountHandler, error)
LoadAccountCalled func(container []byte) (vmcommon.AccountHandler, error)
SaveAccountCalled func(account vmcommon.AccountHandler) error
RemoveAccountCalled func(addressContainer []byte) error
CommitCalled func() ([]byte, error)
JournalLenCalled func() int
RevertToSnapshotCalled func(snapshot int) error
RootHashCalled func() ([]byte, error)
RecreateTrieCalled func(rootHash []byte) error
PruneTrieCalled func(rootHash []byte, identifier data.TriePruningIdentifier)
CancelPruneCalled func(rootHash []byte, identifier data.TriePruningIdentifier)
SnapshotStateCalled func(rootHash []byte)
SetStateCheckpointCalled func(rootHash []byte)
IsPruningEnabledCalled func() bool
GetAllLeavesCalled func(rootHash []byte) (chan core.KeyValueHolder, error)
RecreateAllTriesCalled func(rootHash []byte) (map[string]data.Trie, error)
GetNumCheckpointsCalled func() uint32
GetCodeCalled func([]byte) []byte
GetTrieCalled func([]byte) (data.Trie, error)
}
AccountsStub -
func (*AccountsStub) CancelPrune ¶ added in v1.2.4
func (as *AccountsStub) CancelPrune(rootHash []byte, identifier data.TriePruningIdentifier)
CancelPrune -
func (*AccountsStub) Commit ¶ added in v1.2.4
func (as *AccountsStub) Commit() ([]byte, error)
Commit -
func (*AccountsStub) GetAllLeaves ¶ added in v1.2.4
func (as *AccountsStub) GetAllLeaves(rootHash []byte) (chan core.KeyValueHolder, error)
GetAllLeaves -
func (*AccountsStub) GetCode ¶ added in v1.2.4
func (as *AccountsStub) GetCode(codeHash []byte) []byte
GetCode -
func (*AccountsStub) GetExistingAccount ¶ added in v1.2.4
func (as *AccountsStub) GetExistingAccount(addressContainer []byte) (vmcommon.AccountHandler, error)
GetExistingAccount -
func (*AccountsStub) GetNumCheckpoints ¶ added in v1.2.4
func (as *AccountsStub) GetNumCheckpoints() uint32
GetNumCheckpoints -
func (*AccountsStub) GetTrie ¶ added in v1.2.4
func (as *AccountsStub) GetTrie(codeHash []byte) (data.Trie, error)
GetTrie -
func (*AccountsStub) IsInterfaceNil ¶ added in v1.2.4
func (as *AccountsStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*AccountsStub) IsPruningEnabled ¶ added in v1.2.4
func (as *AccountsStub) IsPruningEnabled() bool
IsPruningEnabled -
func (*AccountsStub) JournalLen ¶ added in v1.2.4
func (as *AccountsStub) JournalLen() int
JournalLen -
func (*AccountsStub) LoadAccount ¶ added in v1.2.4
func (as *AccountsStub) LoadAccount(address []byte) (vmcommon.AccountHandler, error)
LoadAccount -
func (*AccountsStub) PruneTrie ¶ added in v1.2.4
func (as *AccountsStub) PruneTrie(rootHash []byte, identifier data.TriePruningIdentifier)
PruneTrie -
func (*AccountsStub) RecreateAllTries ¶ added in v1.2.4
RecreateAllTries -
func (*AccountsStub) RecreateTrie ¶ added in v1.2.4
func (as *AccountsStub) RecreateTrie(rootHash []byte) error
RecreateTrie -
func (*AccountsStub) RemoveAccount ¶ added in v1.2.4
func (as *AccountsStub) RemoveAccount(addressContainer []byte) error
RemoveAccount -
func (*AccountsStub) RevertToSnapshot ¶ added in v1.2.4
func (as *AccountsStub) RevertToSnapshot(snapshot int) error
RevertToSnapshot -
func (*AccountsStub) RootHash ¶ added in v1.2.4
func (as *AccountsStub) RootHash() ([]byte, error)
RootHash -
func (*AccountsStub) SaveAccount ¶ added in v1.2.4
func (as *AccountsStub) SaveAccount(account vmcommon.AccountHandler) error
SaveAccount -
func (*AccountsStub) SetStateCheckpoint ¶ added in v1.2.4
func (as *AccountsStub) SetStateCheckpoint(rootHash []byte)
SetStateCheckpoint -
func (*AccountsStub) SnapshotState ¶ added in v1.2.4
func (as *AccountsStub) SnapshotState(rootHash []byte)
SnapshotState -
type AlarmSchedulerStub ¶ added in v1.2.0
type AlarmSchedulerStub struct {
AddCalled func(func(alarmID string), time.Duration, string)
CancelCalled func(string)
CloseCalled func()
ResetCalled func(string)
}
AlarmSchedulerStub -
func (*AlarmSchedulerStub) Add ¶ added in v1.2.0
func (a *AlarmSchedulerStub) Add(callback func(alarmID string), duration time.Duration, alarmID string)
Add -
func (*AlarmSchedulerStub) Cancel ¶ added in v1.2.0
func (a *AlarmSchedulerStub) Cancel(alarmID string)
Cancel -
func (*AlarmSchedulerStub) IsInterfaceNil ¶ added in v1.2.0
func (a *AlarmSchedulerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*AlarmSchedulerStub) Reset ¶ added in v1.2.0
func (a *AlarmSchedulerStub) Reset(alarmID string)
Reset -
type AppStatusHandlerStub ¶ added in v1.2.0
type AppStatusHandlerStub struct {
AddUint64Handler func(key string, value uint64)
IncrementHandler func(key string)
DecrementHandler func(key string)
SetUInt64ValueHandler func(key string, value uint64)
SetInt64ValueHandler func(key string, value int64)
SetStringValueHandler func(key string, value string)
CloseHandler func()
}
AppStatusHandlerStub is a stub implementation of AppStatusHandler
func (*AppStatusHandlerStub) AddUint64 ¶ added in v1.2.0
func (ashs *AppStatusHandlerStub) AddUint64(key string, value uint64)
AddUint64 will call the handler of the stub for incrementing
func (*AppStatusHandlerStub) Close ¶ added in v1.2.0
func (ashs *AppStatusHandlerStub) Close()
Close will call the handler of the stub for closing
func (*AppStatusHandlerStub) Decrement ¶ added in v1.2.0
func (ashs *AppStatusHandlerStub) Decrement(key string)
Decrement will call the handler of the stub for decrementing
func (*AppStatusHandlerStub) Increment ¶ added in v1.2.0
func (ashs *AppStatusHandlerStub) Increment(key string)
Increment will call the handler of the stub for incrementing
func (*AppStatusHandlerStub) IsInterfaceNil ¶ added in v1.2.0
func (ashs *AppStatusHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*AppStatusHandlerStub) SetInt64Value ¶ added in v1.2.0
func (ashs *AppStatusHandlerStub) SetInt64Value(key string, value int64)
SetInt64Value will call the handler of the stub for setting an int64 value
func (*AppStatusHandlerStub) SetStringValue ¶ added in v1.2.0
func (ashs *AppStatusHandlerStub) SetStringValue(key string, value string)
SetStringValue will call the handler of the stub for setting an string value
func (*AppStatusHandlerStub) SetUInt64Value ¶ added in v1.2.0
func (ashs *AppStatusHandlerStub) SetUInt64Value(key string, value uint64)
SetUInt64Value will call the handler of the stub for setting an uint64 value
type CacherMock ¶
type CacherMock struct {
// contains filtered or unexported fields
}
CacherMock -
func (*CacherMock) Get ¶
func (cacher *CacherMock) Get(key []byte) (value interface{}, ok bool)
Get -
func (*CacherMock) HasOrAdd ¶
func (cacher *CacherMock) HasOrAdd(key []byte, value interface{}, _ int) (has, added bool)
HasOrAdd -
func (*CacherMock) IsInterfaceNil ¶
func (cacher *CacherMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*CacherMock) Peek ¶
func (cacher *CacherMock) Peek(key []byte) (value interface{}, ok bool)
Peek -
func (*CacherMock) Put ¶
func (cacher *CacherMock) Put(key []byte, value interface{}, _ int) (evicted bool)
Put -
func (*CacherMock) RegisterHandler ¶
func (cacher *CacherMock) RegisterHandler(handler func(key []byte, value interface{}), _ string)
RegisterHandler -
func (*CacherMock) SizeInBytesContained ¶ added in v1.1.45
func (cacher *CacherMock) SizeInBytesContained() uint64
SizeInBytesContained -
func (*CacherMock) UnRegisterHandler ¶
func (cacher *CacherMock) UnRegisterHandler(string)
UnRegisterHandler -
type CacherStub ¶
type CacherStub struct {
ClearCalled func()
PutCalled func(key []byte, value interface{}, sizeInBytes int) (evicted bool)
GetCalled func(key []byte) (value interface{}, ok bool)
HasCalled func(key []byte) bool
PeekCalled func(key []byte) (value interface{}, ok bool)
HasOrAddCalled func(key []byte, value interface{}, sizeInBytes int) (has, added bool)
RemoveCalled func(key []byte)
RemoveOldestCalled func()
KeysCalled func() [][]byte
LenCalled func() int
MaxSizeCalled func() int
RegisterHandlerCalled func(func(key []byte, value interface{}))
UnRegisterHandlerCalled func(id string)
}
CacherStub -
func (*CacherStub) Get ¶
func (cacher *CacherStub) Get(key []byte) (value interface{}, ok bool)
Get -
func (*CacherStub) HasOrAdd ¶
func (cacher *CacherStub) HasOrAdd(key []byte, value interface{}, sizeInBytes int) (has, added bool)
HasOrAdd -
func (*CacherStub) IsInterfaceNil ¶
func (cacher *CacherStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*CacherStub) Peek ¶
func (cacher *CacherStub) Peek(key []byte) (value interface{}, ok bool)
Peek -
func (*CacherStub) Put ¶
func (cacher *CacherStub) Put(key []byte, value interface{}, sizeInBytes int) (evicted bool)
Put -
func (*CacherStub) RegisterHandler ¶
func (cacher *CacherStub) RegisterHandler(handler func(key []byte, value interface{}), _ string)
RegisterHandler -
func (*CacherStub) SizeInBytesContained ¶ added in v1.1.45
func (cacher *CacherStub) SizeInBytesContained() uint64
SizeInBytesContained -
func (*CacherStub) UnRegisterHandler ¶
func (cacher *CacherStub) UnRegisterHandler(id string)
UnRegisterHandler -
type CheckpointHashesHolderStub ¶ added in v1.2.4
type CheckpointHashesHolderStub struct {
PutCalled func([]byte, data.ModifiedHashes) bool
RemoveCommittedCalled func([]byte)
RemoveCalled func([]byte)
ShouldCommitCalled func([]byte) bool
}
CheckpointHashesHolderStub -
func (*CheckpointHashesHolderStub) IsInterfaceNil ¶ added in v1.2.4
func (c *CheckpointHashesHolderStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*CheckpointHashesHolderStub) Put ¶ added in v1.2.4
func (c *CheckpointHashesHolderStub) Put(rootHash []byte, hashes data.ModifiedHashes) bool
Put -
func (*CheckpointHashesHolderStub) Remove ¶ added in v1.2.4
func (c *CheckpointHashesHolderStub) Remove(hash []byte)
Remove -
func (*CheckpointHashesHolderStub) RemoveCommitted ¶ added in v1.2.4
func (c *CheckpointHashesHolderStub) RemoveCommitted(lastCommittedRootHash []byte)
RemoveCommitted -
func (*CheckpointHashesHolderStub) ShouldCommit ¶ added in v1.2.4
func (c *CheckpointHashesHolderStub) ShouldCommit(hash []byte) bool
ShouldCommit -
type CurrentEpochProviderStub ¶ added in v1.2.4
CurrentEpochProviderStub -
func (*CurrentEpochProviderStub) EpochIsActiveInNetwork ¶ added in v1.2.4
func (c *CurrentEpochProviderStub) EpochIsActiveInNetwork(epoch uint32) bool
EpochIsActiveInNetwork -
func (*CurrentEpochProviderStub) IsInterfaceNil ¶ added in v1.2.4
func (c *CurrentEpochProviderStub) IsInterfaceNil() bool
IsInterfaceNil -
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
EpochFinalityAttestingRoundCalled func() uint64
EpochStartMetaHdrHashCalled func() []byte
}
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) 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) 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) 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) Update ¶ added in v1.2.0
func (e *EpochStartTriggerStub) Update(round uint64, nonce uint64)
Update -
type FallBackHeaderValidatorStub ¶ added in v1.1.3
type FallBackHeaderValidatorStub struct {
ShouldApplyFallbackValidationCalled func(headerHandler data.HeaderHandler) bool
}
FallBackHeaderValidatorStub -
func (*FallBackHeaderValidatorStub) IsInterfaceNil ¶ added in v1.1.3
func (fhvs *FallBackHeaderValidatorStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*FallBackHeaderValidatorStub) ShouldApplyFallbackValidation ¶ added in v1.1.3
func (fhvs *FallBackHeaderValidatorStub) ShouldApplyFallbackValidation(headerHandler data.HeaderHandler) bool
ShouldApplyFallbackValidation -
type HasherStub ¶ added in v1.2.0
type HasherStub struct {
ComputeCalled func(s string) []byte
EmptyHashCalled func() []byte
SizeCalled func() int
}
HasherStub -
func (*HasherStub) Compute ¶ added in v1.2.0
func (hash *HasherStub) Compute(s string) []byte
Compute -
func (*HasherStub) EmptyHash ¶ added in v1.2.0
func (hash *HasherStub) EmptyHash() []byte
EmptyHash -
func (*HasherStub) IsInterfaceNil ¶ added in v1.2.0
func (hash *HasherStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type HeaderHandlerStub ¶ added in v1.2.0
type HeaderHandlerStub struct {
EpochField uint32
TimestampField uint64
GetMiniBlockHeadersWithDstCalled func(destId uint32) map[string]uint32
GetOrderedCrossMiniblocksWithDstCalled func(destId uint32) []*data.MiniBlockInfo
GetPubKeysBitmapCalled func() []byte
GetSignatureCalled func() []byte
GetRootHashCalled func() []byte
GetRandSeedCalled func() []byte
GetPrevRandSeedCalled func() []byte
GetPrevHashCalled func() []byte
CloneCalled func() data.HeaderHandler
GetChainIDCalled func() []byte
CheckChainIDCalled func(reference []byte) error
GetReservedCalled func() []byte
IsStartOfEpochBlockCalled func() bool
}
HeaderHandlerStub -
func (*HeaderHandlerStub) Clone ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) Clone() data.HeaderHandler
Clone -
func (*HeaderHandlerStub) GetAccumulatedFees ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) GetAccumulatedFees() *big.Int
GetAccumulatedFees -
func (*HeaderHandlerStub) GetChainID ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) GetChainID() []byte
GetChainID -
func (*HeaderHandlerStub) GetDeveloperFees ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) GetDeveloperFees() *big.Int
GetDeveloperFees -
func (*HeaderHandlerStub) GetEpoch ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) GetEpoch() uint32
GetEpoch -
func (*HeaderHandlerStub) GetEpochStartMetaHash ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) GetEpochStartMetaHash() []byte
GetEpochStartMetaHash -
func (*HeaderHandlerStub) GetLeaderSignature ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) GetLeaderSignature() []byte
GetLeaderSignature -
func (*HeaderHandlerStub) GetMiniBlockHeadersHashes ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) GetMiniBlockHeadersHashes() [][]byte
GetMiniBlockHeadersHashes -
func (*HeaderHandlerStub) GetMiniBlockHeadersWithDst ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) GetMiniBlockHeadersWithDst(destId uint32) map[string]uint32
GetMiniBlockHeadersWithDst -
func (*HeaderHandlerStub) GetNonce ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) GetNonce() uint64
GetNonce -
func (*HeaderHandlerStub) GetOrderedCrossMiniblocksWithDst ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) GetOrderedCrossMiniblocksWithDst(destId uint32) []*data.MiniBlockInfo
GetOrderedCrossMiniblocksWithDst -
func (*HeaderHandlerStub) GetPrevHash ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) GetPrevHash() []byte
GetPrevHash -
func (*HeaderHandlerStub) GetPrevRandSeed ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) GetPrevRandSeed() []byte
GetPrevRandSeed -
func (*HeaderHandlerStub) GetPubKeysBitmap ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) GetPubKeysBitmap() []byte
GetPubKeysBitmap -
func (*HeaderHandlerStub) GetRandSeed ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) GetRandSeed() []byte
GetRandSeed -
func (*HeaderHandlerStub) GetReceiptsHash ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) GetReceiptsHash() []byte
GetReceiptsHash -
func (*HeaderHandlerStub) GetReserved ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) GetReserved() []byte
GetReserved -
func (*HeaderHandlerStub) GetRootHash ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) GetRootHash() []byte
GetRootHash -
func (*HeaderHandlerStub) GetRound ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) GetRound() uint64
GetRound -
func (*HeaderHandlerStub) GetShardID ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) GetShardID() uint32
GetShardID -
func (*HeaderHandlerStub) GetSignature ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) GetSignature() []byte
GetSignature -
func (*HeaderHandlerStub) GetSoftwareVersion ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) GetSoftwareVersion() []byte
GetSoftwareVersion -
func (*HeaderHandlerStub) GetTimeStamp ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) GetTimeStamp() uint64
GetTimeStamp -
func (*HeaderHandlerStub) GetTxCount ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) GetTxCount() uint32
GetTxCount -
func (*HeaderHandlerStub) GetValidatorStatsRootHash ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) GetValidatorStatsRootHash() []byte
GetValidatorStatsRootHash -
func (*HeaderHandlerStub) IsInterfaceNil ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*HeaderHandlerStub) IsStartOfEpochBlock ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) IsStartOfEpochBlock() bool
IsStartOfEpochBlock -
func (*HeaderHandlerStub) SetAccumulatedFees ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) SetAccumulatedFees(_ *big.Int)
SetAccumulatedFees -
func (*HeaderHandlerStub) SetChainID ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) SetChainID(_ []byte)
SetChainID -
func (*HeaderHandlerStub) SetDeveloperFees ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) SetDeveloperFees(_ *big.Int)
SetDeveloperFees -
func (*HeaderHandlerStub) SetEpoch ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) SetEpoch(_ uint32)
SetEpoch -
func (*HeaderHandlerStub) SetLeaderSignature ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) SetLeaderSignature(_ []byte)
SetLeaderSignature -
func (*HeaderHandlerStub) SetNonce ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) SetNonce(_ uint64)
SetNonce -
func (*HeaderHandlerStub) SetPrevHash ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) SetPrevHash(_ []byte)
SetPrevHash -
func (*HeaderHandlerStub) SetPrevRandSeed ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) SetPrevRandSeed(_ []byte)
SetPrevRandSeed -
func (*HeaderHandlerStub) SetPubKeysBitmap ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) SetPubKeysBitmap(_ []byte)
SetPubKeysBitmap -
func (*HeaderHandlerStub) SetRandSeed ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) SetRandSeed(_ []byte)
SetRandSeed -
func (*HeaderHandlerStub) SetRootHash ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) SetRootHash(_ []byte)
SetRootHash -
func (*HeaderHandlerStub) SetRound ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) SetRound(_ uint64)
SetRound -
func (*HeaderHandlerStub) SetShardID ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) SetShardID(_ uint32)
SetShardID -
func (*HeaderHandlerStub) SetSignature ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) SetSignature(_ []byte)
SetSignature -
func (*HeaderHandlerStub) SetSoftwareVersion ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) SetSoftwareVersion(_ []byte)
SetSoftwareVersion -
func (*HeaderHandlerStub) SetTimeStamp ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) SetTimeStamp(_ uint64)
SetTimeStamp -
func (*HeaderHandlerStub) SetTxCount ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) SetTxCount(_ uint32)
SetTxCount -
func (*HeaderHandlerStub) SetValidatorStatsRootHash ¶ added in v1.2.0
func (hhs *HeaderHandlerStub) SetValidatorStatsRootHash(_ []byte)
SetValidatorStatsRootHash -
type ImportStartHandlerStub ¶ added in v1.2.0
type ImportStartHandlerStub struct {
SetStartImportCalled func() error
ResetStartImportCalled func() error
IsAfterExportBeforeImportCalled func() bool
ShouldStartImportCalled func() bool
}
ImportStartHandlerStub -
func (*ImportStartHandlerStub) IsAfterExportBeforeImport ¶ added in v1.2.0
func (ish *ImportStartHandlerStub) IsAfterExportBeforeImport() bool
IsAfterExportBeforeImport -
func (*ImportStartHandlerStub) IsInterfaceNil ¶ added in v1.2.0
func (ish *ImportStartHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*ImportStartHandlerStub) ResetStartImport ¶ added in v1.2.0
func (ish *ImportStartHandlerStub) ResetStartImport() error
ResetStartImport -
func (*ImportStartHandlerStub) SetStartImport ¶ added in v1.2.0
func (ish *ImportStartHandlerStub) SetStartImport() error
SetStartImport -
func (*ImportStartHandlerStub) ShouldStartImport ¶ added in v1.2.0
func (ish *ImportStartHandlerStub) ShouldStartImport() bool
ShouldStartImport -
type InterceptedDataStub ¶ added in v1.2.4
type InterceptedDataStub struct {
CheckValidityCalled func() error
IsForCurrentShardCalled func() bool
HashCalled func() []byte
TypeCalled func() string
IdentifiersCalled func() [][]byte
StringCalled func() string
}
InterceptedDataStub -
func (*InterceptedDataStub) CheckValidity ¶ added in v1.2.4
func (ids *InterceptedDataStub) CheckValidity() error
CheckValidity -
func (*InterceptedDataStub) Hash ¶ added in v1.2.4
func (ids *InterceptedDataStub) Hash() []byte
Hash -
func (*InterceptedDataStub) Identifiers ¶ added in v1.2.4
func (ids *InterceptedDataStub) Identifiers() [][]byte
Identifiers -
func (*InterceptedDataStub) IsForCurrentShard ¶ added in v1.2.4
func (ids *InterceptedDataStub) IsForCurrentShard() bool
IsForCurrentShard -
func (*InterceptedDataStub) IsInterfaceNil ¶ added in v1.2.4
func (ids *InterceptedDataStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*InterceptedDataStub) String ¶ added in v1.2.4
func (ids *InterceptedDataStub) String() string
String -
func (*InterceptedDataStub) Type ¶ added in v1.2.4
func (ids *InterceptedDataStub) Type() string
Type -
type InterceptorStub ¶ added in v1.2.4
type InterceptorStub struct {
ProcessReceivedMessageCalled func(message p2p.MessageP2P) error
SetInterceptedDebugHandlerCalled func(debugger process.InterceptedDebugger) error
RegisterHandlerCalled func(handler func(topic string, hash []byte, data interface{}))
CloseCalled func() error
}
InterceptorStub -
func (*InterceptorStub) IsInterfaceNil ¶ added in v1.2.4
func (is *InterceptorStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*InterceptorStub) ProcessReceivedMessage ¶ added in v1.2.4
func (is *InterceptorStub) ProcessReceivedMessage(message p2p.MessageP2P, _ core.PeerID) error
ProcessReceivedMessage -
func (*InterceptorStub) RegisterHandler ¶ added in v1.2.4
func (is *InterceptorStub) RegisterHandler(handler func(topic string, hash []byte, data interface{}))
RegisterHandler -
func (*InterceptorStub) SetInterceptedDebugHandler ¶ added in v1.2.4
func (is *InterceptorStub) SetInterceptedDebugHandler(debugger process.InterceptedDebugger) error
SetInterceptedDebugHandler -
type InterceptorsContainerStub ¶ added in v1.2.4
type InterceptorsContainerStub struct {
IterateCalled func(handler func(key string, interceptor process.Interceptor) bool)
GetCalled func(string) (process.Interceptor, error)
AddCalled func(key string, interceptor process.Interceptor) error
AddMultipleCalled func(keys []string, interceptors []process.Interceptor) error
ReplaceCalled func(key string, interceptor process.Interceptor) error
RemoveCalled func(key string)
LenCalled func() int
CloseCalled func() error
}
InterceptorsContainerStub -
func (*InterceptorsContainerStub) Add ¶ added in v1.2.4
func (ics *InterceptorsContainerStub) Add(key string, interceptor process.Interceptor) error
Add -
func (*InterceptorsContainerStub) AddMultiple ¶ added in v1.2.4
func (ics *InterceptorsContainerStub) AddMultiple(keys []string, interceptors []process.Interceptor) error
AddMultiple -
func (*InterceptorsContainerStub) Close ¶ added in v1.2.4
func (ics *InterceptorsContainerStub) Close() error
Close -
func (*InterceptorsContainerStub) Get ¶ added in v1.2.4
func (ics *InterceptorsContainerStub) Get(topic string) (process.Interceptor, error)
Get -
func (*InterceptorsContainerStub) IsInterfaceNil ¶ added in v1.2.4
func (ics *InterceptorsContainerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*InterceptorsContainerStub) Iterate ¶ added in v1.2.4
func (ics *InterceptorsContainerStub) Iterate(handler func(key string, interceptor process.Interceptor) bool)
Iterate -
func (*InterceptorsContainerStub) Len ¶ added in v1.2.4
func (ics *InterceptorsContainerStub) Len() int
Len -
func (*InterceptorsContainerStub) Remove ¶ added in v1.2.4
func (ics *InterceptorsContainerStub) Remove(key string)
Remove -
func (*InterceptorsContainerStub) Replace ¶ added in v1.2.4
func (ics *InterceptorsContainerStub) Replace(key string, interceptor process.Interceptor) error
Replace -
type MarshalizerMock ¶ added in v1.2.0
type MarshalizerMock struct {
Fail bool
}
MarshalizerMock that will be used for testing
func (MarshalizerMock) IsInterfaceNil ¶ added in v1.2.0
func (mm MarshalizerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (MarshalizerMock) Marshal ¶ added in v1.2.0
func (mm MarshalizerMock) Marshal(obj interface{}) ([]byte, error)
Marshal converts the input object in a slice of bytes
func (MarshalizerMock) Unmarshal ¶ added in v1.2.0
func (mm MarshalizerMock) Unmarshal(obj interface{}, buff []byte) error
Unmarshal applies the serialized values over an instantiated object
type MarshalizerStub ¶ added in v1.2.4
type MarshalizerStub struct {
MarshalCalled func(obj interface{}) ([]byte, error)
UnmarshalCalled func(obj interface{}, buff []byte) error
}
MarshalizerStub -
func (*MarshalizerStub) IsInterfaceNil ¶ added in v1.2.4
func (ms *MarshalizerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*MarshalizerStub) Marshal ¶ added in v1.2.4
func (ms *MarshalizerStub) Marshal(obj interface{}) ([]byte, error)
Marshal -
func (*MarshalizerStub) Unmarshal ¶ added in v1.2.4
func (ms *MarshalizerStub) Unmarshal(obj interface{}, buff []byte) error
Unmarshal -
type MessageSignVerifierMock ¶ added in v1.2.0
type MessageSignVerifierMock struct {
}
MessageSignVerifierMock -
func (*MessageSignVerifierMock) IsInterfaceNil ¶ added in v1.2.0
func (m *MessageSignVerifierMock) IsInterfaceNil() bool
IsInterfaceNil -
type NodesSetupStub ¶ added in v1.2.0
type NodesSetupStub struct {
InitialNodesPubKeysCalled func() map[uint32][]string
InitialEligibleNodesPubKeysForShardCalled func(shardId uint32) ([]string, error)
GetShardIDForPubKeyCalled func(pubKey []byte) (uint32, error)
NumberOfShardsCalled func() uint32
GetShardConsensusGroupSizeCalled func() uint32
GetMetaConsensusGroupSizeCalled func() uint32
GetRoundDurationCalled func() uint64
MinNumberOfMetaNodesCalled func() uint32
MinNumberOfShardNodesCalled func() uint32
GetHysteresisCalled func() float32
GetAdaptivityCalled func() bool
InitialNodesInfoForShardCalled func(shardId uint32) ([]sharding.GenesisNodeInfoHandler, []sharding.GenesisNodeInfoHandler, error)
InitialNodesInfoCalled func() (map[uint32][]sharding.GenesisNodeInfoHandler, map[uint32][]sharding.GenesisNodeInfoHandler)
GetStartTimeCalled func() int64
MinNumberOfNodesCalled func() uint32
AllInitialNodesCalled func() []sharding.GenesisNodeInfoHandler
MinNumberOfNodesWithHysteresisCalled func() uint32
}
NodesSetupStub -
func (*NodesSetupStub) AllInitialNodes ¶ added in v1.2.0
func (n *NodesSetupStub) AllInitialNodes() []sharding.GenesisNodeInfoHandler
AllInitialNodes -
func (*NodesSetupStub) GetAdaptivity ¶ added in v1.2.0
func (n *NodesSetupStub) GetAdaptivity() bool
GetAdaptivity -
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) 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) GetShardIDForPubKey ¶ added in v1.2.0
func (n *NodesSetupStub) GetShardIDForPubKey(pubkey []byte) (uint32, error)
GetShardIDForPubKey -
func (*NodesSetupStub) GetStartTime ¶ added in v1.2.0
func (n *NodesSetupStub) GetStartTime() int64
GetStartTime -
func (*NodesSetupStub) InitialEligibleNodesPubKeysForShard ¶ added in v1.2.0
func (n *NodesSetupStub) InitialEligibleNodesPubKeysForShard(shardId uint32) ([]string, error)
InitialEligibleNodesPubKeysForShard -
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) InitialNodesPubKeys ¶ added in v1.2.0
func (n *NodesSetupStub) InitialNodesPubKeys() map[uint32][]string
InitialNodesPubKeys -
func (*NodesSetupStub) IsInterfaceNil ¶ added in v1.2.0
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) MinNumberOfNodesWithHysteresis ¶ added in v1.2.0
func (n *NodesSetupStub) MinNumberOfNodesWithHysteresis() uint32
MinNumberOfNodesWithHysteresis -
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 OldDataCleanerProviderStub ¶ added in v1.2.4
type OldDataCleanerProviderStub struct {
ShouldCleanCalled func() bool
}
OldDataCleanerProviderStub -
func (*OldDataCleanerProviderStub) IsInterfaceNil ¶ added in v1.2.4
func (o *OldDataCleanerProviderStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*OldDataCleanerProviderStub) ShouldClean ¶ added in v1.2.4
func (o *OldDataCleanerProviderStub) ShouldClean() bool
ShouldClean -
type PathManagerStub ¶ added in v1.2.0
type PathManagerStub struct {
PathForEpochCalled func(shardId string, epoch uint32, identifier string) string
PathForStaticCalled func(shardId string, identifier string) string
DatabasePathCalled func() string
}
PathManagerStub -
func (*PathManagerStub) DatabasePath ¶ added in v1.2.4
func (p *PathManagerStub) DatabasePath() string
DatabasePath -
func (*PathManagerStub) IsInterfaceNil ¶ added in v1.2.0
func (p *PathManagerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*PathManagerStub) PathForEpoch ¶ added in v1.2.0
func (p *PathManagerStub) PathForEpoch(shardId string, epoch uint32, identifier string) string
PathForEpoch -
func (*PathManagerStub) PathForStatic ¶ added in v1.2.0
func (p *PathManagerStub) PathForStatic(shardId string, identifier string) string
PathForStatic -
type PeerHonestyHandlerStub ¶
PeerHonestyHandlerStub -
func (*PeerHonestyHandlerStub) ChangeScore ¶
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 ¶
func (phhs *PeerHonestyHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
type PoolsHolderMock ¶
type PoolsHolderMock struct {
// contains filtered or unexported fields
}
PoolsHolderMock -
func (*PoolsHolderMock) CurrentBlockTxs ¶
func (holder *PoolsHolderMock) CurrentBlockTxs() dataRetriever.TransactionCacher
CurrentBlockTxs -
func (*PoolsHolderMock) Headers ¶
func (holder *PoolsHolderMock) Headers() dataRetriever.HeadersPool
Headers -
func (*PoolsHolderMock) IsInterfaceNil ¶
func (holder *PoolsHolderMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*PoolsHolderMock) MiniBlocks ¶
func (holder *PoolsHolderMock) MiniBlocks() storage.Cacher
MiniBlocks -
func (*PoolsHolderMock) PeerChangesBlocks ¶
func (holder *PoolsHolderMock) PeerChangesBlocks() storage.Cacher
PeerChangesBlocks -
func (*PoolsHolderMock) RewardTransactions ¶
func (holder *PoolsHolderMock) RewardTransactions() dataRetriever.ShardedDataCacherNotifier
RewardTransactions -
func (*PoolsHolderMock) SetTransactions ¶
func (holder *PoolsHolderMock) SetTransactions(pool dataRetriever.ShardedDataCacherNotifier)
SetTransactions -
func (*PoolsHolderMock) SetUnsignedTransactions ¶
func (holder *PoolsHolderMock) SetUnsignedTransactions(pool dataRetriever.ShardedDataCacherNotifier)
SetUnsignedTransactions -
func (*PoolsHolderMock) SmartContracts ¶ added in v1.1.12
func (holder *PoolsHolderMock) SmartContracts() storage.Cacher
SmartContracts -
func (*PoolsHolderMock) Transactions ¶
func (holder *PoolsHolderMock) Transactions() dataRetriever.ShardedDataCacherNotifier
Transactions -
func (*PoolsHolderMock) TrieNodes ¶
func (holder *PoolsHolderMock) TrieNodes() storage.Cacher
TrieNodes -
func (*PoolsHolderMock) TrieNodesChunks ¶ added in v1.2.4
func (holder *PoolsHolderMock) TrieNodesChunks() storage.Cacher
TrieNodesChunks -
func (*PoolsHolderMock) UnsignedTransactions ¶
func (holder *PoolsHolderMock) UnsignedTransactions() dataRetriever.ShardedDataCacherNotifier
UnsignedTransactions -
type PoolsHolderStub ¶
type PoolsHolderStub struct {
HeadersCalled func() dataRetriever.HeadersPool
TransactionsCalled func() dataRetriever.ShardedDataCacherNotifier
UnsignedTransactionsCalled func() dataRetriever.ShardedDataCacherNotifier
RewardTransactionsCalled func() dataRetriever.ShardedDataCacherNotifier
MiniBlocksCalled func() storage.Cacher
MetaBlocksCalled func() storage.Cacher
CurrBlockTxsCalled func() dataRetriever.TransactionCacher
TrieNodesCalled func() storage.Cacher
TrieNodesChunksCalled func() storage.Cacher
PeerChangesBlocksCalled func() storage.Cacher
SmartContractsCalled func() storage.Cacher
}
PoolsHolderStub -
func (*PoolsHolderStub) CurrentBlockTxs ¶
func (holder *PoolsHolderStub) CurrentBlockTxs() dataRetriever.TransactionCacher
CurrentBlockTxs -
func (*PoolsHolderStub) Headers ¶
func (holder *PoolsHolderStub) Headers() dataRetriever.HeadersPool
Headers -
func (*PoolsHolderStub) IsInterfaceNil ¶
func (holder *PoolsHolderStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*PoolsHolderStub) MetaBlocks ¶
func (holder *PoolsHolderStub) MetaBlocks() storage.Cacher
MetaBlocks -
func (*PoolsHolderStub) MiniBlocks ¶
func (holder *PoolsHolderStub) MiniBlocks() storage.Cacher
MiniBlocks -
func (*PoolsHolderStub) PeerChangesBlocks ¶
func (holder *PoolsHolderStub) PeerChangesBlocks() storage.Cacher
PeerChangesBlocks -
func (*PoolsHolderStub) RewardTransactions ¶
func (holder *PoolsHolderStub) RewardTransactions() dataRetriever.ShardedDataCacherNotifier
RewardTransactions -
func (*PoolsHolderStub) SmartContracts ¶ added in v1.1.12
func (holder *PoolsHolderStub) SmartContracts() storage.Cacher
SmartContracts -
func (*PoolsHolderStub) Transactions ¶
func (holder *PoolsHolderStub) Transactions() dataRetriever.ShardedDataCacherNotifier
Transactions -
func (*PoolsHolderStub) TrieNodes ¶
func (holder *PoolsHolderStub) TrieNodes() storage.Cacher
TrieNodes -
func (*PoolsHolderStub) TrieNodesChunks ¶ added in v1.2.4
func (holder *PoolsHolderStub) TrieNodesChunks() storage.Cacher
TrieNodesChunks -
func (*PoolsHolderStub) UnsignedTransactions ¶
func (holder *PoolsHolderStub) UnsignedTransactions() dataRetriever.ShardedDataCacherNotifier
UnsignedTransactions -
type ProtoMarshalizerMock ¶
type ProtoMarshalizerMock struct {
}
ProtoMarshalizerMock implements marshaling with protobuf
func (*ProtoMarshalizerMock) IsInterfaceNil ¶
func (pmm *ProtoMarshalizerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ProtoMarshalizerMock) Marshal ¶
func (pmm *ProtoMarshalizerMock) Marshal(obj interface{}) ([]byte, error)
Marshal does the actual serialization of an object The object to be serialized must implement the gogoProtoObj interface
func (*ProtoMarshalizerMock) Unmarshal ¶
func (pmm *ProtoMarshalizerMock) Unmarshal(obj interface{}, buff []byte) error
Unmarshal does the actual deserialization of an object The object to be deserialized must implement the gogoProtoObj interface
type PubkeyConverterMock ¶ added in v1.2.0
type PubkeyConverterMock struct {
// contains filtered or unexported fields
}
PubkeyConverterMock -
func NewPubkeyConverterMock ¶ added in v1.2.0
func NewPubkeyConverterMock(addressLen int) *PubkeyConverterMock
NewPubkeyConverterMock -
func (*PubkeyConverterMock) Decode ¶ added in v1.2.0
func (pcm *PubkeyConverterMock) Decode(humanReadable string) ([]byte, error)
Decode -
func (*PubkeyConverterMock) Encode ¶ added in v1.2.0
func (pcm *PubkeyConverterMock) Encode(pkBytes []byte) string
Encode -
func (*PubkeyConverterMock) IsInterfaceNil ¶ added in v1.2.0
func (pcm *PubkeyConverterMock) IsInterfaceNil() bool
IsInterfaceNil -
type RaterMock ¶ added in v1.2.0
type RaterMock struct {
StartRating uint32
MinRating uint32
MaxRating uint32
Chance uint32
IncreaseProposer int32
DecreaseProposer int32
IncreaseValidator int32
DecreaseValidator int32
MetaIncreaseProposer int32
MetaDecreaseProposer int32
MetaIncreaseValidator int32
MetaDecreaseValidator int32
GetRatingCalled func(string) uint32
GetStartRatingCalled func() uint32
GetSignedBlocksThresholdCalled func() float32
ComputeIncreaseProposerCalled func(shardId uint32, rating uint32) uint32
ComputeDecreaseProposerCalled func(shardId uint32, rating uint32, consecutiveMissedBlocks uint32) uint32
RevertIncreaseProposerCalled func(shardId uint32, rating uint32, nrReverts uint32) uint32
RevertIncreaseValidatorCalled func(shardId uint32, rating uint32, nrReverts uint32) uint32
ComputeIncreaseValidatorCalled func(shardId uint32, rating uint32) uint32
ComputeDecreaseValidatorCalled func(shardId uint32, rating uint32) uint32
GetChancesCalled func(val uint32) uint32
}
RaterMock -
func (*RaterMock) ComputeDecreaseProposer ¶ added in v1.2.0
func (rm *RaterMock) ComputeDecreaseProposer(shardId uint32, currentRating uint32, consecutiveMisses uint32) uint32
ComputeDecreaseProposer -
func (*RaterMock) ComputeDecreaseValidator ¶ added in v1.2.0
ComputeDecreaseValidator -
func (*RaterMock) ComputeIncreaseProposer ¶ added in v1.2.0
ComputeIncreaseProposer -
func (*RaterMock) ComputeIncreaseValidator ¶ added in v1.2.0
ComputeIncreaseValidator -
func (*RaterMock) GetSignedBlocksThreshold ¶ added in v1.2.0
GetSignedBlocksThreshold -
func (*RaterMock) GetStartRating ¶ added in v1.2.0
GetStartRating -
func (*RaterMock) IsInterfaceNil ¶ added in v1.2.0
IsInterfaceNil -
type RatingsInfoMock ¶ added in v1.2.0
type RatingsInfoMock struct {
StartRatingProperty uint32
MaxRatingProperty uint32
MinRatingProperty uint32
SignedBlocksThresholdProperty float32
MetaRatingsStepDataProperty process.RatingsStepHandler
ShardRatingsStepDataProperty process.RatingsStepHandler
SelectionChancesProperty []process.SelectionChance
}
RatingsInfoMock -
func (*RatingsInfoMock) IsInterfaceNil ¶ added in v1.2.0
func (rd *RatingsInfoMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*RatingsInfoMock) MaxRating ¶ added in v1.2.0
func (rd *RatingsInfoMock) MaxRating() uint32
MaxRating -
func (*RatingsInfoMock) MetaChainRatingsStepHandler ¶ added in v1.2.0
func (rd *RatingsInfoMock) MetaChainRatingsStepHandler() process.RatingsStepHandler
MetaChainRatingsStepHandler -
func (*RatingsInfoMock) MinRating ¶ added in v1.2.0
func (rd *RatingsInfoMock) MinRating() uint32
MinRating -
func (*RatingsInfoMock) SelectionChances ¶ added in v1.2.0
func (rd *RatingsInfoMock) SelectionChances() []process.SelectionChance
SelectionChances -
func (*RatingsInfoMock) ShardChainRatingsStepHandler ¶ added in v1.2.0
func (rd *RatingsInfoMock) ShardChainRatingsStepHandler() process.RatingsStepHandler
ShardChainRatingsStepHandler -
func (*RatingsInfoMock) SignedBlocksThreshold ¶ added in v1.2.0
func (rd *RatingsInfoMock) SignedBlocksThreshold() float32
SignedBlocksThreshold -
func (*RatingsInfoMock) StartRating ¶ added in v1.2.0
func (rd *RatingsInfoMock) StartRating() uint32
StartRating -
type RequestHandlerStub ¶ added in v1.2.4
type RequestHandlerStub struct {
RequestShardHeaderCalled func(shardID uint32, hash []byte)
RequestMetaHeaderCalled func(hash []byte)
RequestMetaHeaderByNonceCalled func(nonce uint64)
RequestShardHeaderByNonceCalled func(shardID uint32, nonce uint64)
RequestTransactionHandlerCalled func(destShardID uint32, txHashes [][]byte)
RequestScrHandlerCalled func(destShardID uint32, txHashes [][]byte)
RequestRewardTxHandlerCalled func(destShardID uint32, txHashes [][]byte)
RequestMiniBlockHandlerCalled func(destShardID uint32, miniblockHash []byte)
RequestMiniBlocksHandlerCalled func(destShardID uint32, miniblocksHashes [][]byte)
RequestTrieNodesCalled func(destShardID uint32, hashes [][]byte, topic string)
RequestStartOfEpochMetaBlockCalled func(epoch uint32)
SetNumPeersToQueryCalled func(key string, intra int, cross int) error
GetNumPeersToQueryCalled func(key string) (int, int, error)
RequestTrieNodeCalled func(requestHash []byte, topic string, chunkIndex uint32)
CreateTrieNodeIdentifierCalled func(requestHash []byte, chunkIndex uint32) []byte
}
RequestHandlerStub -
func (*RequestHandlerStub) CreateTrieNodeIdentifier ¶ added in v1.2.4
func (rhs *RequestHandlerStub) CreateTrieNodeIdentifier(requestHash []byte, chunkIndex uint32) []byte
CreateTrieNodeIdentifier -
func (*RequestHandlerStub) GetNumPeersToQuery ¶ added in v1.2.4
func (rhs *RequestHandlerStub) GetNumPeersToQuery(key string) (int, int, error)
GetNumPeersToQuery -
func (*RequestHandlerStub) IsInterfaceNil ¶ added in v1.2.4
func (rhs *RequestHandlerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*RequestHandlerStub) RequestInterval ¶ added in v1.2.4
func (rhs *RequestHandlerStub) RequestInterval() time.Duration
RequestInterval -
func (*RequestHandlerStub) RequestMetaHeader ¶ added in v1.2.4
func (rhs *RequestHandlerStub) RequestMetaHeader(hash []byte)
RequestMetaHeader -
func (*RequestHandlerStub) RequestMetaHeaderByNonce ¶ added in v1.2.4
func (rhs *RequestHandlerStub) RequestMetaHeaderByNonce(nonce uint64)
RequestMetaHeaderByNonce -
func (*RequestHandlerStub) RequestMiniBlock ¶ added in v1.2.4
func (rhs *RequestHandlerStub) RequestMiniBlock(destShardID uint32, miniblockHash []byte)
RequestMiniBlock -
func (*RequestHandlerStub) RequestMiniBlocks ¶ added in v1.2.4
func (rhs *RequestHandlerStub) RequestMiniBlocks(destShardID uint32, miniblocksHashes [][]byte)
RequestMiniBlocks -
func (*RequestHandlerStub) RequestRewardTransactions ¶ added in v1.2.4
func (rhs *RequestHandlerStub) RequestRewardTransactions(destShardID uint32, txHashes [][]byte)
RequestRewardTransactions -
func (*RequestHandlerStub) RequestShardHeader ¶ added in v1.2.4
func (rhs *RequestHandlerStub) RequestShardHeader(shardID uint32, hash []byte)
RequestShardHeader -
func (*RequestHandlerStub) RequestShardHeaderByNonce ¶ added in v1.2.4
func (rhs *RequestHandlerStub) RequestShardHeaderByNonce(shardID uint32, nonce uint64)
RequestShardHeaderByNonce -
func (*RequestHandlerStub) RequestStartOfEpochMetaBlock ¶ added in v1.2.4
func (rhs *RequestHandlerStub) RequestStartOfEpochMetaBlock(epoch uint32)
RequestStartOfEpochMetaBlock -
func (*RequestHandlerStub) RequestTransaction ¶ added in v1.2.4
func (rhs *RequestHandlerStub) RequestTransaction(destShardID uint32, txHashes [][]byte)
RequestTransaction -
func (*RequestHandlerStub) RequestTrieNode ¶ added in v1.2.4
func (rhs *RequestHandlerStub) RequestTrieNode(requestHash []byte, topic string, chunkIndex uint32)
RequestTrieNode -
func (*RequestHandlerStub) RequestTrieNodes ¶ added in v1.2.4
func (rhs *RequestHandlerStub) RequestTrieNodes(destShardID uint32, hashes [][]byte, topic string)
RequestTrieNodes -
func (*RequestHandlerStub) RequestUnsignedTransactions ¶ added in v1.2.4
func (rhs *RequestHandlerStub) RequestUnsignedTransactions(destShardID uint32, txHashes [][]byte)
RequestUnsignedTransactions -
func (*RequestHandlerStub) SetEpoch ¶ added in v1.2.4
func (rhs *RequestHandlerStub) SetEpoch(_ uint32)
SetEpoch -
func (*RequestHandlerStub) SetNumPeersToQuery ¶ added in v1.2.4
func (rhs *RequestHandlerStub) SetNumPeersToQuery(key string, intra int, cross int) error
SetNumPeersToQuery -
type RequestedItemsHandlerStub ¶ added in v1.2.0
type RequestedItemsHandlerStub struct {
AddCalled func(key string) error
HasCalled func(key string) bool
SweepCalled func()
}
RequestedItemsHandlerStub -
func (*RequestedItemsHandlerStub) Add ¶ added in v1.2.0
func (rihs *RequestedItemsHandlerStub) Add(key string) error
Add -
func (*RequestedItemsHandlerStub) Has ¶ added in v1.2.0
func (rihs *RequestedItemsHandlerStub) Has(key string) bool
Has -
func (*RequestedItemsHandlerStub) IsInterfaceNil ¶ added in v1.2.0
func (rihs *RequestedItemsHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*RequestedItemsHandlerStub) Sweep ¶ added in v1.2.0
func (rihs *RequestedItemsHandlerStub) Sweep()
Sweep -
type RewardTxProcessorMock ¶ added in v1.2.4
type RewardTxProcessorMock struct {
ProcessRewardTransactionCalled func(rTx *rewardTx.RewardTx) error
}
RewardTxProcessorMock -
func (*RewardTxProcessorMock) IsInterfaceNil ¶ added in v1.2.4
func (scrp *RewardTxProcessorMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*RewardTxProcessorMock) ProcessRewardTransaction ¶ added in v1.2.4
func (scrp *RewardTxProcessorMock) ProcessRewardTransaction(rTx *rewardTx.RewardTx) error
ProcessRewardTransaction -
type RoundHandlerMock ¶ added in v1.2.0
type RoundHandlerMock struct {
IndexCalled func() int64
TimeDurationCalled func() time.Duration
TimeStampCalled func() time.Time
UpdateRoundCalled func(time.Time, time.Time)
RemainingTimeCalled func(startTime time.Time, maxTime time.Duration) time.Duration
BeforeGenesisCalled func() bool
// contains filtered or unexported fields
}
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
func (rndm *RoundHandlerMock) RemainingTime(startTime time.Time, maxTime time.Duration) time.Duration
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 SCProcessorMock ¶ added in v1.2.4
type SCProcessorMock struct {
ComputeTransactionTypeCalled func(tx data.TransactionHandler) (process.TransactionType, process.TransactionType)
ExecuteSmartContractTransactionCalled func(tx data.TransactionHandler, acntSrc, acntDst state.UserAccountHandler) (vmcommon.ReturnCode, error)
ExecuteBuiltInFunctionCalled func(tx data.TransactionHandler, acntSrc, acntDst state.UserAccountHandler) (vmcommon.ReturnCode, error)
DeploySmartContractCalled func(tx data.TransactionHandler, acntSrc state.UserAccountHandler) (vmcommon.ReturnCode, error)
ProcessSmartContractResultCalled func(scr *smartContractResult.SmartContractResult) (vmcommon.ReturnCode, error)
ProcessIfErrorCalled func(acntSnd state.UserAccountHandler, txHash []byte, tx data.TransactionHandler, returnCode string, returnMessage []byte, snapshot int, gasLocked uint64) error
IsPayableCalled func(address []byte) (bool, error)
}
SCProcessorMock -
func (*SCProcessorMock) ComputeTransactionType ¶ added in v1.2.4
func (sc *SCProcessorMock) ComputeTransactionType(tx data.TransactionHandler) (process.TransactionType, process.TransactionType)
ComputeTransactionType -
func (*SCProcessorMock) DeploySmartContract ¶ added in v1.2.4
func (sc *SCProcessorMock) DeploySmartContract(tx data.TransactionHandler, acntSrc state.UserAccountHandler) (vmcommon.ReturnCode, error)
DeploySmartContract -
func (*SCProcessorMock) ExecuteBuiltInFunction ¶ added in v1.2.4
func (sc *SCProcessorMock) ExecuteBuiltInFunction( tx data.TransactionHandler, acntSrc, acntDst state.UserAccountHandler, ) (vmcommon.ReturnCode, error)
ExecuteBuiltInFunction -
func (*SCProcessorMock) ExecuteSmartContractTransaction ¶ added in v1.2.4
func (sc *SCProcessorMock) ExecuteSmartContractTransaction( tx data.TransactionHandler, acntSrc, acntDst state.UserAccountHandler, ) (vmcommon.ReturnCode, error)
ExecuteSmartContractTransaction -
func (*SCProcessorMock) IsInterfaceNil ¶ added in v1.2.4
func (sc *SCProcessorMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*SCProcessorMock) IsPayable ¶ added in v1.2.4
func (sc *SCProcessorMock) IsPayable(address []byte) (bool, error)
IsPayable -
func (*SCProcessorMock) ProcessIfError ¶ added in v1.2.4
func (sc *SCProcessorMock) ProcessIfError( acntSnd state.UserAccountHandler, txHash []byte, tx data.TransactionHandler, returnCode string, returnMessage []byte, snapshot int, gasLocked uint64, ) error
ProcessIfError -
func (*SCProcessorMock) ProcessSmartContractResult ¶ added in v1.2.4
func (sc *SCProcessorMock) ProcessSmartContractResult(scr *smartContractResult.SmartContractResult) (vmcommon.ReturnCode, error)
ProcessSmartContractResult -
type ShardStatisticsMock ¶ added in v1.0.147
type ShardStatisticsMock struct {
// contains filtered or unexported fields
}
ShardStatisticsMock will hold the tps statistics for each shard
func (*ShardStatisticsMock) AverageBlockTxCount ¶ added in v1.0.147
func (ss *ShardStatisticsMock) AverageBlockTxCount() uint32
AverageBlockTxCount returns an average transaction count for
func (*ShardStatisticsMock) AverageTPS ¶ added in v1.0.147
func (ss *ShardStatisticsMock) AverageTPS() *big.Int
AverageTPS returns an average tps for all processed blocks in a shard
func (*ShardStatisticsMock) CurrentBlockNonce ¶ added in v1.0.147
func (ss *ShardStatisticsMock) CurrentBlockNonce() uint64
CurrentBlockNonce returns the block nounce of the last processed block in a shard
func (*ShardStatisticsMock) IsInterfaceNil ¶ added in v1.0.147
func (ss *ShardStatisticsMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ShardStatisticsMock) LastBlockTxCount ¶ added in v1.0.147
func (ss *ShardStatisticsMock) LastBlockTxCount() uint32
LastBlockTxCount returns the number of transactions included in the last block
func (*ShardStatisticsMock) LiveTPS ¶ added in v1.0.147
func (ss *ShardStatisticsMock) LiveTPS() float64
LiveTPS returns tps for the last block
func (*ShardStatisticsMock) PeakTPS ¶ added in v1.0.147
func (ss *ShardStatisticsMock) PeakTPS() float64
PeakTPS returns peak tps for for all the blocks of the current shard
func (*ShardStatisticsMock) ShardID ¶ added in v1.0.147
func (ss *ShardStatisticsMock) ShardID() uint32
ShardID returns the shard id of the current statistic object
func (*ShardStatisticsMock) TotalProcessedTxCount ¶ added in v1.0.147
func (ss *ShardStatisticsMock) TotalProcessedTxCount() *big.Int
TotalProcessedTxCount returns the total number of processed transactions for this shard
type ShardedDataStub ¶
type ShardedDataStub struct {
RegisterOnAddedCalled func(func(key []byte, value interface{}))
ShardDataStoreCalled func(cacheID string) storage.Cacher
AddDataCalled func(key []byte, data interface{}, sizeInBytes int, cacheID string)
SearchFirstDataCalled func(key []byte) (value interface{}, ok bool)
RemoveDataCalled func(key []byte, cacheID string)
RemoveDataFromAllShardsCalled func(key []byte)
MergeShardStoresCalled func(sourceCacheID, destCacheID string)
MoveDataCalled func(sourceCacheID, destCacheID string, key [][]byte)
ClearCalled func()
ClearShardStoreCalled func(cacheID string)
RemoveSetOfDataFromPoolCalled func(keys [][]byte, destCacheID string)
ImmunizeSetOfDataAgainstEvictionCalled func(keys [][]byte, cacheID string)
CreateShardStoreCalled func(destCacheID string)
GetCountsCalled func() counting.CountsWithSize
}
ShardedDataStub -
func (*ShardedDataStub) AddData ¶
func (shardedData *ShardedDataStub) AddData(key []byte, data interface{}, sizeInBytes int, cacheID string)
AddData -
func (*ShardedDataStub) ClearShardStore ¶
func (shardedData *ShardedDataStub) ClearShardStore(cacheID string)
ClearShardStore -
func (*ShardedDataStub) GetCounts ¶
func (sd *ShardedDataStub) GetCounts() counting.CountsWithSize
GetCounts -
func (*ShardedDataStub) ImmunizeSetOfDataAgainstEviction ¶
func (shardedData *ShardedDataStub) ImmunizeSetOfDataAgainstEviction(keys [][]byte, cacheID string)
ImmunizeSetOfDataAgainstEviction -
func (*ShardedDataStub) IsInterfaceNil ¶
func (shardedData *ShardedDataStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ShardedDataStub) MergeShardStores ¶
func (shardedData *ShardedDataStub) MergeShardStores(sourceCacheID, destCacheID string)
MergeShardStores -
func (*ShardedDataStub) RegisterOnAdded ¶ added in v1.0.137
func (shardedData *ShardedDataStub) RegisterOnAdded(handler func(key []byte, value interface{}))
RegisterOnAdded -
func (*ShardedDataStub) RemoveData ¶
func (shardedData *ShardedDataStub) RemoveData(key []byte, cacheID string)
RemoveData -
func (*ShardedDataStub) RemoveDataFromAllShards ¶
func (shardedData *ShardedDataStub) RemoveDataFromAllShards(key []byte)
RemoveDataFromAllShards -
func (*ShardedDataStub) RemoveSetOfDataFromPool ¶
func (shardedData *ShardedDataStub) RemoveSetOfDataFromPool(keys [][]byte, cacheID string)
RemoveSetOfDataFromPool -
func (*ShardedDataStub) SearchFirstData ¶
func (shardedData *ShardedDataStub) SearchFirstData(key []byte) (value interface{}, ok bool)
SearchFirstData -
func (*ShardedDataStub) ShardDataStore ¶
func (shardedData *ShardedDataStub) ShardDataStore(cacheID string) storage.Cacher
ShardDataStore -
type ShardsCoordinatorMock ¶ added in v1.2.0
type ShardsCoordinatorMock struct {
NoShards uint32
CurrentShard uint32
ComputeIdCalled func(address []byte) uint32
SelfIDCalled func() uint32
}
ShardsCoordinatorMock -
func NewMultiShardsCoordinatorMock ¶ added in v1.2.0
func NewMultiShardsCoordinatorMock(nrShard uint32) *ShardsCoordinatorMock
NewMultiShardsCoordinatorMock -
func (*ShardsCoordinatorMock) CommunicationIdentifier ¶ added in v1.2.0
func (scm *ShardsCoordinatorMock) 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 (*ShardsCoordinatorMock) ComputeId ¶ added in v1.2.0
func (scm *ShardsCoordinatorMock) ComputeId(address []byte) uint32
ComputeId -
func (*ShardsCoordinatorMock) IsInterfaceNil ¶ added in v1.2.0
func (scm *ShardsCoordinatorMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ShardsCoordinatorMock) NumberOfShards ¶ added in v1.2.0
func (scm *ShardsCoordinatorMock) NumberOfShards() uint32
NumberOfShards -
func (*ShardsCoordinatorMock) SameShard ¶ added in v1.2.0
func (scm *ShardsCoordinatorMock) SameShard(_, _ []byte) bool
SameShard -
func (*ShardsCoordinatorMock) SelfId ¶ added in v1.2.0
func (scm *ShardsCoordinatorMock) SelfId() uint32
SelfId -
func (*ShardsCoordinatorMock) SetNoShards ¶ added in v1.2.0
func (scm *ShardsCoordinatorMock) SetNoShards(noShards uint32)
SetNoShards -
func (*ShardsCoordinatorMock) SetSelfId ¶ added in v1.2.0
func (scm *ShardsCoordinatorMock) SetSelfId(_ uint32) error
SetSelfId -
type SmartContractResultsProcessorMock ¶ added in v1.2.4
type SmartContractResultsProcessorMock struct {
ProcessSmartContractResultCalled func(scr *smartContractResult.SmartContractResult) (vmcommon.ReturnCode, error)
}
SmartContractResultsProcessorMock -
func (*SmartContractResultsProcessorMock) IsInterfaceNil ¶ added in v1.2.4
func (scrp *SmartContractResultsProcessorMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*SmartContractResultsProcessorMock) ProcessSmartContractResult ¶ added in v1.2.4
func (scrp *SmartContractResultsProcessorMock) ProcessSmartContractResult(scr *smartContractResult.SmartContractResult) (vmcommon.ReturnCode, error)
ProcessSmartContractResult -
type StateComponentsMock ¶ added in v1.2.0
type StateComponentsMock struct {
PeersAcc state.AccountsAdapter
Accounts state.AccountsAdapter
AccountsAPI state.AccountsAdapter
Tries state.TriesHolder
StorageManagers map[string]data.StorageManager
}
StateComponentsMock -
func (*StateComponentsMock) AccountsAdapter ¶ added in v1.2.0
func (scm *StateComponentsMock) AccountsAdapter() state.AccountsAdapter
AccountsAdapter -
func (*StateComponentsMock) AccountsAdapterAPI ¶ added in v1.2.0
func (scm *StateComponentsMock) AccountsAdapterAPI() state.AccountsAdapter
AccountsAdapterAPI -
func (*StateComponentsMock) CheckSubcomponents ¶ added in v1.2.0
func (scm *StateComponentsMock) CheckSubcomponents() error
CheckSubcomponents -
func (*StateComponentsMock) Close ¶ added in v1.2.0
func (scm *StateComponentsMock) Close() error
Close -
func (*StateComponentsMock) Create ¶ added in v1.2.0
func (scm *StateComponentsMock) Create() error
Create -
func (*StateComponentsMock) IsInterfaceNil ¶ added in v1.2.0
func (scm *StateComponentsMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*StateComponentsMock) PeerAccounts ¶ added in v1.2.0
func (scm *StateComponentsMock) PeerAccounts() state.AccountsAdapter
PeerAccounts -
func (*StateComponentsMock) TrieStorageManagers ¶ added in v1.2.0
func (scm *StateComponentsMock) TrieStorageManagers() map[string]data.StorageManager
TrieStorageManagers -
func (*StateComponentsMock) TriesContainer ¶ added in v1.2.0
func (scm *StateComponentsMock) TriesContainer() state.TriesHolder
TriesContainer -
type StorageManagerStub ¶ added in v1.2.4
type StorageManagerStub struct {
DatabaseCalled func() data.DBWriteCacher
TakeSnapshotCalled func([]byte, bool, chan core.KeyValueHolder)
SetCheckpointCalled func([]byte, chan core.KeyValueHolder)
GetDbThatContainsHashCalled func([]byte) data.DBWriteCacher
GetSnapshotThatContainsHashCalled func(rootHash []byte) data.SnapshotDbHandler
IsPruningEnabledCalled func() bool
IsPruningBlockedCalled func() bool
EnterPruningBufferingModeCalled func()
ExitPruningBufferingModeCalled func()
AddDirtyCheckpointHashesCalled func([]byte, data.ModifiedHashes) bool
RemoveCalled func([]byte) error
IsInterfaceNilCalled func() bool
}
StorageManagerStub -
func (*StorageManagerStub) AddDirtyCheckpointHashes ¶ added in v1.2.4
func (sms *StorageManagerStub) AddDirtyCheckpointHashes(rootHash []byte, hashes data.ModifiedHashes) bool
AddDirtyCheckpointHashes -
func (*StorageManagerStub) Close ¶ added in v1.2.4
func (sms *StorageManagerStub) Close() error
Close -
func (*StorageManagerStub) Database ¶ added in v1.2.4
func (sms *StorageManagerStub) Database() data.DBWriteCacher
Database -
func (*StorageManagerStub) EnterPruningBufferingMode ¶ added in v1.2.4
func (sms *StorageManagerStub) EnterPruningBufferingMode()
EnterPruningBufferingMode -
func (*StorageManagerStub) ExitPruningBufferingMode ¶ added in v1.2.4
func (sms *StorageManagerStub) ExitPruningBufferingMode()
ExitPruningBufferingMode -
func (*StorageManagerStub) GetSnapshotDbBatchDelay ¶ added in v1.2.4
func (sms *StorageManagerStub) GetSnapshotDbBatchDelay() int
GetSnapshotDbBatchDelay -
func (*StorageManagerStub) GetSnapshotThatContainsHash ¶ added in v1.2.4
func (sms *StorageManagerStub) GetSnapshotThatContainsHash(d []byte) data.SnapshotDbHandler
GetSnapshotThatContainsHash -
func (*StorageManagerStub) IsInterfaceNil ¶ added in v1.2.4
func (sms *StorageManagerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*StorageManagerStub) IsPruningBlocked ¶ added in v1.2.4
func (sms *StorageManagerStub) IsPruningBlocked() bool
IsPruningBlocked -
func (*StorageManagerStub) IsPruningEnabled ¶ added in v1.2.4
func (sms *StorageManagerStub) IsPruningEnabled() bool
IsPruningEnabled -
func (*StorageManagerStub) Remove ¶ added in v1.2.4
func (sms *StorageManagerStub) Remove(hash []byte) error
Remove -
func (*StorageManagerStub) SetCheckpoint ¶ added in v1.2.4
func (sms *StorageManagerStub) SetCheckpoint(rootHash []byte, leavesChan chan core.KeyValueHolder)
SetCheckpoint -
func (*StorageManagerStub) TakeSnapshot ¶ added in v1.2.4
func (sms *StorageManagerStub) TakeSnapshot(rootHash []byte, newDB bool, leavesChan chan core.KeyValueHolder)
TakeSnapshot -
type StorerStub ¶ added in v1.2.0
type StorerStub struct {
PutCalled func(key, data []byte) error
GetCalled func(key []byte) ([]byte, error)
GetFromEpochCalled func(key []byte, epoch uint32) ([]byte, error)
GetBulkFromEpochCalled func(keys [][]byte, epoch uint32) (map[string][]byte, error)
HasCalled func(key []byte) error
HasInEpochCalled func(key []byte, epoch uint32) error
SearchFirstCalled func(key []byte) ([]byte, error)
RemoveCalled func(key []byte) error
ClearCacheCalled func()
DestroyUnitCalled func() error
RangeKeysCalled func(handler func(key []byte, val []byte) bool)
PutInEpochCalled func(key, data []byte, epoch uint32) error
GetOldestEpochCalled func() (uint32, error)
CloseCalled func() error
}
StorerStub -
func (*StorerStub) DestroyUnit ¶ added in v1.2.0
func (ss *StorerStub) DestroyUnit() error
DestroyUnit -
func (*StorerStub) Get ¶ added in v1.2.0
func (ss *StorerStub) Get(key []byte) ([]byte, error)
Get -
func (*StorerStub) GetBulkFromEpoch ¶ added in v1.2.0
GetBulkFromEpoch -
func (*StorerStub) GetFromEpoch ¶ added in v1.2.0
func (ss *StorerStub) GetFromEpoch(key []byte, epoch uint32) ([]byte, error)
GetFromEpoch -
func (*StorerStub) GetOldestEpoch ¶ added in v1.2.4
func (ss *StorerStub) GetOldestEpoch() (uint32, error)
GetOldestEpoch -
func (*StorerStub) IsInterfaceNil ¶ added in v1.2.0
func (ss *StorerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*StorerStub) PutInEpoch ¶ added in v1.2.4
func (ss *StorerStub) PutInEpoch(key, data []byte, epoch uint32) error
PutInEpoch -
func (*StorerStub) RangeKeys ¶ added in v1.2.0
func (ss *StorerStub) RangeKeys(handler func(key []byte, val []byte) bool)
RangeKeys -
func (*StorerStub) SearchFirst ¶ added in v1.2.0
func (ss *StorerStub) SearchFirst(key []byte) ([]byte, error)
SearchFirst -
type SyncTimerStub ¶ added in v1.2.0
type SyncTimerStub struct {
}
SyncTimerStub -
func (*SyncTimerStub) ClockOffset ¶ added in v1.2.0
func (sts *SyncTimerStub) ClockOffset() time.Duration
ClockOffset -
func (*SyncTimerStub) CurrentTime ¶ added in v1.2.0
func (sts *SyncTimerStub) CurrentTime() time.Time
CurrentTime -
func (*SyncTimerStub) FormattedCurrentTime ¶ added in v1.2.0
func (sts *SyncTimerStub) FormattedCurrentTime() string
FormattedCurrentTime -
func (*SyncTimerStub) IsInterfaceNil ¶ added in v1.2.0
func (sts *SyncTimerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*SyncTimerStub) StartSyncingTime ¶ added in v1.2.0
func (sts *SyncTimerStub) StartSyncingTime()
StartSyncingTime -
type TimeCacheStub ¶ added in v1.2.0
type TimeCacheStub struct {
AddCalled func(key string) error
UpsertCalled func(key string, span time.Duration) error
HasCalled func(key string) bool
SweepCalled func()
LenCalled func() int
}
TimeCacheStub -
func (*TimeCacheStub) IsInterfaceNil ¶ added in v1.2.0
func (tcs *TimeCacheStub) IsInterfaceNil() bool
IsInterfaceNil -
type TpsBenchmarkMock ¶ added in v1.0.147
type TpsBenchmarkMock struct {
// contains filtered or unexported fields
}
TpsBenchmarkMock will calculate statistics for the network activity
func (*TpsBenchmarkMock) ActiveNodes ¶ added in v1.0.147
func (s *TpsBenchmarkMock) ActiveNodes() uint32
ActiveNodes returns the number of active nodes
func (*TpsBenchmarkMock) AverageBlockTxCount ¶ added in v1.0.147
func (s *TpsBenchmarkMock) AverageBlockTxCount() *big.Int
AverageBlockTxCount returns an average of the tx/block
func (*TpsBenchmarkMock) BlockNumber ¶ added in v1.0.147
func (s *TpsBenchmarkMock) BlockNumber() uint64
BlockNumber returns the last processed block number
func (*TpsBenchmarkMock) IsInterfaceNil ¶ added in v1.0.147
func (s *TpsBenchmarkMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*TpsBenchmarkMock) LastBlockTxCount ¶ added in v1.0.147
func (s *TpsBenchmarkMock) LastBlockTxCount() uint32
LastBlockTxCount returns the number of transactions processed in the last block
func (*TpsBenchmarkMock) LiveTPS ¶ added in v1.0.147
func (s *TpsBenchmarkMock) LiveTPS() float64
LiveTPS returns tps for the last block
func (*TpsBenchmarkMock) NrOfShards ¶ added in v1.0.147
func (s *TpsBenchmarkMock) NrOfShards() uint32
NrOfShards returns the number of shards
func (*TpsBenchmarkMock) PeakTPS ¶ added in v1.0.147
func (s *TpsBenchmarkMock) PeakTPS() float64
PeakTPS returns tps for the last block
func (*TpsBenchmarkMock) RoundNumber ¶ added in v1.0.147
func (s *TpsBenchmarkMock) RoundNumber() uint64
RoundNumber returns the round index for this benchmark object
func (*TpsBenchmarkMock) RoundTime ¶ added in v1.0.147
func (s *TpsBenchmarkMock) RoundTime() uint64
RoundTime returns the round duration in seconds
func (*TpsBenchmarkMock) ShardStatistic ¶ added in v1.0.147
func (s *TpsBenchmarkMock) ShardStatistic(shardID uint32) statistics.ShardStatistic
ShardStatistic returns the current statistical state for a given shard
func (*TpsBenchmarkMock) ShardStatistics ¶ added in v1.0.147
func (s *TpsBenchmarkMock) ShardStatistics() map[uint32]statistics.ShardStatistic
ShardStatistics returns the current statistical state for a given shard
func (*TpsBenchmarkMock) TotalProcessedTxCount ¶ added in v1.0.147
func (s *TpsBenchmarkMock) TotalProcessedTxCount() *big.Int
TotalProcessedTxCount returns the total number of processed transactions
func (*TpsBenchmarkMock) Update ¶ added in v1.0.147
func (s *TpsBenchmarkMock) Update(mb data.HeaderHandler)
Update receives a metablock and updates all fields accordingly for each shard available in the meta block
func (*TpsBenchmarkMock) UpdateWithShardStats ¶ added in v1.0.147
func (s *TpsBenchmarkMock) UpdateWithShardStats(mb *block.MetaBlock)
UpdateWithShardStats -
type TrieStub ¶ added in v1.2.4
type TrieStub struct {
GetCalled func(key []byte) ([]byte, error)
UpdateCalled func(key, value []byte) error
DeleteCalled func(key []byte) error
RootCalled func() ([]byte, error)
CommitCalled func() error
RecreateCalled func(root []byte) (data.Trie, error)
GetObsoleteHashesCalled func() [][]byte
AppendToOldHashesCalled func([][]byte)
GetSerializedNodesCalled func([]byte, uint64) ([][]byte, uint64, error)
GetAllHashesCalled func() ([][]byte, error)
GetAllLeavesOnChannelCalled func(rootHash []byte) (chan core.KeyValueHolder, error)
GetProofCalled func(key []byte) ([][]byte, error)
VerifyProofCalled func(key []byte, proof [][]byte) (bool, error)
GetStorageManagerCalled func() data.StorageManager
GetSerializedNodeCalled func(bytes []byte) ([]byte, error)
GetNumNodesCalled func() data.NumNodesDTO
GetOldRootCalled func() []byte
CloseCalled func() error
}
TrieStub -
func (*TrieStub) GetAllHashes ¶ added in v1.2.4
GetAllHashes -
func (*TrieStub) GetAllLeavesOnChannel ¶ added in v1.2.4
func (ts *TrieStub) GetAllLeavesOnChannel(rootHash []byte) (chan core.KeyValueHolder, error)
GetAllLeavesOnChannel -
func (*TrieStub) GetDirtyHashes ¶ added in v1.2.4
func (ts *TrieStub) GetDirtyHashes() (data.ModifiedHashes, error)
GetDirtyHashes -
func (*TrieStub) GetNumNodes ¶ added in v1.2.4
func (ts *TrieStub) GetNumNodes() data.NumNodesDTO
GetNumNodes -
func (*TrieStub) GetObsoleteHashes ¶ added in v1.2.4
GetObsoleteHashes resets the oldHashes and oldRoot variables and returns the old hashes
func (*TrieStub) GetSerializedNode ¶ added in v1.2.4
GetSerializedNode -
func (*TrieStub) GetSerializedNodes ¶ added in v1.2.4
GetSerializedNodes -
func (*TrieStub) GetStorageManager ¶ added in v1.2.4
func (ts *TrieStub) GetStorageManager() data.StorageManager
GetStorageManager -
func (*TrieStub) IsInterfaceNil ¶ added in v1.2.4
IsInterfaceNil returns true if there is no value under the interface
func (*TrieStub) SetNewHashes ¶ added in v1.2.4
func (ts *TrieStub) SetNewHashes(_ data.ModifiedHashes)
SetNewHashes -
type TxProcessorMock ¶ added in v1.2.4
type TxProcessorMock struct {
ProcessTransactionCalled func(transaction *transaction.Transaction) (vmcommon.ReturnCode, error)
SetBalancesToTrieCalled func(accBalance map[string]*big.Int) (rootHash []byte, err error)
ProcessSmartContractResultCalled func(scr *smartContractResult.SmartContractResult) (vmcommon.ReturnCode, error)
}
TxProcessorMock -
func (*TxProcessorMock) IsInterfaceNil ¶ added in v1.2.4
func (etm *TxProcessorMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*TxProcessorMock) ProcessSmartContractResult ¶ added in v1.2.4
func (etm *TxProcessorMock) ProcessSmartContractResult(scr *smartContractResult.SmartContractResult) (vmcommon.ReturnCode, error)
ProcessSmartContractResult -
func (*TxProcessorMock) ProcessTransaction ¶ added in v1.2.4
func (etm *TxProcessorMock) ProcessTransaction(transaction *transaction.Transaction) (vmcommon.ReturnCode, error)
ProcessTransaction -
func (*TxProcessorMock) SetBalancesToTrie ¶ added in v1.2.4
func (etm *TxProcessorMock) SetBalancesToTrie(accBalance map[string]*big.Int) (rootHash []byte, err error)
SetBalancesToTrie -
type TxProcessorStub ¶ added in v1.2.4
type TxProcessorStub struct {
ProcessTransactionCalled func(transaction *transaction.Transaction) (vmcommon.ReturnCode, error)
}
TxProcessorStub -
func (*TxProcessorStub) IsInterfaceNil ¶ added in v1.2.4
func (tps *TxProcessorStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*TxProcessorStub) ProcessTransaction ¶ added in v1.2.4
func (tps *TxProcessorStub) ProcessTransaction(transaction *transaction.Transaction) (vmcommon.ReturnCode, error)
ProcessTransaction -
type TxTypeHandlerMock ¶ added in v1.2.4
type TxTypeHandlerMock struct {
ComputeTransactionTypeCalled func(tx data.TransactionHandler) (process.TransactionType, process.TransactionType)
}
TxTypeHandlerMock -
func (*TxTypeHandlerMock) ComputeTransactionType ¶ added in v1.2.4
func (th *TxTypeHandlerMock) ComputeTransactionType(tx data.TransactionHandler) (process.TransactionType, process.TransactionType)
ComputeTransactionType -
func (*TxTypeHandlerMock) IsInterfaceNil ¶ added in v1.2.4
func (th *TxTypeHandlerMock) IsInterfaceNil() bool
IsInterfaceNil -
type UnsignedTxHandlerStub ¶ added in v1.2.4
type UnsignedTxHandlerStub struct {
CleanProcessedUtxsCalled func()
ProcessTransactionFeeCalled func(cost *big.Int, fee *big.Int, hash []byte)
CreateAllUTxsCalled func() []data.TransactionHandler
VerifyCreatedUTxsCalled func() error
AddTxFeeFromBlockCalled func(tx data.TransactionHandler)
GetAccumulatedFeesCalled func() *big.Int
GetDeveloperFeesCalled func() *big.Int
RevertFeesCalled func(txHashes [][]byte)
}
UnsignedTxHandlerStub -
func (*UnsignedTxHandlerStub) AddRewardTxFromBlock ¶ added in v1.2.4
func (ut *UnsignedTxHandlerStub) AddRewardTxFromBlock(tx data.TransactionHandler)
AddRewardTxFromBlock -
func (*UnsignedTxHandlerStub) CleanProcessedUTxs ¶ added in v1.2.4
func (ut *UnsignedTxHandlerStub) CleanProcessedUTxs()
CleanProcessedUTxs -
func (*UnsignedTxHandlerStub) CreateAllUTxs ¶ added in v1.2.4
func (ut *UnsignedTxHandlerStub) CreateAllUTxs() []data.TransactionHandler
CreateAllUTxs -
func (*UnsignedTxHandlerStub) CreateBlockStarted ¶ added in v1.2.4
func (ut *UnsignedTxHandlerStub) CreateBlockStarted()
CreateBlockStarted -
func (*UnsignedTxHandlerStub) GetAccumulatedFees ¶ added in v1.2.4
func (ut *UnsignedTxHandlerStub) GetAccumulatedFees() *big.Int
GetAccumulatedFees -
func (*UnsignedTxHandlerStub) GetDeveloperFees ¶ added in v1.2.4
func (ut *UnsignedTxHandlerStub) GetDeveloperFees() *big.Int
GetDeveloperFees -
func (*UnsignedTxHandlerStub) IsInterfaceNil ¶ added in v1.2.4
func (ut *UnsignedTxHandlerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*UnsignedTxHandlerStub) ProcessTransactionFee ¶ added in v1.2.4
func (ut *UnsignedTxHandlerStub) ProcessTransactionFee(cost *big.Int, devFee *big.Int, txHash []byte)
ProcessTransactionFee -
func (*UnsignedTxHandlerStub) RevertFees ¶ added in v1.2.4
func (ut *UnsignedTxHandlerStub) RevertFees(txHashes [][]byte)
RevertFees -
func (*UnsignedTxHandlerStub) VerifyCreatedUTxs ¶ added in v1.2.4
func (ut *UnsignedTxHandlerStub) VerifyCreatedUTxs() error
VerifyCreatedUTxs -
type WatchdogMock ¶ added in v1.2.0
type WatchdogMock struct {
}
WatchdogMock -
func (*WatchdogMock) IsInterfaceNil ¶ added in v1.2.0
func (w *WatchdogMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*WatchdogMock) Set ¶ added in v1.2.0
func (w *WatchdogMock) Set(_ func(alarmID string), _ time.Duration, _ string)
Set -
func (*WatchdogMock) SetDefault ¶ added in v1.2.0
func (w *WatchdogMock) SetDefault(_ time.Duration, _ string)
SetDefault -
type WhiteListHandlerStub ¶ added in v1.2.0
type WhiteListHandlerStub struct {
RemoveCalled func(keys [][]byte)
AddCalled func(keys [][]byte)
IsWhiteListedCalled func(interceptedData process.InterceptedData) bool
IsWhiteListedAtLeastOneCalled func(identifiers [][]byte) bool
IsForCurrentShardCalled func(interceptedData process.InterceptedData) bool
}
WhiteListHandlerStub -
func (*WhiteListHandlerStub) Add ¶ added in v1.2.0
func (w *WhiteListHandlerStub) Add(keys [][]byte)
Add -
func (*WhiteListHandlerStub) IsForCurrentShard ¶ added in v1.2.0
func (w *WhiteListHandlerStub) IsForCurrentShard(interceptedData process.InterceptedData) bool
IsForCurrentShard -
func (*WhiteListHandlerStub) IsInterfaceNil ¶ added in v1.2.0
func (w *WhiteListHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*WhiteListHandlerStub) IsWhiteListed ¶ added in v1.2.0
func (w *WhiteListHandlerStub) IsWhiteListed(interceptedData process.InterceptedData) bool
IsWhiteListed -
func (*WhiteListHandlerStub) IsWhiteListedAtLeastOne ¶ added in v1.2.4
func (w *WhiteListHandlerStub) IsWhiteListedAtLeastOne(identifiers [][]byte) bool
IsWhiteListedAtLeastOne -
func (*WhiteListHandlerStub) Remove ¶ added in v1.2.0
func (w *WhiteListHandlerStub) Remove(keys [][]byte)
Remove -
Source Files
¶
- AlarmStub.go
- accountsAdapterStub.go
- appStatusHandlerStub.go
- cacherMock.go
- cacherStub.go
- checkpointHashesHolderStub.go
- currentEpochProviderStub.go
- epochStartTriggerStub.go
- fallbackHeaderValidatorStub.go
- generalConfig.go
- hasherStub.go
- headerHandlerStub.go
- importStartHandlerStub.go
- interceptedDataStub.go
- interceptorContainerStub.go
- interceptorStub.go
- marshalizerMock.go
- marshalizerStub.go
- messageSigVerifierMock.go
- nodesSetupMock.go
- nonceHashConverterMock.go
- oldDataCleanerProviderStub.go
- pathHandlerStub.go
- peerHonestyHandlerStub.go
- poolFactory.go
- poolsHolderMock.go
- poolsHolderStub.go
- protoMarshalizerMock.go
- pubkeyConverterMock.go
- raterMock.go
- ratingsInfoMock.go
- requestHandlerStub.go
- requestedItemsHandlerStub.go
- rewardTxProcessorMock.go
- rounderMock.go
- scProcessorMock.go
- shardCoordinator.go
- shardStatisticsMock.go
- shardedDataStub.go
- smartContractResultProcessorMock.go
- stateComponentsMock.go
- storageManagerStub.go
- storerStub.go
- syncTimerMock.go
- timeCacherStub.go
- tpsBenchmarkMock.go
- trieStub.go
- txProcessorMock.go
- txProcessorStub.go
- txTypeHandlerMock.go
- unsignedTxHandlerStub.go
- utils.go
- watchdogMock.go
- whiteListHandlerStub.go