Versions in this module Expand all Collapse all v0 v0.0.2 Oct 31, 2023 Changes in this version + func AddTimestampSuffix(tag string) string + type HistoryProcessorStub struct + GetEpochForHashCalled func(hash []byte) (uint32, error) + GetTransactionCalled func(hash []byte) (*fullHistory.HistoryTransactionWithEpoch, error) + IsEnabledCalled func() bool + PutTransactionsDataCalled func(htd *fullHistory.HistoryTransactionsData) error + func (hp *HistoryProcessorStub) GetEpochForHash(hash []byte) (uint32, error) + func (hp *HistoryProcessorStub) GetTransaction(hash []byte) (*fullHistory.HistoryTransactionWithEpoch, error) + func (hp *HistoryProcessorStub) IsEnabled() bool + func (hp *HistoryProcessorStub) IsInterfaceNil() bool + func (hp *HistoryProcessorStub) PutTransactionsData(historyTxsData *fullHistory.HistoryTransactionsData) error + type ShardStatisticsMock struct + 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 TpsBenchmarkMock struct + 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) v0.0.1 Oct 30, 2023 Changes in this version + 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 + type CacherMock struct + func NewCacherMock() *CacherMock + func (cacher *CacherMock) Clear() + 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) UnRegisterHandler(string) + type CacherStub struct + ClearCalled func() + GetCalled func(key []byte) (value interface{}, ok bool) + HasCalled func(key []byte) bool + HasOrAddCalled func(key []byte, value interface{}, sizeInBytes int) (has, added bool) + KeysCalled func() [][]byte + LenCalled func() int + MaxSizeCalled func() int + PeekCalled func(key []byte) (value interface{}, ok bool) + PutCalled func(key []byte, value interface{}, sizeInBytes int) (evicted bool) + RegisterHandlerCalled func(func(key []byte, value interface{})) + RemoveCalled func(key []byte) + RemoveOldestCalled func() + UnRegisterHandlerCalled func(id string) + func NewCacherStub() *CacherStub + func (cacher *CacherStub) Clear() + 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) UnRegisterHandler(id string) + type PeerHonestyHandlerStub struct + ChangeScoreCalled func(pk string, topic string, units int) + func (phhs *PeerHonestyHandlerStub) ChangeScore(pk string, topic string, units int) + func (phhs *PeerHonestyHandlerStub) IsInterfaceNil() bool + type PoolsHolderMock struct + func NewPoolsHolderMock() *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) Transactions() dataRetriever.ShardedDataCacherNotifier + func (holder *PoolsHolderMock) TrieNodes() storage.Cacher + func (holder *PoolsHolderMock) UnsignedTransactions() dataRetriever.ShardedDataCacherNotifier + type PoolsHolderStub struct + CurrBlockTxsCalled func() dataRetriever.TransactionCacher + HeadersCalled func() dataRetriever.HeadersPool + MetaBlocksCalled func() storage.Cacher + MiniBlocksCalled func() storage.Cacher + PeerChangesBlocksCalled func() storage.Cacher + RewardTransactionsCalled func() dataRetriever.ShardedDataCacherNotifier + TransactionsCalled func() dataRetriever.ShardedDataCacherNotifier + TrieNodesCalled func() storage.Cacher + UnsignedTransactionsCalled func() dataRetriever.ShardedDataCacherNotifier + func NewPoolsHolderStub() *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) Transactions() dataRetriever.ShardedDataCacherNotifier + func (holder *PoolsHolderStub) TrieNodes() storage.Cacher + func (holder *PoolsHolderStub) UnsignedTransactions() dataRetriever.ShardedDataCacherNotifier + type ProtoMarshalizerMock struct + func (pmm *ProtoMarshalizerMock) IsInterfaceNil() bool + func (pmm *ProtoMarshalizerMock) Marshal(obj interface{}) ([]byte, error) + func (pmm *ProtoMarshalizerMock) Unmarshal(obj interface{}, buff []byte) error + type ShardedDataStub struct + AddDataCalled func(key []byte, data interface{}, sizeInBytes int, cacheID string) + ClearCalled func() + ClearShardStoreCalled func(cacheID string) + CreateShardStoreCalled func(destCacheID string) + GetCountsCalled func() counting.CountsWithSize + ImmunizeSetOfDataAgainstEvictionCalled func(keys [][]byte, cacheID string) + MergeShardStoresCalled func(sourceCacheID, destCacheID string) + MoveDataCalled func(sourceCacheID, destCacheID string, key [][]byte) + RegisterOnAddedCalled func(func(key []byte, value interface{})) + RemoveDataCalled func(key []byte, cacheID string) + RemoveDataFromAllShardsCalled func(key []byte) + RemoveSetOfDataFromPoolCalled func(keys [][]byte, destCacheID string) + SearchFirstDataCalled func(key []byte) (value interface{}, ok bool) + ShardDataStoreCalled func(cacheID string) storage.Cacher + func NewShardedDataStub() *ShardedDataStub + func (sd *ShardedDataStub) GetCounts() counting.CountsWithSize + func (shardedData *ShardedDataStub) AddData(key []byte, data interface{}, sizeInBytes int, cacheID string) + func (shardedData *ShardedDataStub) Clear() + func (shardedData *ShardedDataStub) ClearShardStore(cacheID string) + 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