Documentation ¶
Index ¶
- func NewInterceptedMetaBlockMock(hdr data.HeaderHandler, hash []byte) *interceptedMetaBlockMock
- func NewMultiShardsCoordinatorMock(nrShard uint32) *multipleShardsCoordinatorMock
- func NewMultipleShardsCoordinatorMock() *multipleShardsCoordinatorMock
- type AddressMock
- type ArgumentParserMock
- func (ap *ArgumentParserMock) CreateDataFromStorageUpdate(storageUpdates []*vmcommon.StorageUpdate) string
- func (ap *ArgumentParserMock) GetStorageUpdates(data string) ([]*vmcommon.StorageUpdate, error)
- func (ap *ArgumentParserMock) IsInterfaceNil() bool
- func (ap *ArgumentParserMock) ParseCallData(data string) (string, [][]byte, error)
- func (ap *ArgumentParserMock) ParseDeployData(data string) (*parsers.DeployArgs, error)
- type BuiltInCostHandlerStub
- type ChainStorerStub
- func (bc *ChainStorerStub) AddStorer(key dataRetriever.UnitType, s storage.Storer)
- func (bc *ChainStorerStub) CloseAll() error
- func (bc *ChainStorerStub) Destroy() error
- func (bc *ChainStorerStub) Get(unitType dataRetriever.UnitType, key []byte) ([]byte, error)
- func (bc *ChainStorerStub) GetAll(unitType dataRetriever.UnitType, keys [][]byte) (map[string][]byte, error)
- func (bc *ChainStorerStub) GetAllStorers() map[dataRetriever.UnitType]storage.Storer
- func (bc *ChainStorerStub) GetStorer(unitType dataRetriever.UnitType) storage.Storer
- func (bc *ChainStorerStub) Has(unitType dataRetriever.UnitType, key []byte) error
- func (bc *ChainStorerStub) IsInterfaceNil() bool
- func (bc *ChainStorerStub) Put(unitType dataRetriever.UnitType, key []byte, value []byte) error
- func (bc *ChainStorerStub) SetEpochForPutOperation(_ uint32)
- type ChanceComputerStub
- type CoreComponentsMock
- func (ccm *CoreComponentsMock) AddressPubKeyConverter() core.PubkeyConverter
- func (ccm *CoreComponentsMock) ChainID() string
- func (ccm *CoreComponentsMock) ChanStopNodeProcess() chan endProcess.ArgEndProcess
- func (ccm *CoreComponentsMock) EpochNotifier() process.EpochNotifier
- func (ccm *CoreComponentsMock) GenesisNodesSetup() sharding.GenesisNodesSetupHandler
- func (ccm *CoreComponentsMock) Hasher() hashing.Hasher
- func (ccm *CoreComponentsMock) InternalMarshalizer() marshal.Marshalizer
- func (ccm *CoreComponentsMock) IsInterfaceNil() bool
- func (ccm *CoreComponentsMock) MinTransactionVersion() uint32
- func (ccm *CoreComponentsMock) NodeTypeProvider() core.NodeTypeProviderHandler
- func (ccm *CoreComponentsMock) PathHandler() storage.PathManagerHandler
- func (ccm *CoreComponentsMock) ProcessStatusHandler() common.ProcessStatusHandler
- func (ccm *CoreComponentsMock) SetInternalMarshalizer(m marshal.Marshalizer) error
- func (ccm *CoreComponentsMock) StatusHandler() core.AppStatusHandler
- func (ccm *CoreComponentsMock) TxMarshalizer() marshal.Marshalizer
- func (ccm *CoreComponentsMock) TxSignHasher() hashing.Hasher
- func (ccm *CoreComponentsMock) TxVersionChecker() process.TxVersionCheckerHandler
- func (ccm *CoreComponentsMock) Uint64ByteSliceConverter() typeConverters.Uint64ByteSliceConverter
- func (ccm *CoreComponentsMock) ValidatorPubKeyConverter() core.PubkeyConverter
- type CryptoComponentsMock
- func (ccm *CryptoComponentsMock) BlockSignKeyGen() crypto.KeyGenerator
- func (ccm *CryptoComponentsMock) BlockSigner() crypto.SingleSigner
- func (ccm *CryptoComponentsMock) Clone() interface{}
- func (ccm *CryptoComponentsMock) IsInterfaceNil() bool
- func (ccm *CryptoComponentsMock) MultiSigner() crypto.MultiSigner
- func (ccm *CryptoComponentsMock) PublicKey() crypto.PublicKey
- func (ccm *CryptoComponentsMock) SetMultiSigner(m crypto.MultiSigner) error
- func (ccm *CryptoComponentsMock) TxSignKeyGen() crypto.KeyGenerator
- func (ccm *CryptoComponentsMock) TxSingleSigner() crypto.SingleSigner
- type DataTrieTrackerStub
- func (dtts *DataTrieTrackerStub) ClearDataCaches()
- func (dtts *DataTrieTrackerStub) DataTrie() common.Trie
- func (dtts *DataTrieTrackerStub) DirtyData() map[string][]byte
- func (dtts *DataTrieTrackerStub) IsInterfaceNil() bool
- func (dtts *DataTrieTrackerStub) RetrieveValue(key []byte) ([]byte, error)
- func (dtts *DataTrieTrackerStub) SaveKeyValue(key []byte, value []byte) error
- func (dtts *DataTrieTrackerStub) SetDataTrie(tr common.Trie)
- type EconomicsHandlerStub
- func (ehs *EconomicsHandlerStub) CheckValidityTxValues(tx data.TransactionWithFeeHandler) error
- func (ehs *EconomicsHandlerStub) ComputeFeeForProcessing(tx data.TransactionWithFeeHandler, gasToUse uint64) *big.Int
- func (ehs *EconomicsHandlerStub) ComputeGasLimit(tx data.TransactionWithFeeHandler) uint64
- func (ehs *EconomicsHandlerStub) ComputeGasLimitBasedOnBalance(tx data.TransactionWithFeeHandler, balance *big.Int) (uint64, error)
- func (ehs *EconomicsHandlerStub) ComputeGasUsedAndFeeBasedOnRefundValue(tx data.TransactionWithFeeHandler, refundValue *big.Int) (uint64, *big.Int)
- func (ehs *EconomicsHandlerStub) ComputeMoveBalanceFee(tx data.TransactionWithFeeHandler) *big.Int
- func (ehs *EconomicsHandlerStub) ComputeTxFee(tx data.TransactionWithFeeHandler) *big.Int
- func (ehs *EconomicsHandlerStub) ComputeTxFeeBasedOnGasUsed(tx data.TransactionWithFeeHandler, gasUsed uint64) *big.Int
- func (ehs *EconomicsHandlerStub) DeveloperPercentage() float64
- func (ehs *EconomicsHandlerStub) GasPerDataByte() uint64
- func (ehs *EconomicsHandlerStub) GasPriceForMove(tx data.TransactionWithFeeHandler) uint64
- func (ehs *EconomicsHandlerStub) GasPriceForProcessing(tx data.TransactionWithFeeHandler) uint64
- func (ehs *EconomicsHandlerStub) GasPriceModifier() float64
- func (ehs *EconomicsHandlerStub) GenesisTotalSupply() *big.Int
- func (ehs *EconomicsHandlerStub) IsInterfaceNil() bool
- func (ehs *EconomicsHandlerStub) LeaderPercentage() float64
- func (ehs *EconomicsHandlerStub) MaxGasLimitPerBlock(uint32) uint64
- func (ehs *EconomicsHandlerStub) MaxGasLimitPerBlockForSafeCrossShard() uint64
- func (ehs *EconomicsHandlerStub) MaxGasLimitPerMiniBlock(uint32) uint64
- func (ehs *EconomicsHandlerStub) MaxGasLimitPerMiniBlockForSafeCrossShard() uint64
- func (ehs *EconomicsHandlerStub) MaxGasLimitPerTx() uint64
- func (ehs *EconomicsHandlerStub) MaxInflationRate(year uint32) float64
- func (ehs *EconomicsHandlerStub) MinGasLimit() uint64
- func (ehs *EconomicsHandlerStub) MinGasPrice() uint64
- func (ehs *EconomicsHandlerStub) MinGasPriceForProcessing() uint64
- func (ehs *EconomicsHandlerStub) MinInflationRate() float64
- func (ehs *EconomicsHandlerStub) ProtocolSustainabilityAddress() string
- func (ehs *EconomicsHandlerStub) ProtocolSustainabilityPercentage() float64
- func (ehs *EconomicsHandlerStub) RewardsTopUpFactor() float64
- func (ehs *EconomicsHandlerStub) RewardsTopUpGradientPoint() *big.Int
- func (ehs *EconomicsHandlerStub) SplitTxGasInCategories(tx data.TransactionWithFeeHandler) (uint64, uint64)
- type EpochStartMetaBlockProcessorStub
- func (esmbps *EpochStartMetaBlockProcessorStub) GetEpochStartMetaBlock(ctx context.Context) (data.MetaHeaderHandler, error)
- func (esmbps *EpochStartMetaBlockProcessorStub) IsInterfaceNil() bool
- func (esmbps *EpochStartMetaBlockProcessorStub) RegisterHandler(handler func(topic string, hash []byte, data interface{}))
- func (esmbps *EpochStartMetaBlockProcessorStub) Save(data process.InterceptedData, fromConnectedPeer core.PeerID, topic string) error
- func (esmbps *EpochStartMetaBlockProcessorStub) Validate(data process.InterceptedData, fromConnectedPeer core.PeerID) error
- type EpochStartNotifierStub
- func (esnm *EpochStartNotifierStub) IsInterfaceNil() bool
- func (esnm *EpochStartNotifierStub) NotifyAll(hdr data.HeaderHandler)
- func (esnm *EpochStartNotifierStub) NotifyAllPrepare(metaHdr data.HeaderHandler, body data.BodyHandler)
- func (esnm *EpochStartNotifierStub) NotifyEpochChangeConfirmed(epoch uint32)
- type GasScheduleNotifierMock
- type HeaderIntegrityVerifierStub
- type HeaderValidatorStub
- type HeadersCacherStub
- func (hcs *HeadersCacherStub) AddHeader(headerHash []byte, header data.HeaderHandler)
- func (hcs *HeadersCacherStub) Clear()
- func (hcs *HeadersCacherStub) GetHeaderByHash(hash []byte) (data.HeaderHandler, error)
- func (hcs *HeadersCacherStub) GetHeadersByNonceAndShardId(hdrNonce uint64, shardId uint32) ([]data.HeaderHandler, [][]byte, error)
- func (hcs *HeadersCacherStub) GetNumHeaders(shardId uint32) int
- func (hcs *HeadersCacherStub) IsInterfaceNil() bool
- func (hcs *HeadersCacherStub) Len() int
- func (hcs *HeadersCacherStub) MaxSize() int
- func (hcs *HeadersCacherStub) Nonces(shardId uint32) []uint64
- func (hcs *HeadersCacherStub) RegisterHandler(handler func(header data.HeaderHandler, shardHeaderHash []byte))
- func (hcs *HeadersCacherStub) RemoveHeaderByHash(headerHash []byte)
- func (hcs *HeadersCacherStub) RemoveHeaderByNonceAndShardId(hdrNonce uint64, shardId uint32)
- type 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 LatestStorageDataProviderStub
- func (lsdps *LatestStorageDataProviderStub) Get() (storage.LatestDataFromStorage, error)
- func (lsdps *LatestStorageDataProviderStub) GetParentDirAndLastEpoch() (string, uint32, error)
- func (lsdps *LatestStorageDataProviderStub) GetParentDirectory() string
- func (lsdps *LatestStorageDataProviderStub) GetShardsFromDirectory(path string) ([]string, error)
- func (lsdps *LatestStorageDataProviderStub) IsInterfaceNil() bool
- type MarshalizerMock
- type MessengerStub
- func (m *MessengerStub) ConnectedFullHistoryPeersOnTopic(_ string) []core.PeerID
- func (m *MessengerStub) ConnectedPeers() []core.PeerID
- func (m *MessengerStub) ConnectedPeersOnTopic(_ string) []core.PeerID
- func (m *MessengerStub) CreateTopic(topic string, identifier bool) error
- func (m *MessengerStub) HasTopic(_ string) bool
- func (m *MessengerStub) ID() core.PeerID
- func (m *MessengerStub) IsInterfaceNil() bool
- func (m *MessengerStub) RegisterMessageProcessor(topic string, identifier string, handler p2p.MessageProcessor) error
- func (m *MessengerStub) SendToConnectedPeer(_ string, _ []byte, _ core.PeerID) error
- func (m *MessengerStub) UnjoinAllTopics() error
- func (m *MessengerStub) UnregisterAllMessageProcessors() error
- func (m *MessengerStub) UnregisterMessageProcessor(_ string, _ string) error
- type MetaBlockInterceptorProcessorStub
- func (m *MetaBlockInterceptorProcessorStub) GetEpochStartMetaBlock(_ context.Context) (data.MetaHeaderHandler, error)
- func (m *MetaBlockInterceptorProcessorStub) IsInterfaceNil() bool
- func (m *MetaBlockInterceptorProcessorStub) RegisterHandler(_ func(topic string, hash []byte, data interface{}))
- func (m *MetaBlockInterceptorProcessorStub) Save(_ process.InterceptedData, _ core.PeerID, _ string) error
- func (m *MetaBlockInterceptorProcessorStub) SignalEndOfProcessing(_ []process.InterceptedData)
- func (m *MetaBlockInterceptorProcessorStub) Validate(_ process.InterceptedData, _ core.PeerID) error
- type NodeInfoMock
- type NodeShufflerMock
- type NodesCoordinatorStub
- func (ncm *NodesCoordinatorStub) ComputeAdditionalLeaving(_ []*state.ShardValidatorInfo) (map[uint32][]sharding.Validator, error)
- func (ncm *NodesCoordinatorStub) ComputeConsensusGroup(randomness []byte, round uint64, shardId uint32, epoch uint32) (validatorsGroup []sharding.Validator, err error)
- func (ncm *NodesCoordinatorStub) ConsensusGroupSize(shardID uint32) int
- func (ncm *NodesCoordinatorStub) EpochStartPrepare(metaHdr data.HeaderHandler, body data.BodyHandler)
- func (ncm *NodesCoordinatorStub) GetAllEligibleValidatorsPublicKeys(_ uint32) (map[uint32][][]byte, error)
- func (ncm *NodesCoordinatorStub) GetAllLeavingValidatorsPublicKeys(_ uint32) (map[uint32][][]byte, error)
- func (ncm *NodesCoordinatorStub) GetAllValidatorsPublicKeys(_ uint32) (map[uint32][][]byte, error)
- func (ncm *NodesCoordinatorStub) GetAllWaitingValidatorsPublicKeys(_ uint32) (map[uint32][][]byte, error)
- func (ncm *NodesCoordinatorStub) GetChance(uint32) uint32
- func (ncm *NodesCoordinatorStub) GetConsensusValidatorsPublicKeys(randomness []byte, round uint64, shardId uint32, epoch uint32) ([]string, error)
- func (ncm *NodesCoordinatorStub) GetConsensusWhitelistedNodes(_ uint32) (map[string]struct{}, error)
- func (ncm *NodesCoordinatorStub) GetNumTotalEligible() uint64
- func (ncm *NodesCoordinatorStub) GetOwnPublicKey() []byte
- func (ncm *NodesCoordinatorStub) GetSavedStateKey() []byte
- func (ncm *NodesCoordinatorStub) GetSelectedPublicKeys(_ []byte, _ uint32, _ uint32) ([]string, error)
- func (ncm *NodesCoordinatorStub) GetValidatorWithPublicKey(publicKey []byte) (sharding.Validator, uint32, error)
- func (ncm *NodesCoordinatorStub) GetValidatorsIndexes(_ []string, _ uint32) ([]uint64, error)
- func (ncm *NodesCoordinatorStub) IsInterfaceNil() bool
- func (ncm *NodesCoordinatorStub) LoadState(_ []byte) error
- func (ncm *NodesCoordinatorStub) NodesCoordinatorToRegistry() *sharding.NodesCoordinatorRegistry
- func (ncm *NodesCoordinatorStub) SetConfig(_ *sharding.NodesCoordinatorRegistry) error
- func (ncm *NodesCoordinatorStub) SetNodesPerShards(_ map[uint32][]sharding.Validator, _ map[uint32][]sharding.Validator, ...) error
- func (ncm *NodesCoordinatorStub) ShardIdForEpoch(_ uint32) (uint32, error)
- func (ncm *NodesCoordinatorStub) ShuffleOutForEpoch(_ uint32)
- func (ncm *NodesCoordinatorStub) ValidatorsWeights(_ []sharding.Validator) ([]uint32, error)
- 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 PubkeyConverterMock
- type RaterStub
- func (rm *RaterStub) ComputeDecreaseProposer(shardId uint32, currentRating uint32, consecutiveMisses uint32) uint32
- func (rm *RaterStub) ComputeDecreaseValidator(shardId uint32, currentRating uint32) uint32
- func (rm *RaterStub) ComputeIncreaseProposer(shardId uint32, currentRating uint32) uint32
- func (rm *RaterStub) ComputeIncreaseValidator(shardId uint32, currentRating uint32) uint32
- func (rm *RaterStub) GetChance(rating uint32) uint32
- func (rm *RaterStub) GetRating(pk string) uint32
- func (rm *RaterStub) GetSignedBlocksThreshold() float32
- func (rm *RaterStub) GetStartRating() uint32
- func (rm *RaterStub) IsInterfaceNil() bool
- func (rm *RaterStub) RevertIncreaseValidator(shardId uint32, currentRating uint32, nrReverts uint32) uint32
- type RewardsCreatorStub
- func (rcs *RewardsCreatorStub) CreateMarshalizedData(body *block.Body) map[string][][]byte
- func (rcs *RewardsCreatorStub) CreateRewardsMiniBlocks(metaBlock data.MetaHeaderHandler, ...) (block.MiniBlockSlice, error)
- func (rcs *RewardsCreatorStub) DeleteTxsFromStorage(metaBlock data.MetaHeaderHandler, body *block.Body)
- func (rcs *RewardsCreatorStub) GetLocalTxCache() epochStart.TransactionCacher
- func (rcs *RewardsCreatorStub) GetProtocolSustainabilityRewards() *big.Int
- func (rcs *RewardsCreatorStub) GetRewardsTxs(body *block.Body) map[string]data.TransactionHandler
- func (rcs *RewardsCreatorStub) IsInterfaceNil() bool
- func (rcs *RewardsCreatorStub) RemoveBlockDataFromPools(metaBlock data.MetaHeaderHandler, body *block.Body)
- func (rcs *RewardsCreatorStub) SaveTxBlockToStorage(metaBlock data.MetaHeaderHandler, body *block.Body)
- func (rcs *RewardsCreatorStub) VerifyRewardsMiniBlocks(metaBlock data.MetaHeaderHandler, ...) error
- type RewardsHandlerStub
- func (r *RewardsHandlerStub) IsInterfaceNil() bool
- func (r *RewardsHandlerStub) LeaderPercentage() float64
- func (r *RewardsHandlerStub) MaxInflationRate(year uint32) float64
- func (r *RewardsHandlerStub) MinInflationRate() float64
- func (r *RewardsHandlerStub) ProtocolSustainabilityAddress() string
- func (r *RewardsHandlerStub) ProtocolSustainabilityPercentage() float64
- func (r *RewardsHandlerStub) RewardsTopUpFactor() float64
- func (r *RewardsHandlerStub) RewardsTopUpGradientPoint() *big.Int
- type RoundHandlerStub
- func (rndm *RoundHandlerStub) Index() int64
- func (rndm *RoundHandlerStub) IsInterfaceNil() bool
- func (rndm *RoundHandlerStub) RemainingTime(startTime time.Time, maxTime time.Duration) time.Duration
- func (rndm *RoundHandlerStub) TimeDuration() time.Duration
- func (rndm *RoundHandlerStub) TimeStamp() time.Time
- func (rndm *RoundHandlerStub) UpdateRound(genesisRoundTimeStamp time.Time, timeStamp time.Time)
- type RoundTimeDurationHandler
- type ShardCoordinatorStub
- func (coordinator *ShardCoordinatorStub) CommunicationIdentifier(destShardID uint32) string
- func (coordinator *ShardCoordinatorStub) ComputeId(address []byte) uint32
- func (coordinator *ShardCoordinatorStub) IsInterfaceNil() bool
- func (coordinator *ShardCoordinatorStub) NumberOfShards() uint32
- func (coordinator *ShardCoordinatorStub) SameShard(firstAddress, secondAddress []byte) bool
- func (coordinator *ShardCoordinatorStub) SelfId() uint32
- type ShardIdHasMapStub
- func (sihsm *ShardIdHasMapStub) Delete(shardId uint32)
- func (sihsm *ShardIdHasMapStub) IsInterfaceNil() bool
- func (sihsm *ShardIdHasMapStub) Load(shardId uint32) ([]byte, bool)
- func (sihsm *ShardIdHasMapStub) Range(f func(shardId uint32, hash []byte) bool)
- func (sihsm *ShardIdHasMapStub) Store(shardId uint32, hash []byte)
- type StakingDataProviderStub
- func (sdps *StakingDataProviderStub) Clean()
- func (sdps *StakingDataProviderStub) ComputeUnQualifiedNodes(validatorInfos map[uint32][]*state.ValidatorInfo) ([][]byte, map[string][][]byte, error)
- func (sdps *StakingDataProviderStub) FillValidatorInfo(blsKey []byte) error
- func (sdps *StakingDataProviderStub) GetNodeStakedTopUp(blsKey []byte) (*big.Int, error)
- func (sdps *StakingDataProviderStub) GetTotalStakeEligibleNodes() *big.Int
- func (sdps *StakingDataProviderStub) GetTotalTopUpStakeEligibleNodes() *big.Int
- func (sdps *StakingDataProviderStub) IsInterfaceNil() bool
- func (sdps *StakingDataProviderStub) PrepareStakingDataForRewards(keys map[uint32][][]byte) error
- type StorageManagerStub
- func (sms *StorageManagerStub) CancelPrune([]byte, state.TriePruningIdentifier)
- func (sms *StorageManagerStub) Close() error
- func (sms *StorageManagerStub) Database() common.DBWriteCacher
- func (sms *StorageManagerStub) EnterSnapshotMode()
- func (sms *StorageManagerStub) ExitSnapshotMode()
- func (sms *StorageManagerStub) GetSnapshotDbBatchDelay() int
- func (sms *StorageManagerStub) GetSnapshotThatContainsHash(d []byte) common.SnapshotDbHandler
- func (sms *StorageManagerStub) IsInterfaceNil() bool
- func (sms *StorageManagerStub) IsPruningEnabled() bool
- func (sms *StorageManagerStub) MarkForEviction(d []byte, m common.ModifiedHashes) error
- func (sms *StorageManagerStub) Prune([]byte, state.TriePruningIdentifier)
- func (sms *StorageManagerStub) SetCheckpoint([]byte)
- func (sms *StorageManagerStub) TakeSnapshot([]byte)
- type StorerMock
- func (sm *StorerMock) ClearCache()
- func (sm *StorerMock) Close() error
- func (sm *StorerMock) DestroyUnit() error
- func (sm *StorerMock) Get(key []byte) ([]byte, error)
- func (sm *StorerMock) GetBulkFromEpoch(keys [][]byte, _ uint32) (map[string][]byte, error)
- func (sm *StorerMock) GetFromEpoch(key []byte, _ uint32) ([]byte, error)
- func (sm *StorerMock) GetOldestEpoch() (uint32, error)
- func (sm *StorerMock) Has(_ []byte) error
- func (sm *StorerMock) IsInterfaceNil() bool
- func (sm *StorerMock) Put(key, data []byte) error
- func (sm *StorerMock) PutInEpoch(key, data []byte, _ uint32) error
- func (sm *StorerMock) RangeKeys(_ func(key []byte, val []byte) bool)
- func (sm *StorerMock) Remove(key []byte) error
- func (sm *StorerMock) RemoveFromCurrentEpoch(key []byte) error
- func (sm *StorerMock) SearchFirst(key []byte) ([]byte, error)
- type SyncTimerStub
- type TxForCurrentBlockStub
- type Uint64ByteSliceConverterMock
- type Uint64SyncMapCacherStub
- func (usmcs *Uint64SyncMapCacherStub) Clear()
- func (usmcs *Uint64SyncMapCacherStub) Get(nonce uint64) (dataRetriever.ShardIdHashMap, bool)
- func (usmcs *Uint64SyncMapCacherStub) Has(nonce uint64, shardId uint32) bool
- func (usmcs *Uint64SyncMapCacherStub) IsInterfaceNil() bool
- func (usmcs *Uint64SyncMapCacherStub) Merge(nonce uint64, src dataRetriever.ShardIdHashMap)
- func (usmcs *Uint64SyncMapCacherStub) RegisterHandler(handler func(nonce uint64, shardId uint32, value []byte))
- func (usmcs *Uint64SyncMapCacherStub) Remove(nonce uint64, shardId uint32)
- type UnitOpenerStub
- type VMExecutionHandlerStub
- func (vm *VMExecutionHandlerStub) GasScheduleChange(gasSchedule map[string]map[string]uint64)
- func (vm *VMExecutionHandlerStub) GetVersion() string
- func (vm *VMExecutionHandlerStub) IsInterfaceNil() bool
- func (vm *VMExecutionHandlerStub) RunSmartContractCall(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error)
- func (vm *VMExecutionHandlerStub) RunSmartContractCreate(input *vmcommon.ContractCreateInput) (*vmcommon.VMOutput, error)
- type ValidatorInfoSyncerStub
- type ValidatorStatisticsProcessorStub
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewInterceptedMetaBlockMock ¶ added in v1.0.102
func NewInterceptedMetaBlockMock(hdr data.HeaderHandler, hash []byte) *interceptedMetaBlockMock
NewInterceptedMetaBlockMock -
func NewMultiShardsCoordinatorMock ¶ added in v1.0.102
func NewMultiShardsCoordinatorMock(nrShard uint32) *multipleShardsCoordinatorMock
NewMultiShardsCoordinatorMock -
func NewMultipleShardsCoordinatorMock ¶ added in v1.0.102
func NewMultipleShardsCoordinatorMock() *multipleShardsCoordinatorMock
NewMultipleShardsCoordinatorMock -
Types ¶
type AddressMock ¶ added in v1.0.102
type AddressMock struct {
// contains filtered or unexported fields
}
AddressMock is the struct holding a mock address
func NewAddressMock ¶ added in v1.0.102
func NewAddressMock(adr []byte) *AddressMock
NewAddressMock creates a new Address with the same byte slice as the parameter received
func (*AddressMock) Bytes ¶ added in v1.0.102
func (adr *AddressMock) Bytes() []byte
Bytes returns the data corresponding to this address
func (*AddressMock) IsInterfaceNil ¶ added in v1.0.102
func (adr *AddressMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type ArgumentParserMock ¶ added in v1.0.133
type ArgumentParserMock struct { ParseCallDataCalled func(data string) (string, [][]byte, error) ParseDeployDataCalled func(data string) (*parsers.DeployArgs, error) CreateDataFromStorageUpdateCalled func(storageUpdates []*vmcommon.StorageUpdate) string GetStorageUpdatesCalled func(data string) ([]*vmcommon.StorageUpdate, error) }
ArgumentParserMock -
func (*ArgumentParserMock) CreateDataFromStorageUpdate ¶ added in v1.0.133
func (ap *ArgumentParserMock) CreateDataFromStorageUpdate(storageUpdates []*vmcommon.StorageUpdate) string
CreateDataFromStorageUpdate -
func (*ArgumentParserMock) GetStorageUpdates ¶ added in v1.0.133
func (ap *ArgumentParserMock) GetStorageUpdates(data string) ([]*vmcommon.StorageUpdate, error)
GetStorageUpdates -
func (*ArgumentParserMock) IsInterfaceNil ¶ added in v1.0.133
func (ap *ArgumentParserMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ArgumentParserMock) ParseCallData ¶ added in v1.0.133
func (ap *ArgumentParserMock) ParseCallData(data string) (string, [][]byte, error)
ParseCallData -
func (*ArgumentParserMock) ParseDeployData ¶ added in v1.0.133
func (ap *ArgumentParserMock) ParseDeployData(data string) (*parsers.DeployArgs, error)
ParseDeployData -
type BuiltInCostHandlerStub ¶ added in v1.1.46
type BuiltInCostHandlerStub struct { }
BuiltInCostHandlerStub -
func (*BuiltInCostHandlerStub) ComputeBuiltInCost ¶ added in v1.1.46
func (b *BuiltInCostHandlerStub) ComputeBuiltInCost(_ data.TransactionWithFeeHandler) uint64
ComputeBuiltInCost -
func (*BuiltInCostHandlerStub) IsBuiltInFuncCall ¶ added in v1.1.46
func (b *BuiltInCostHandlerStub) IsBuiltInFuncCall(_ data.TransactionWithFeeHandler) bool
IsBuiltInFuncCall -
func (*BuiltInCostHandlerStub) IsInterfaceNil ¶ added in v1.1.46
func (b *BuiltInCostHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
type ChainStorerStub ¶
type ChainStorerStub struct { AddStorerCalled func(key dataRetriever.UnitType, s storage.Storer) GetStorerCalled func(unitType dataRetriever.UnitType) storage.Storer HasCalled func(unitType dataRetriever.UnitType, key []byte) error GetCalled func(unitType dataRetriever.UnitType, key []byte) ([]byte, error) PutCalled func(unitType dataRetriever.UnitType, key []byte, value []byte) error GetAllCalled func(unitType dataRetriever.UnitType, keys [][]byte) (map[string][]byte, error) GetAllStorersCalled func() map[dataRetriever.UnitType]storage.Storer DestroyCalled func() error CloseAllCalled func() error }
ChainStorerStub is a mock implementation of the ChainStorer interface
func (*ChainStorerStub) AddStorer ¶
func (bc *ChainStorerStub) AddStorer(key dataRetriever.UnitType, s storage.Storer)
AddStorer will add a new storer to the chain map
func (*ChainStorerStub) Destroy ¶
func (bc *ChainStorerStub) Destroy() error
Destroy removes the underlying files/resources used by the storage service
func (*ChainStorerStub) Get ¶
func (bc *ChainStorerStub) Get(unitType dataRetriever.UnitType, key []byte) ([]byte, error)
Get returns the value for the given key if found in the selected storage unit, nil otherwise. It can return an error if the provided unit type is not supported or if the storage unit underlying implementation reports an error
func (*ChainStorerStub) GetAll ¶
func (bc *ChainStorerStub) GetAll(unitType dataRetriever.UnitType, keys [][]byte) (map[string][]byte, error)
GetAll gets all the elements with keys in the keys array, from the selected storage unit It can report an error if the provided unit type is not supported, if there is a missing key in the unit, or if the underlying implementation of the storage unit reports an error.
func (*ChainStorerStub) GetAllStorers ¶ added in v1.2.4
func (bc *ChainStorerStub) GetAllStorers() map[dataRetriever.UnitType]storage.Storer
GetAllStorers -
func (*ChainStorerStub) GetStorer ¶
func (bc *ChainStorerStub) GetStorer(unitType dataRetriever.UnitType) storage.Storer
GetStorer returns the storer from the chain map or nil if the storer was not found
func (*ChainStorerStub) Has ¶
func (bc *ChainStorerStub) Has(unitType dataRetriever.UnitType, key []byte) error
Has returns true if the key is found in the selected Unit or false otherwise It can return an error if the provided unit type is not supported or if the underlying implementation of the storage unit reports an error.
func (*ChainStorerStub) IsInterfaceNil ¶
func (bc *ChainStorerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ChainStorerStub) Put ¶
func (bc *ChainStorerStub) Put(unitType dataRetriever.UnitType, key []byte, value []byte) error
Put stores the key, value pair in the selected storage unit It can return an error if the provided unit type is not supported or if the storage unit underlying implementation reports an error
func (*ChainStorerStub) SetEpochForPutOperation ¶ added in v1.0.109
func (bc *ChainStorerStub) SetEpochForPutOperation(_ uint32)
SetEpochForPutOperation won't do anything
type ChanceComputerStub ¶ added in v1.1.1
ChanceComputerStub -
func (*ChanceComputerStub) GetChance ¶ added in v1.1.1
func (c *ChanceComputerStub) GetChance(rating uint32) uint32
GetChance -
func (*ChanceComputerStub) IsInterfaceNil ¶ added in v1.1.1
func (c *ChanceComputerStub) IsInterfaceNil() bool
IsInterfaceNil -
type CoreComponentsMock ¶ added in v1.2.0
type CoreComponentsMock struct { IntMarsh marshal.Marshalizer Marsh marshal.Marshalizer Hash hashing.Hasher EpochNotifierField process.EpochNotifier TxSignHasherField hashing.Hasher UInt64ByteSliceConv typeConverters.Uint64ByteSliceConverter AddrPubKeyConv core.PubkeyConverter ValPubKeyConv core.PubkeyConverter PathHdl storage.PathManagerHandler ChainIdCalled func() string MinTransactionVersionCalled func() uint32 StatusHandlerCalled func() core.AppStatusHandler GenesisNodesSetupCalled func() sharding.GenesisNodesSetupHandler TxVersionCheckField process.TxVersionCheckerHandler ChanStopNode chan endProcess.ArgEndProcess NodeTypeProviderField core.NodeTypeProviderHandler ProcessStatusHandlerInstance common.ProcessStatusHandler // contains filtered or unexported fields }
CoreComponentsMock -
func (*CoreComponentsMock) AddressPubKeyConverter ¶ added in v1.2.0
func (ccm *CoreComponentsMock) AddressPubKeyConverter() core.PubkeyConverter
AddressPubKeyConverter -
func (*CoreComponentsMock) ChainID ¶ added in v1.2.0
func (ccm *CoreComponentsMock) ChainID() string
ChainID -
func (*CoreComponentsMock) ChanStopNodeProcess ¶ added in v1.2.4
func (ccm *CoreComponentsMock) ChanStopNodeProcess() chan endProcess.ArgEndProcess
ChanStopNodeProcess -
func (*CoreComponentsMock) EpochNotifier ¶ added in v1.2.0
func (ccm *CoreComponentsMock) EpochNotifier() process.EpochNotifier
EpochNotifier -
func (*CoreComponentsMock) GenesisNodesSetup ¶ added in v1.2.0
func (ccm *CoreComponentsMock) GenesisNodesSetup() sharding.GenesisNodesSetupHandler
GenesisNodesSetup -
func (*CoreComponentsMock) Hasher ¶ added in v1.2.0
func (ccm *CoreComponentsMock) Hasher() hashing.Hasher
Hasher -
func (*CoreComponentsMock) InternalMarshalizer ¶ added in v1.2.0
func (ccm *CoreComponentsMock) InternalMarshalizer() marshal.Marshalizer
InternalMarshalizer -
func (*CoreComponentsMock) IsInterfaceNil ¶ added in v1.2.0
func (ccm *CoreComponentsMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*CoreComponentsMock) MinTransactionVersion ¶ added in v1.2.0
func (ccm *CoreComponentsMock) MinTransactionVersion() uint32
MinTransactionVersion -
func (*CoreComponentsMock) NodeTypeProvider ¶ added in v1.2.4
func (ccm *CoreComponentsMock) NodeTypeProvider() core.NodeTypeProviderHandler
NodeTypeProvider -
func (*CoreComponentsMock) PathHandler ¶ added in v1.2.0
func (ccm *CoreComponentsMock) PathHandler() storage.PathManagerHandler
PathHandler -
func (*CoreComponentsMock) ProcessStatusHandler ¶ added in v1.3.18
func (ccm *CoreComponentsMock) ProcessStatusHandler() common.ProcessStatusHandler
ProcessStatusHandler -
func (*CoreComponentsMock) SetInternalMarshalizer ¶ added in v1.2.0
func (ccm *CoreComponentsMock) SetInternalMarshalizer(m marshal.Marshalizer) error
SetInternalMarshalizer -
func (*CoreComponentsMock) StatusHandler ¶ added in v1.2.0
func (ccm *CoreComponentsMock) StatusHandler() core.AppStatusHandler
StatusHandler -
func (*CoreComponentsMock) TxMarshalizer ¶ added in v1.2.0
func (ccm *CoreComponentsMock) TxMarshalizer() marshal.Marshalizer
TxMarshalizer -
func (*CoreComponentsMock) TxSignHasher ¶ added in v1.2.0
func (ccm *CoreComponentsMock) TxSignHasher() hashing.Hasher
TxSignHasher -
func (*CoreComponentsMock) TxVersionChecker ¶ added in v1.2.0
func (ccm *CoreComponentsMock) TxVersionChecker() process.TxVersionCheckerHandler
TxVersionChecker -
func (*CoreComponentsMock) Uint64ByteSliceConverter ¶ added in v1.2.0
func (ccm *CoreComponentsMock) Uint64ByteSliceConverter() typeConverters.Uint64ByteSliceConverter
Uint64ByteSliceConverter -
func (*CoreComponentsMock) ValidatorPubKeyConverter ¶ added in v1.2.0
func (ccm *CoreComponentsMock) ValidatorPubKeyConverter() core.PubkeyConverter
ValidatorPubKeyConverter -
type CryptoComponentsMock ¶ added in v1.2.0
type CryptoComponentsMock struct { PubKey crypto.PublicKey BlockSig crypto.SingleSigner TxSig crypto.SingleSigner MultiSig crypto.MultiSigner BlKeyGen crypto.KeyGenerator TxKeyGen crypto.KeyGenerator // contains filtered or unexported fields }
CryptoComponentsMock -
func (*CryptoComponentsMock) BlockSignKeyGen ¶ added in v1.2.0
func (ccm *CryptoComponentsMock) BlockSignKeyGen() crypto.KeyGenerator
BlockSignKeyGen -
func (*CryptoComponentsMock) BlockSigner ¶ added in v1.2.0
func (ccm *CryptoComponentsMock) BlockSigner() crypto.SingleSigner
BlockSigner -
func (*CryptoComponentsMock) Clone ¶ added in v1.2.0
func (ccm *CryptoComponentsMock) Clone() interface{}
Clone -
func (*CryptoComponentsMock) IsInterfaceNil ¶ added in v1.2.0
func (ccm *CryptoComponentsMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*CryptoComponentsMock) MultiSigner ¶ added in v1.2.0
func (ccm *CryptoComponentsMock) MultiSigner() crypto.MultiSigner
MultiSigner -
func (*CryptoComponentsMock) PublicKey ¶ added in v1.2.0
func (ccm *CryptoComponentsMock) PublicKey() crypto.PublicKey
PublicKey -
func (*CryptoComponentsMock) SetMultiSigner ¶ added in v1.2.0
func (ccm *CryptoComponentsMock) SetMultiSigner(m crypto.MultiSigner) error
SetMultiSigner -
func (*CryptoComponentsMock) TxSignKeyGen ¶ added in v1.2.0
func (ccm *CryptoComponentsMock) TxSignKeyGen() crypto.KeyGenerator
TxSignKeyGen -
func (*CryptoComponentsMock) TxSingleSigner ¶ added in v1.2.0
func (ccm *CryptoComponentsMock) TxSingleSigner() crypto.SingleSigner
TxSingleSigner -
type DataTrieTrackerStub ¶ added in v1.1.15
type DataTrieTrackerStub struct { ClearDataCachesCalled func() DirtyDataCalled func() map[string][]byte RetrieveValueCalled func(key []byte) ([]byte, error) SaveKeyValueCalled func(key []byte, value []byte) error SetDataTrieCalled func(tr common.Trie) DataTrieCalled func() common.Trie }
DataTrieTrackerStub -
func (*DataTrieTrackerStub) ClearDataCaches ¶ added in v1.1.15
func (dtts *DataTrieTrackerStub) ClearDataCaches()
ClearDataCaches -
func (*DataTrieTrackerStub) DataTrie ¶ added in v1.1.15
func (dtts *DataTrieTrackerStub) DataTrie() common.Trie
DataTrie -
func (*DataTrieTrackerStub) DirtyData ¶ added in v1.1.15
func (dtts *DataTrieTrackerStub) DirtyData() map[string][]byte
DirtyData -
func (*DataTrieTrackerStub) IsInterfaceNil ¶ added in v1.1.15
func (dtts *DataTrieTrackerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*DataTrieTrackerStub) RetrieveValue ¶ added in v1.1.15
func (dtts *DataTrieTrackerStub) RetrieveValue(key []byte) ([]byte, error)
RetrieveValue -
func (*DataTrieTrackerStub) SaveKeyValue ¶ added in v1.1.15
func (dtts *DataTrieTrackerStub) SaveKeyValue(key []byte, value []byte) error
SaveKeyValue -
func (*DataTrieTrackerStub) SetDataTrie ¶ added in v1.1.15
func (dtts *DataTrieTrackerStub) SetDataTrie(tr common.Trie)
SetDataTrie -
type EconomicsHandlerStub ¶ added in v1.2.0
type EconomicsHandlerStub struct { MaxGasLimitPerBlockCalled func() uint64 MaxGasLimitPerMiniBlockCalled func() uint64 MaxGasLimitPerBlockForSafeCrossShardCalled func() uint64 MaxGasLimitPerMiniBlockForSafeCrossShardCalled func() uint64 MaxGasLimitPerTxCalled func() uint64 SetMinGasPriceCalled func(minasPrice uint64) SetMinGasLimitCalled func(minGasLimit uint64) ComputeGasLimitCalled func(tx data.TransactionWithFeeHandler) uint64 ComputeMoveBalanceFeeCalled func(tx data.TransactionWithFeeHandler) *big.Int ComputeTxFeeCalled func(tx data.TransactionWithFeeHandler) *big.Int CheckValidityTxValuesCalled func(tx data.TransactionWithFeeHandler) error DeveloperPercentageCalled func() float64 MinGasPriceCalled func() uint64 LeaderPercentageCalled func() float64 ProtocolSustainabilityPercentageCalled func() float64 ProtocolSustainabilityAddressCalled func() string MinInflationRateCalled func() float64 MaxInflationRateCalled func(year uint32) float64 ComputeFeeForProcessingCalled func(tx data.TransactionWithFeeHandler, gasToUse uint64) *big.Int GasPriceModifierCalled func() float64 SplitTxGasInCategoriesCalled func(tx data.TransactionWithFeeHandler) (uint64, uint64) GasPriceForProcessingCalled func(tx data.TransactionWithFeeHandler) uint64 GasPriceForMoveCalled func(tx data.TransactionWithFeeHandler) uint64 MinGasPriceForProcessingCalled func() uint64 ComputeGasUsedAndFeeBasedOnRefundValueCalled func(tx data.TransactionWithFeeHandler, refundValue *big.Int) (uint64, *big.Int) ComputeTxFeeBasedOnGasUsedCalled func(tx data.TransactionWithFeeHandler, gasUsed uint64) *big.Int RewardsTopUpGradientPointCalled func() *big.Int RewardsTopUpFactorCalled func() float64 ComputeGasLimitBasedOnBalanceCalled func(tx data.TransactionWithFeeHandler, balance *big.Int) (uint64, error) }
EconomicsHandlerStub -
func (*EconomicsHandlerStub) CheckValidityTxValues ¶ added in v1.2.0
func (ehs *EconomicsHandlerStub) CheckValidityTxValues(tx data.TransactionWithFeeHandler) error
CheckValidityTxValues -
func (*EconomicsHandlerStub) ComputeFeeForProcessing ¶ added in v1.2.0
func (ehs *EconomicsHandlerStub) ComputeFeeForProcessing(tx data.TransactionWithFeeHandler, gasToUse uint64) *big.Int
ComputeFeeForProcessing -
func (*EconomicsHandlerStub) ComputeGasLimit ¶ added in v1.2.0
func (ehs *EconomicsHandlerStub) ComputeGasLimit(tx data.TransactionWithFeeHandler) uint64
ComputeGasLimit -
func (*EconomicsHandlerStub) ComputeGasLimitBasedOnBalance ¶ added in v1.2.4
func (ehs *EconomicsHandlerStub) ComputeGasLimitBasedOnBalance(tx data.TransactionWithFeeHandler, balance *big.Int) (uint64, error)
ComputeGasLimitBasedOnBalance -
func (*EconomicsHandlerStub) ComputeGasUsedAndFeeBasedOnRefundValue ¶ added in v1.2.0
func (ehs *EconomicsHandlerStub) ComputeGasUsedAndFeeBasedOnRefundValue(tx data.TransactionWithFeeHandler, refundValue *big.Int) (uint64, *big.Int)
ComputeGasUsedAndFeeBasedOnRefundValue -
func (*EconomicsHandlerStub) ComputeMoveBalanceFee ¶ added in v1.2.0
func (ehs *EconomicsHandlerStub) ComputeMoveBalanceFee(tx data.TransactionWithFeeHandler) *big.Int
ComputeMoveBalanceFee -
func (*EconomicsHandlerStub) ComputeTxFee ¶ added in v1.2.0
func (ehs *EconomicsHandlerStub) ComputeTxFee(tx data.TransactionWithFeeHandler) *big.Int
ComputeTxFee -
func (*EconomicsHandlerStub) ComputeTxFeeBasedOnGasUsed ¶ added in v1.2.0
func (ehs *EconomicsHandlerStub) ComputeTxFeeBasedOnGasUsed(tx data.TransactionWithFeeHandler, gasUsed uint64) *big.Int
ComputeTxFeeBasedOnGasUsed -
func (*EconomicsHandlerStub) DeveloperPercentage ¶ added in v1.2.0
func (ehs *EconomicsHandlerStub) DeveloperPercentage() float64
DeveloperPercentage -
func (*EconomicsHandlerStub) GasPerDataByte ¶ added in v1.2.0
func (ehs *EconomicsHandlerStub) GasPerDataByte() uint64
GasPerDataByte -
func (*EconomicsHandlerStub) GasPriceForMove ¶ added in v1.2.0
func (ehs *EconomicsHandlerStub) GasPriceForMove(tx data.TransactionWithFeeHandler) uint64
GasPriceForMove -
func (*EconomicsHandlerStub) GasPriceForProcessing ¶ added in v1.2.0
func (ehs *EconomicsHandlerStub) GasPriceForProcessing(tx data.TransactionWithFeeHandler) uint64
GasPriceForProcessing -
func (*EconomicsHandlerStub) GasPriceModifier ¶ added in v1.2.0
func (ehs *EconomicsHandlerStub) GasPriceModifier() float64
GasPriceModifier -
func (*EconomicsHandlerStub) GenesisTotalSupply ¶ added in v1.2.0
func (ehs *EconomicsHandlerStub) GenesisTotalSupply() *big.Int
GenesisTotalSupply -
func (*EconomicsHandlerStub) IsInterfaceNil ¶ added in v1.2.0
func (ehs *EconomicsHandlerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*EconomicsHandlerStub) LeaderPercentage ¶ added in v1.2.0
func (ehs *EconomicsHandlerStub) LeaderPercentage() float64
LeaderPercentage -
func (*EconomicsHandlerStub) MaxGasLimitPerBlock ¶ added in v1.2.0
func (ehs *EconomicsHandlerStub) MaxGasLimitPerBlock(uint32) uint64
MaxGasLimitPerBlock -
func (*EconomicsHandlerStub) MaxGasLimitPerBlockForSafeCrossShard ¶ added in v1.2.23
func (ehs *EconomicsHandlerStub) MaxGasLimitPerBlockForSafeCrossShard() uint64
MaxGasLimitPerBlockForSafeCrossShard -
func (*EconomicsHandlerStub) MaxGasLimitPerMiniBlock ¶ added in v1.2.23
func (ehs *EconomicsHandlerStub) MaxGasLimitPerMiniBlock(uint32) uint64
MaxGasLimitPerMiniBlock -
func (*EconomicsHandlerStub) MaxGasLimitPerMiniBlockForSafeCrossShard ¶ added in v1.2.23
func (ehs *EconomicsHandlerStub) MaxGasLimitPerMiniBlockForSafeCrossShard() uint64
MaxGasLimitPerMiniBlockForSafeCrossShard -
func (*EconomicsHandlerStub) MaxGasLimitPerTx ¶ added in v1.3.0
func (ehs *EconomicsHandlerStub) MaxGasLimitPerTx() uint64
MaxGasLimitPerTx -
func (*EconomicsHandlerStub) MaxInflationRate ¶ added in v1.2.0
func (ehs *EconomicsHandlerStub) MaxInflationRate(year uint32) float64
MaxInflationRate -
func (*EconomicsHandlerStub) MinGasLimit ¶ added in v1.2.0
func (ehs *EconomicsHandlerStub) MinGasLimit() uint64
MinGasLimit will return min gas limit
func (*EconomicsHandlerStub) MinGasPrice ¶ added in v1.2.0
func (ehs *EconomicsHandlerStub) MinGasPrice() uint64
MinGasPrice -
func (*EconomicsHandlerStub) MinGasPriceForProcessing ¶ added in v1.2.0
func (ehs *EconomicsHandlerStub) MinGasPriceForProcessing() uint64
MinGasPriceForProcessing -
func (*EconomicsHandlerStub) MinInflationRate ¶ added in v1.2.0
func (ehs *EconomicsHandlerStub) MinInflationRate() float64
MinInflationRate -
func (*EconomicsHandlerStub) ProtocolSustainabilityAddress ¶ added in v1.2.0
func (ehs *EconomicsHandlerStub) ProtocolSustainabilityAddress() string
ProtocolSustainabilityAddress will return the protocol sustainability address
func (*EconomicsHandlerStub) ProtocolSustainabilityPercentage ¶ added in v1.2.0
func (ehs *EconomicsHandlerStub) ProtocolSustainabilityPercentage() float64
ProtocolSustainabilityPercentage will return the protocol sustainability percentage value
func (*EconomicsHandlerStub) RewardsTopUpFactor ¶ added in v1.2.0
func (ehs *EconomicsHandlerStub) RewardsTopUpFactor() float64
RewardsTopUpFactor -
func (*EconomicsHandlerStub) RewardsTopUpGradientPoint ¶ added in v1.2.0
func (ehs *EconomicsHandlerStub) RewardsTopUpGradientPoint() *big.Int
RewardsTopUpGradientPoint -
func (*EconomicsHandlerStub) SplitTxGasInCategories ¶ added in v1.2.0
func (ehs *EconomicsHandlerStub) SplitTxGasInCategories(tx data.TransactionWithFeeHandler) (uint64, uint64)
SplitTxGasInCategories -
type EpochStartMetaBlockProcessorStub ¶ added in v1.2.0
type EpochStartMetaBlockProcessorStub struct { ValidateCalled func(data process.InterceptedData, fromConnectedPeer core.PeerID) error SaveCalled func(data process.InterceptedData, fromConnectedPeer core.PeerID, topic string) error RegisterHandlerCalled func(handler func(topic string, hash []byte, data interface{})) GetEpochStartMetaBlockCalled func(ctx context.Context) (data.MetaHeaderHandler, error) }
EpochStartMetaBlockProcessorStub -
func (*EpochStartMetaBlockProcessorStub) GetEpochStartMetaBlock ¶ added in v1.2.0
func (esmbps *EpochStartMetaBlockProcessorStub) GetEpochStartMetaBlock(ctx context.Context) (data.MetaHeaderHandler, error)
GetEpochStartMetaBlock -
func (*EpochStartMetaBlockProcessorStub) IsInterfaceNil ¶ added in v1.2.0
func (esmbps *EpochStartMetaBlockProcessorStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*EpochStartMetaBlockProcessorStub) RegisterHandler ¶ added in v1.2.0
func (esmbps *EpochStartMetaBlockProcessorStub) RegisterHandler(handler func(topic string, hash []byte, data interface{}))
RegisterHandler -
func (*EpochStartMetaBlockProcessorStub) Save ¶ added in v1.2.0
func (esmbps *EpochStartMetaBlockProcessorStub) Save(data process.InterceptedData, fromConnectedPeer core.PeerID, topic string) error
Save -
func (*EpochStartMetaBlockProcessorStub) Validate ¶ added in v1.2.0
func (esmbps *EpochStartMetaBlockProcessorStub) Validate(data process.InterceptedData, fromConnectedPeer core.PeerID) error
Validate -
type EpochStartNotifierStub ¶
type EpochStartNotifierStub struct { NotifyAllCalled func(hdr data.HeaderHandler) NotifyAllPrepareCalled func(hdr data.HeaderHandler, body data.BodyHandler) NotifyEpochChangeConfirmedCalled func(epoch uint32) }
EpochStartNotifierStub -
func (*EpochStartNotifierStub) IsInterfaceNil ¶
func (esnm *EpochStartNotifierStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*EpochStartNotifierStub) NotifyAll ¶
func (esnm *EpochStartNotifierStub) NotifyAll(hdr data.HeaderHandler)
NotifyAll -
func (*EpochStartNotifierStub) NotifyAllPrepare ¶
func (esnm *EpochStartNotifierStub) NotifyAllPrepare(metaHdr data.HeaderHandler, body data.BodyHandler)
NotifyAllPrepare -
func (*EpochStartNotifierStub) NotifyEpochChangeConfirmed ¶ added in v1.0.120
func (esnm *EpochStartNotifierStub) NotifyEpochChangeConfirmed(epoch uint32)
NotifyEpochChangeConfirmed -
type GasScheduleNotifierMock ¶ added in v1.1.12
GasScheduleNotifierMock -
func NewGasScheduleNotifierMock ¶ added in v1.1.12
func NewGasScheduleNotifierMock(gasSchedule map[string]map[string]uint64) *GasScheduleNotifierMock
NewGasScheduleNotifierMock -
func (*GasScheduleNotifierMock) IsInterfaceNil ¶ added in v1.1.12
func (g *GasScheduleNotifierMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*GasScheduleNotifierMock) LatestGasSchedule ¶ added in v1.1.12
func (g *GasScheduleNotifierMock) LatestGasSchedule() map[string]map[string]uint64
LatestGasSchedule -
func (*GasScheduleNotifierMock) RegisterNotifyHandler ¶ added in v1.1.12
func (g *GasScheduleNotifierMock) RegisterNotifyHandler(handler core.GasScheduleSubscribeHandler)
RegisterNotifyHandler -
func (*GasScheduleNotifierMock) UnRegisterAll ¶ added in v1.1.12
func (g *GasScheduleNotifierMock) UnRegisterAll()
UnRegisterAll -
type HeaderIntegrityVerifierStub ¶ added in v1.1.1
type HeaderIntegrityVerifierStub struct { VerifyCalled func(header data.HeaderHandler) error GetVersionCalled func(epoch uint32) string }
HeaderIntegrityVerifierStub -
func (*HeaderIntegrityVerifierStub) GetVersion ¶ added in v1.1.1
func (h *HeaderIntegrityVerifierStub) GetVersion(epoch uint32) string
GetVersion -
func (*HeaderIntegrityVerifierStub) IsInterfaceNil ¶ added in v1.1.1
func (h *HeaderIntegrityVerifierStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*HeaderIntegrityVerifierStub) Verify ¶ added in v1.1.1
func (h *HeaderIntegrityVerifierStub) Verify(header data.HeaderHandler) error
Verify -
type HeaderValidatorStub ¶
type HeaderValidatorStub struct {
IsHeaderConstructionValidCalled func(currHdr, prevHdr data.HeaderHandler) error
}
HeaderValidatorStub -
func (*HeaderValidatorStub) IsHeaderConstructionValid ¶
func (hvs *HeaderValidatorStub) IsHeaderConstructionValid(currHdr, prevHdr data.HeaderHandler) error
IsHeaderConstructionValid -
func (*HeaderValidatorStub) IsInterfaceNil ¶
func (hvs *HeaderValidatorStub) IsInterfaceNil() bool
IsInterfaceNil returns if underlying object is true
type HeadersCacherStub ¶
type HeadersCacherStub struct { AddCalled func(headerHash []byte, header data.HeaderHandler) RemoveHeaderByHashCalled func(headerHash []byte) RemoveHeaderByNonceAndShardIdCalled func(hdrNonce uint64, shardId uint32) GetHeaderByNonceAndShardIdCalled func(hdrNonce uint64, shardId uint32) ([]data.HeaderHandler, [][]byte, error) GetHeaderByHashCalled func(hash []byte) (data.HeaderHandler, error) ClearCalled func() RegisterHandlerCalled func(handler func(header data.HeaderHandler, shardHeaderHash []byte)) NoncesCalled func(shardId uint32) []uint64 LenCalled func() int MaxSizeCalled func() int GetNumHeadersCalled func(shardId uint32) int }
HeadersCacherStub -
func (*HeadersCacherStub) AddHeader ¶
func (hcs *HeadersCacherStub) AddHeader(headerHash []byte, header data.HeaderHandler)
AddHeader -
func (*HeadersCacherStub) GetHeaderByHash ¶
func (hcs *HeadersCacherStub) GetHeaderByHash(hash []byte) (data.HeaderHandler, error)
GetHeaderByHash -
func (*HeadersCacherStub) GetHeadersByNonceAndShardId ¶
func (hcs *HeadersCacherStub) GetHeadersByNonceAndShardId(hdrNonce uint64, shardId uint32) ([]data.HeaderHandler, [][]byte, error)
GetHeadersByNonceAndShardId -
func (*HeadersCacherStub) GetNumHeaders ¶
func (hcs *HeadersCacherStub) GetNumHeaders(shardId uint32) int
GetNumHeaders -
func (*HeadersCacherStub) IsInterfaceNil ¶
func (hcs *HeadersCacherStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*HeadersCacherStub) Nonces ¶
func (hcs *HeadersCacherStub) Nonces(shardId uint32) []uint64
Nonces -
func (*HeadersCacherStub) RegisterHandler ¶
func (hcs *HeadersCacherStub) RegisterHandler(handler func(header data.HeaderHandler, shardHeaderHash []byte))
RegisterHandler -
func (*HeadersCacherStub) RemoveHeaderByHash ¶
func (hcs *HeadersCacherStub) RemoveHeaderByHash(headerHash []byte)
RemoveHeaderByHash -
func (*HeadersCacherStub) RemoveHeaderByNonceAndShardId ¶
func (hcs *HeadersCacherStub) RemoveHeaderByNonceAndShardId(hdrNonce uint64, shardId uint32)
RemoveHeaderByNonceAndShardId -
type ImportStartHandlerStub ¶ added in v1.0.133
type ImportStartHandlerStub struct { SetStartImportCalled func() error ResetStartImportCalled func() error ShouldStartImportCalled func() bool IsAfterExportBeforeImportCalled func() bool }
ImportStartHandlerStub -
func (*ImportStartHandlerStub) IsAfterExportBeforeImport ¶ added in v1.0.133
func (ish *ImportStartHandlerStub) IsAfterExportBeforeImport() bool
IsAfterExportBeforeImport -
func (*ImportStartHandlerStub) IsInterfaceNil ¶ added in v1.0.133
func (ish *ImportStartHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*ImportStartHandlerStub) ResetStartImport ¶ added in v1.0.133
func (ish *ImportStartHandlerStub) ResetStartImport() error
ResetStartImport -
func (*ImportStartHandlerStub) SetStartImport ¶ added in v1.0.133
func (ish *ImportStartHandlerStub) SetStartImport() error
SetStartImport -
func (*ImportStartHandlerStub) ShouldStartImport ¶ added in v1.0.133
func (ish *ImportStartHandlerStub) ShouldStartImport() bool
ShouldStartImport -
type LatestStorageDataProviderStub ¶ added in v1.0.111
type LatestStorageDataProviderStub struct { GetParentDirAndLastEpochCalled func() (string, uint32, error) GetCalled func() (storage.LatestDataFromStorage, error) GetShardsFromDirectoryCalled func(path string) ([]string, error) GetParentDirectoryCalled func() string }
LatestStorageDataProviderStub -
func (*LatestStorageDataProviderStub) Get ¶ added in v1.0.111
func (lsdps *LatestStorageDataProviderStub) Get() (storage.LatestDataFromStorage, error)
Get -
func (*LatestStorageDataProviderStub) GetParentDirAndLastEpoch ¶ added in v1.0.111
func (lsdps *LatestStorageDataProviderStub) GetParentDirAndLastEpoch() (string, uint32, error)
GetParentDirAndLastEpoch -
func (*LatestStorageDataProviderStub) GetParentDirectory ¶ added in v1.3.0
func (lsdps *LatestStorageDataProviderStub) GetParentDirectory() string
GetParentDirectory -
func (*LatestStorageDataProviderStub) GetShardsFromDirectory ¶ added in v1.0.111
func (lsdps *LatestStorageDataProviderStub) GetShardsFromDirectory(path string) ([]string, error)
GetShardsFromDirectory -
func (*LatestStorageDataProviderStub) IsInterfaceNil ¶ added in v1.0.111
func (lsdps *LatestStorageDataProviderStub) IsInterfaceNil() bool
IsInterfaceNil --
type MarshalizerMock ¶
type MarshalizerMock struct {
Fail bool
}
MarshalizerMock that will be used for testing
func (*MarshalizerMock) IsInterfaceNil ¶
func (mm *MarshalizerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*MarshalizerMock) Marshal ¶
func (mm *MarshalizerMock) Marshal(obj interface{}) ([]byte, error)
Marshal converts the input object in a slice of bytes
func (*MarshalizerMock) Unmarshal ¶
func (mm *MarshalizerMock) Unmarshal(obj interface{}, buff []byte) error
Unmarshal applies the serialized values over an instantiated object
type MessengerStub ¶ added in v1.0.102
type MessengerStub struct { ConnectedPeersCalled func() []core.PeerID RegisterMessageProcessorCalled func(topic string, identifier string, handler p2p.MessageProcessor) error CreateTopicCalled func(topic string, identifier bool) error UnjoinAllTopicsCalled func() error IDCalled func() core.PeerID }
MessengerStub -
func (*MessengerStub) ConnectedFullHistoryPeersOnTopic ¶ added in v1.2.0
func (m *MessengerStub) ConnectedFullHistoryPeersOnTopic(_ string) []core.PeerID
ConnectedFullHistoryPeersOnTopic -
func (*MessengerStub) ConnectedPeers ¶ added in v1.0.102
func (m *MessengerStub) ConnectedPeers() []core.PeerID
ConnectedPeers -
func (*MessengerStub) ConnectedPeersOnTopic ¶ added in v1.0.102
func (m *MessengerStub) ConnectedPeersOnTopic(_ string) []core.PeerID
ConnectedPeersOnTopic -
func (*MessengerStub) CreateTopic ¶ added in v1.0.102
func (m *MessengerStub) CreateTopic(topic string, identifier bool) error
CreateTopic -
func (*MessengerStub) HasTopic ¶ added in v1.0.102
func (m *MessengerStub) HasTopic(_ string) bool
HasTopic -
func (*MessengerStub) IsInterfaceNil ¶ added in v1.0.102
func (m *MessengerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*MessengerStub) RegisterMessageProcessor ¶ added in v1.0.102
func (m *MessengerStub) RegisterMessageProcessor(topic string, identifier string, handler p2p.MessageProcessor) error
RegisterMessageProcessor -
func (*MessengerStub) SendToConnectedPeer ¶ added in v1.0.102
SendToConnectedPeer -
func (*MessengerStub) UnjoinAllTopics ¶ added in v1.0.132
func (m *MessengerStub) UnjoinAllTopics() error
UnjoinAllTopics -
func (*MessengerStub) UnregisterAllMessageProcessors ¶ added in v1.0.102
func (m *MessengerStub) UnregisterAllMessageProcessors() error
UnregisterAllMessageProcessors -
func (*MessengerStub) UnregisterMessageProcessor ¶ added in v1.0.102
func (m *MessengerStub) UnregisterMessageProcessor(_ string, _ string) error
UnregisterMessageProcessor -
type MetaBlockInterceptorProcessorStub ¶ added in v1.0.116
type MetaBlockInterceptorProcessorStub struct {
GetEpochStartMetaBlockCalled func() (data.MetaHeaderHandler, error)
}
MetaBlockInterceptorProcessorStub -
func (*MetaBlockInterceptorProcessorStub) GetEpochStartMetaBlock ¶ added in v1.0.116
func (m *MetaBlockInterceptorProcessorStub) GetEpochStartMetaBlock(_ context.Context) (data.MetaHeaderHandler, error)
GetEpochStartMetaBlock -
func (*MetaBlockInterceptorProcessorStub) IsInterfaceNil ¶ added in v1.0.116
func (m *MetaBlockInterceptorProcessorStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*MetaBlockInterceptorProcessorStub) RegisterHandler ¶ added in v1.0.133
func (m *MetaBlockInterceptorProcessorStub) RegisterHandler(_ func(topic string, hash []byte, data interface{}))
RegisterHandler -
func (*MetaBlockInterceptorProcessorStub) Save ¶ added in v1.0.116
func (m *MetaBlockInterceptorProcessorStub) Save(_ process.InterceptedData, _ core.PeerID, _ string) error
Save -
func (*MetaBlockInterceptorProcessorStub) SignalEndOfProcessing ¶ added in v1.0.116
func (m *MetaBlockInterceptorProcessorStub) SignalEndOfProcessing(_ []process.InterceptedData)
SignalEndOfProcessing -
func (*MetaBlockInterceptorProcessorStub) Validate ¶ added in v1.0.116
func (m *MetaBlockInterceptorProcessorStub) Validate(_ process.InterceptedData, _ core.PeerID) error
Validate -
type NodeInfoMock ¶ added in v1.0.104
type NodeInfoMock struct {
// contains filtered or unexported fields
}
NodeInfoMock -
func NewNodeInfo ¶ added in v1.0.104
func NewNodeInfo(address []byte, pubKey []byte, shardId uint32, initialRating uint32) *NodeInfoMock
NewNodeInfo -
func (*NodeInfoMock) AddressBytes ¶ added in v1.0.115
func (n *NodeInfoMock) AddressBytes() []byte
AddressBytes -
func (*NodeInfoMock) AssignedShard ¶ added in v1.0.104
func (n *NodeInfoMock) AssignedShard() uint32
AssignedShard -
func (*NodeInfoMock) GetInitialRating ¶ added in v1.0.149
func (n *NodeInfoMock) GetInitialRating() uint32
GetInitialRating -
func (*NodeInfoMock) IsInterfaceNil ¶ added in v1.0.104
func (n *NodeInfoMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*NodeInfoMock) PubKeyBytes ¶ added in v1.0.115
func (n *NodeInfoMock) PubKeyBytes() []byte
PubKeyBytes -
type NodeShufflerMock ¶ added in v1.0.104
type NodeShufflerMock struct { }
NodeShufflerMock -
func (*NodeShufflerMock) IsInterfaceNil ¶ added in v1.0.104
func (nsm *NodeShufflerMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*NodeShufflerMock) UpdateNodeLists ¶ added in v1.0.104
func (nsm *NodeShufflerMock) UpdateNodeLists(args sharding.ArgsUpdateNodes) (*sharding.ResUpdateNodes, error)
UpdateNodeLists -
func (*NodeShufflerMock) UpdateParams ¶ added in v1.0.104
func (nsm *NodeShufflerMock) UpdateParams( _ uint32, _ uint32, _ float32, _ bool, )
UpdateParams -
type NodesCoordinatorStub ¶ added in v1.0.102
type NodesCoordinatorStub struct { ComputeValidatorsGroupCalled func(randomness []byte, round uint64, shardId uint32, epoch uint32) ([]sharding.Validator, error) GetValidatorsPublicKeysCalled func(randomness []byte, round uint64, shardId uint32, epoch uint32) ([]string, error) GetValidatorsRewardsAddressesCalled func(randomness []byte, round uint64, shardId uint32, epoch uint32) ([]string, error) GetValidatorWithPublicKeyCalled func(publicKey []byte) (validator sharding.Validator, shardId uint32, err error) GetAllValidatorsPublicKeysCalled func() (map[uint32][][]byte, error) ConsensusGroupSizeCalled func(shardID uint32) int EpochStartPrepareCalled func(metaHdr data.HeaderHandler, body data.BodyHandler) }
NodesCoordinatorStub -
func (*NodesCoordinatorStub) ComputeAdditionalLeaving ¶ added in v1.0.115
func (ncm *NodesCoordinatorStub) ComputeAdditionalLeaving(_ []*state.ShardValidatorInfo) (map[uint32][]sharding.Validator, error)
ComputeAdditionalLeaving -
func (*NodesCoordinatorStub) ComputeConsensusGroup ¶ added in v1.0.102
func (ncm *NodesCoordinatorStub) ComputeConsensusGroup( randomness []byte, round uint64, shardId uint32, epoch uint32, ) (validatorsGroup []sharding.Validator, err error)
ComputeConsensusGroup -
func (*NodesCoordinatorStub) ConsensusGroupSize ¶ added in v1.0.102
func (ncm *NodesCoordinatorStub) ConsensusGroupSize(shardID uint32) int
ConsensusGroupSize -
func (*NodesCoordinatorStub) EpochStartPrepare ¶ added in v1.3.7
func (ncm *NodesCoordinatorStub) EpochStartPrepare(metaHdr data.HeaderHandler, body data.BodyHandler)
EpochStartPrepare -
func (*NodesCoordinatorStub) GetAllEligibleValidatorsPublicKeys ¶ added in v1.0.102
func (ncm *NodesCoordinatorStub) GetAllEligibleValidatorsPublicKeys(_ uint32) (map[uint32][][]byte, error)
GetAllEligibleValidatorsPublicKeys -
func (*NodesCoordinatorStub) GetAllLeavingValidatorsPublicKeys ¶ added in v1.0.102
func (ncm *NodesCoordinatorStub) GetAllLeavingValidatorsPublicKeys(_ uint32) (map[uint32][][]byte, error)
GetAllLeavingValidatorsPublicKeys -
func (*NodesCoordinatorStub) GetAllValidatorsPublicKeys ¶ added in v1.0.102
func (ncm *NodesCoordinatorStub) GetAllValidatorsPublicKeys(_ uint32) (map[uint32][][]byte, error)
GetAllValidatorsPublicKeys -
func (*NodesCoordinatorStub) GetAllWaitingValidatorsPublicKeys ¶ added in v1.0.102
func (ncm *NodesCoordinatorStub) GetAllWaitingValidatorsPublicKeys(_ uint32) (map[uint32][][]byte, error)
GetAllWaitingValidatorsPublicKeys -
func (*NodesCoordinatorStub) GetChance ¶ added in v1.0.102
func (ncm *NodesCoordinatorStub) GetChance(uint32) uint32
GetChance -
func (*NodesCoordinatorStub) GetConsensusValidatorsPublicKeys ¶ added in v1.0.102
func (ncm *NodesCoordinatorStub) GetConsensusValidatorsPublicKeys( randomness []byte, round uint64, shardId uint32, epoch uint32, ) ([]string, error)
GetConsensusValidatorsPublicKeys -
func (*NodesCoordinatorStub) GetConsensusWhitelistedNodes ¶ added in v1.0.102
func (ncm *NodesCoordinatorStub) GetConsensusWhitelistedNodes( _ uint32, ) (map[string]struct{}, error)
GetConsensusWhitelistedNodes return the whitelisted nodes allowed to send consensus messages, for each of the shards
func (*NodesCoordinatorStub) GetNumTotalEligible ¶ added in v1.0.102
func (ncm *NodesCoordinatorStub) GetNumTotalEligible() uint64
GetNumTotalEligible -
func (*NodesCoordinatorStub) GetOwnPublicKey ¶ added in v1.0.102
func (ncm *NodesCoordinatorStub) GetOwnPublicKey() []byte
GetOwnPublicKey -
func (*NodesCoordinatorStub) GetSavedStateKey ¶ added in v1.0.102
func (ncm *NodesCoordinatorStub) GetSavedStateKey() []byte
GetSavedStateKey -
func (*NodesCoordinatorStub) GetSelectedPublicKeys ¶ added in v1.0.102
func (ncm *NodesCoordinatorStub) GetSelectedPublicKeys(_ []byte, _ uint32, _ uint32) ([]string, error)
GetSelectedPublicKeys -
func (*NodesCoordinatorStub) GetValidatorWithPublicKey ¶ added in v1.0.102
func (ncm *NodesCoordinatorStub) GetValidatorWithPublicKey(publicKey []byte) (sharding.Validator, uint32, error)
GetValidatorWithPublicKey -
func (*NodesCoordinatorStub) GetValidatorsIndexes ¶ added in v1.0.102
func (ncm *NodesCoordinatorStub) GetValidatorsIndexes(_ []string, _ uint32) ([]uint64, error)
GetValidatorsIndexes -
func (*NodesCoordinatorStub) IsInterfaceNil ¶ added in v1.0.102
func (ncm *NodesCoordinatorStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*NodesCoordinatorStub) LoadState ¶ added in v1.0.102
func (ncm *NodesCoordinatorStub) LoadState(_ []byte) error
LoadState -
func (*NodesCoordinatorStub) NodesCoordinatorToRegistry ¶ added in v1.3.7
func (ncm *NodesCoordinatorStub) NodesCoordinatorToRegistry() *sharding.NodesCoordinatorRegistry
NodesCoordinatorToRegistry -
func (*NodesCoordinatorStub) SetConfig ¶ added in v1.0.102
func (ncm *NodesCoordinatorStub) SetConfig(_ *sharding.NodesCoordinatorRegistry) error
SetConfig -
func (*NodesCoordinatorStub) SetNodesPerShards ¶ added in v1.0.102
func (ncm *NodesCoordinatorStub) SetNodesPerShards(_ map[uint32][]sharding.Validator, _ map[uint32][]sharding.Validator, _ []sharding.Validator, _ uint32) error
SetNodesPerShards -
func (*NodesCoordinatorStub) ShardIdForEpoch ¶ added in v1.0.102
func (ncm *NodesCoordinatorStub) ShardIdForEpoch(_ uint32) (uint32, error)
ShardIdForEpoch returns the nodesCoordinator configured ShardId for specified epoch if epoch configuration exists, otherwise error
func (*NodesCoordinatorStub) ShuffleOutForEpoch ¶ added in v1.0.111
func (ncm *NodesCoordinatorStub) ShuffleOutForEpoch(_ uint32)
ShuffleOutForEpoch verifies if the shards changed in the new epoch and calls the shuffleOutHandler
func (*NodesCoordinatorStub) ValidatorsWeights ¶ added in v1.0.102
func (ncm *NodesCoordinatorStub) ValidatorsWeights(_ []sharding.Validator) ([]uint32, error)
ValidatorsWeights -
type NodesSetupStub ¶ added in v1.0.104
type NodesSetupStub struct { InitialNodesInfoForShardCalled func(shardId uint32) ([]sharding.GenesisNodeInfoHandler, []sharding.GenesisNodeInfoHandler, error) InitialNodesInfoCalled func() (map[uint32][]sharding.GenesisNodeInfoHandler, map[uint32][]sharding.GenesisNodeInfoHandler) GetStartTimeCalled func() int64 GetRoundDurationCalled func() uint64 GetShardConsensusGroupSizeCalled func() uint32 GetMetaConsensusGroupSizeCalled func() uint32 NumberOfShardsCalled func() uint32 MinNumberOfNodesCalled func() uint32 AllInitialNodesCalled func() []sharding.GenesisNodeInfoHandler GetAdaptivityCalled func() bool GetHysteresisCalled func() float32 GetShardIDForPubKeyCalled func(pubkey []byte) (uint32, error) InitialEligibleNodesPubKeysForShardCalled func(shardId uint32) ([]string, error) InitialNodesPubKeysCalled func() map[uint32][]string MinNumberOfMetaNodesCalled func() uint32 MinNumberOfShardNodesCalled func() uint32 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.0.104
func (n *NodesSetupStub) GetMetaConsensusGroupSize() uint32
GetMetaConsensusGroupSize -
func (*NodesSetupStub) GetRoundDuration ¶ added in v1.0.104
func (n *NodesSetupStub) GetRoundDuration() uint64
GetRoundDuration -
func (*NodesSetupStub) GetShardConsensusGroupSize ¶ added in v1.0.104
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.0.104
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.0.104
func (n *NodesSetupStub) InitialNodesInfo() (map[uint32][]sharding.GenesisNodeInfoHandler, map[uint32][]sharding.GenesisNodeInfoHandler)
InitialNodesInfo -
func (*NodesSetupStub) InitialNodesInfoForShard ¶ added in v1.0.104
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.0.104
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.0.110
func (n *NodesSetupStub) MinNumberOfNodes() uint32
MinNumberOfNodes -
func (*NodesSetupStub) MinNumberOfNodesWithHysteresis ¶ added in v1.1.3
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.0.104
func (n *NodesSetupStub) NumberOfShards() uint32
NumberOfShards -
type PubkeyConverterMock ¶ added in v1.0.104
type PubkeyConverterMock struct {
// contains filtered or unexported fields
}
PubkeyConverterMock -
func NewPubkeyConverterMock ¶ added in v1.0.104
func NewPubkeyConverterMock(addressLen int) *PubkeyConverterMock
NewPubkeyConverterMock -
func (*PubkeyConverterMock) Decode ¶ added in v1.0.104
func (pcm *PubkeyConverterMock) Decode(humanReadable string) ([]byte, error)
Decode -
func (*PubkeyConverterMock) Encode ¶ added in v1.0.104
func (pcm *PubkeyConverterMock) Encode(pkBytes []byte) string
Encode -
func (*PubkeyConverterMock) IsInterfaceNil ¶ added in v1.0.104
func (pcm *PubkeyConverterMock) IsInterfaceNil() bool
IsInterfaceNil -
type RaterStub ¶ added in v1.0.104
type RaterStub struct { GetRatingCalled func(string) uint32 GetStartRatingCalled func() uint32 GetSignedBlocksThresholdCalled func() float32 ComputeIncreaseProposerCalled func(shardId uint32, rating uint32) uint32 ComputeDecreaseProposerCalled func(shardId uint32, rating uint32, consecutiveMissedBlocks uint32) uint32 RevertIncreaseProposerCalled func(shardId uint32, rating uint32, nrReverts uint32) uint32 ComputeIncreaseValidatorCalled func(shardId uint32, rating uint32) uint32 ComputeDecreaseValidatorCalled func(shardId uint32, rating uint32) uint32 GetChanceCalled func(rating uint32) uint32 }
RaterStub -
func (*RaterStub) ComputeDecreaseProposer ¶ added in v1.0.104
func (rm *RaterStub) ComputeDecreaseProposer(shardId uint32, currentRating uint32, consecutiveMisses uint32) uint32
ComputeDecreaseProposer -
func (*RaterStub) ComputeDecreaseValidator ¶ added in v1.0.104
ComputeDecreaseValidator -
func (*RaterStub) ComputeIncreaseProposer ¶ added in v1.0.104
ComputeIncreaseProposer -
func (*RaterStub) ComputeIncreaseValidator ¶ added in v1.0.104
ComputeIncreaseValidator -
func (*RaterStub) GetSignedBlocksThreshold ¶ added in v1.0.104
GetSignedBlocksThreshold -
func (*RaterStub) GetStartRating ¶ added in v1.0.104
GetStartRating -
func (*RaterStub) IsInterfaceNil ¶ added in v1.0.104
IsInterfaceNil -
type RewardsCreatorStub ¶ added in v1.1.15
type RewardsCreatorStub struct { CreateRewardsMiniBlocksCalled func( metaBlock data.MetaHeaderHandler, validatorsInfo map[uint32][]*state.ValidatorInfo, computedEconomics *block.Economics, ) (block.MiniBlockSlice, error) VerifyRewardsMiniBlocksCalled func( metaBlock data.MetaHeaderHandler, validatorsInfo map[uint32][]*state.ValidatorInfo, computedEconomics *block.Economics, ) error GetProtocolSustainabilityRewardsCalled func() *big.Int GetLocalTxCacheCalled func() epochStart.TransactionCacher CreateMarshalizedDataCalled func(body *block.Body) map[string][][]byte GetRewardsTxsCalled func(body *block.Body) map[string]data.TransactionHandler SaveTxBlockToStorageCalled func(metaBlock data.MetaHeaderHandler, body *block.Body) DeleteTxsFromStorageCalled func(metaBlock data.MetaHeaderHandler, body *block.Body) RemoveBlockDataFromPoolsCalled func(metaBlock data.MetaHeaderHandler, body *block.Body) }
RewardsCreatorStub -
func (*RewardsCreatorStub) CreateMarshalizedData ¶ added in v1.1.15
func (rcs *RewardsCreatorStub) CreateMarshalizedData(body *block.Body) map[string][][]byte
CreateMarshalizedData -
func (*RewardsCreatorStub) CreateRewardsMiniBlocks ¶ added in v1.1.15
func (rcs *RewardsCreatorStub) CreateRewardsMiniBlocks( metaBlock data.MetaHeaderHandler, validatorsInfo map[uint32][]*state.ValidatorInfo, computedEconomics *block.Economics, ) (block.MiniBlockSlice, error)
CreateRewardsMiniBlocks -
func (*RewardsCreatorStub) DeleteTxsFromStorage ¶ added in v1.1.15
func (rcs *RewardsCreatorStub) DeleteTxsFromStorage(metaBlock data.MetaHeaderHandler, body *block.Body)
DeleteTxsFromStorage -
func (*RewardsCreatorStub) GetLocalTxCache ¶ added in v1.1.15
func (rcs *RewardsCreatorStub) GetLocalTxCache() epochStart.TransactionCacher
GetLocalTxCache -
func (*RewardsCreatorStub) GetProtocolSustainabilityRewards ¶ added in v1.1.15
func (rcs *RewardsCreatorStub) GetProtocolSustainabilityRewards() *big.Int
GetProtocolSustainabilityRewards -
func (*RewardsCreatorStub) GetRewardsTxs ¶ added in v1.1.15
func (rcs *RewardsCreatorStub) GetRewardsTxs(body *block.Body) map[string]data.TransactionHandler
GetRewardsTxs -
func (*RewardsCreatorStub) IsInterfaceNil ¶ added in v1.1.15
func (rcs *RewardsCreatorStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*RewardsCreatorStub) RemoveBlockDataFromPools ¶ added in v1.1.15
func (rcs *RewardsCreatorStub) RemoveBlockDataFromPools(metaBlock data.MetaHeaderHandler, body *block.Body)
RemoveBlockDataFromPools -
func (*RewardsCreatorStub) SaveTxBlockToStorage ¶ added in v1.1.15
func (rcs *RewardsCreatorStub) SaveTxBlockToStorage(metaBlock data.MetaHeaderHandler, body *block.Body)
SaveTxBlockToStorage -
func (*RewardsCreatorStub) VerifyRewardsMiniBlocks ¶ added in v1.1.15
func (rcs *RewardsCreatorStub) VerifyRewardsMiniBlocks( metaBlock data.MetaHeaderHandler, validatorsInfo map[uint32][]*state.ValidatorInfo, computedEconomics *block.Economics, ) error
VerifyRewardsMiniBlocks -
type RewardsHandlerStub ¶ added in v1.0.102
type RewardsHandlerStub struct { LeaderPercentageCalled func() float64 ProtocolSustainabilityPercentageCalled func() float64 ProtocolSustainabilityAddressCalled func() string MinInflationRateCalled func() float64 MaxInflationRateCalled func(year uint32) float64 RewardsTopUpGradientPointCalled func() *big.Int RewardsTopUpFactorCalled func() float64 }
RewardsHandlerStub -
func (*RewardsHandlerStub) IsInterfaceNil ¶ added in v1.0.102
func (r *RewardsHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*RewardsHandlerStub) LeaderPercentage ¶ added in v1.0.102
func (r *RewardsHandlerStub) LeaderPercentage() float64
LeaderPercentage -
func (*RewardsHandlerStub) MaxInflationRate ¶ added in v1.0.102
func (r *RewardsHandlerStub) MaxInflationRate(year uint32) float64
MaxInflationRate -
func (*RewardsHandlerStub) MinInflationRate ¶ added in v1.0.102
func (r *RewardsHandlerStub) MinInflationRate() float64
MinInflationRate -
func (*RewardsHandlerStub) ProtocolSustainabilityAddress ¶ added in v1.0.147
func (r *RewardsHandlerStub) ProtocolSustainabilityAddress() string
ProtocolSustainabilityAddress will return the protocol sustainability address
func (*RewardsHandlerStub) ProtocolSustainabilityPercentage ¶ added in v1.0.147
func (r *RewardsHandlerStub) ProtocolSustainabilityPercentage() float64
ProtocolSustainabilityPercentage will return the protocol sustainability percentage value
func (*RewardsHandlerStub) RewardsTopUpFactor ¶ added in v1.1.15
func (r *RewardsHandlerStub) RewardsTopUpFactor() float64
RewardsTopUpFactor -
func (*RewardsHandlerStub) RewardsTopUpGradientPoint ¶ added in v1.1.15
func (r *RewardsHandlerStub) RewardsTopUpGradientPoint() *big.Int
RewardsTopUpGradientPoint -
type RoundHandlerStub ¶ added in v1.2.0
type RoundHandlerStub struct { RoundIndex int64 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 }
RoundHandlerStub -
func (*RoundHandlerStub) Index ¶ added in v1.2.0
func (rndm *RoundHandlerStub) Index() int64
Index -
func (*RoundHandlerStub) IsInterfaceNil ¶ added in v1.2.0
func (rndm *RoundHandlerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*RoundHandlerStub) RemainingTime ¶ added in v1.2.0
func (rndm *RoundHandlerStub) RemainingTime(startTime time.Time, maxTime time.Duration) time.Duration
RemainingTime -
func (*RoundHandlerStub) TimeDuration ¶ added in v1.2.0
func (rndm *RoundHandlerStub) TimeDuration() time.Duration
TimeDuration -
func (*RoundHandlerStub) TimeStamp ¶ added in v1.2.0
func (rndm *RoundHandlerStub) TimeStamp() time.Time
TimeStamp -
func (*RoundHandlerStub) UpdateRound ¶ added in v1.2.0
func (rndm *RoundHandlerStub) UpdateRound(genesisRoundTimeStamp time.Time, timeStamp time.Time)
UpdateRound -
type RoundTimeDurationHandler ¶ added in v1.0.102
RoundTimeDurationHandler -
func (*RoundTimeDurationHandler) IsInterfaceNil ¶ added in v1.0.102
func (r *RoundTimeDurationHandler) IsInterfaceNil() bool
IsInterfaceNil -
func (*RoundTimeDurationHandler) TimeDuration ¶ added in v1.0.102
func (r *RoundTimeDurationHandler) TimeDuration() time.Duration
TimeDuration -
type ShardCoordinatorStub ¶ added in v1.0.104
type ShardCoordinatorStub struct { NumberOfShardsCalled func() uint32 ComputeIdCalled func(address []byte) uint32 SelfIdCalled func() uint32 SameShardCalled func(firstAddress, secondAddress []byte) bool CommunicationIdentifierCalled func(destShardID uint32) string }
ShardCoordinatorStub -
func (*ShardCoordinatorStub) CommunicationIdentifier ¶ added in v1.0.104
func (coordinator *ShardCoordinatorStub) CommunicationIdentifier(destShardID uint32) string
CommunicationIdentifier -
func (*ShardCoordinatorStub) ComputeId ¶ added in v1.0.104
func (coordinator *ShardCoordinatorStub) ComputeId(address []byte) uint32
ComputeId -
func (*ShardCoordinatorStub) IsInterfaceNil ¶ added in v1.0.104
func (coordinator *ShardCoordinatorStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ShardCoordinatorStub) NumberOfShards ¶ added in v1.0.104
func (coordinator *ShardCoordinatorStub) NumberOfShards() uint32
NumberOfShards -
func (*ShardCoordinatorStub) SameShard ¶ added in v1.0.104
func (coordinator *ShardCoordinatorStub) SameShard(firstAddress, secondAddress []byte) bool
SameShard -
func (*ShardCoordinatorStub) SelfId ¶ added in v1.0.104
func (coordinator *ShardCoordinatorStub) SelfId() uint32
SelfId -
type ShardIdHasMapStub ¶
type ShardIdHasMapStub struct { LoadCalled func(shardId uint32) ([]byte, bool) StoreCalled func(shardId uint32, hash []byte) RangeCalled func(f func(shardId uint32, hash []byte) bool) DeleteCalled func(shardId uint32) }
ShardIdHasMapStub -
func (*ShardIdHasMapStub) IsInterfaceNil ¶
func (sihsm *ShardIdHasMapStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ShardIdHasMapStub) Load ¶
func (sihsm *ShardIdHasMapStub) Load(shardId uint32) ([]byte, bool)
Load -
func (*ShardIdHasMapStub) Range ¶
func (sihsm *ShardIdHasMapStub) Range(f func(shardId uint32, hash []byte) bool)
Range -
func (*ShardIdHasMapStub) Store ¶
func (sihsm *ShardIdHasMapStub) Store(shardId uint32, hash []byte)
Store -
type StakingDataProviderStub ¶ added in v1.1.15
type StakingDataProviderStub struct { CleanCalled func() PrepareStakingDataCalled func(keys map[uint32][][]byte) error GetTotalStakeEligibleNodesCalled func() *big.Int GetTotalTopUpStakeEligibleNodesCalled func() *big.Int GetNodeStakedTopUpCalled func(blsKey []byte) (*big.Int, error) FillValidatorInfoCalled func(blsKey []byte) error ComputeUnQualifiedNodesCalled func(validatorInfos map[uint32][]*state.ValidatorInfo) ([][]byte, map[string][][]byte, error) }
StakingDataProviderStub -
func (*StakingDataProviderStub) Clean ¶ added in v1.1.15
func (sdps *StakingDataProviderStub) Clean()
Clean -
func (*StakingDataProviderStub) ComputeUnQualifiedNodes ¶ added in v1.1.15
func (sdps *StakingDataProviderStub) ComputeUnQualifiedNodes(validatorInfos map[uint32][]*state.ValidatorInfo) ([][]byte, map[string][][]byte, error)
ComputeUnQualifiedNodes -
func (*StakingDataProviderStub) FillValidatorInfo ¶ added in v1.1.15
func (sdps *StakingDataProviderStub) FillValidatorInfo(blsKey []byte) error
FillValidatorInfo -
func (*StakingDataProviderStub) GetNodeStakedTopUp ¶ added in v1.1.15
func (sdps *StakingDataProviderStub) GetNodeStakedTopUp(blsKey []byte) (*big.Int, error)
GetNodeStakedTopUp -
func (*StakingDataProviderStub) GetTotalStakeEligibleNodes ¶ added in v1.1.15
func (sdps *StakingDataProviderStub) GetTotalStakeEligibleNodes() *big.Int
GetTotalStakeEligibleNodes -
func (*StakingDataProviderStub) GetTotalTopUpStakeEligibleNodes ¶ added in v1.1.15
func (sdps *StakingDataProviderStub) GetTotalTopUpStakeEligibleNodes() *big.Int
GetTotalTopUpStakeEligibleNodes -
func (*StakingDataProviderStub) IsInterfaceNil ¶ added in v1.1.15
func (sdps *StakingDataProviderStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*StakingDataProviderStub) PrepareStakingDataForRewards ¶ added in v1.1.15
func (sdps *StakingDataProviderStub) PrepareStakingDataForRewards(keys map[uint32][][]byte) error
PrepareStakingDataForRewards -
type StorageManagerStub ¶ added in v1.0.104
type StorageManagerStub struct { DatabaseCalled func() common.DBWriteCacher TakeSnapshotCalled func([]byte) SetCheckpointCalled func([]byte) PruneCalled func([]byte) CancelPruneCalled func([]byte) MarkForEvictionCalled func([]byte, common.ModifiedHashes) error GetDbThatContainsHashCalled func([]byte) common.DBWriteCacher GetSnapshotThatContainsHashCalled func(rootHash []byte) common.SnapshotDbHandler IsPruningEnabledCalled func() bool EnterSnapshotModeCalled func() ExitSnapshotModeCalled func() IsInterfaceNilCalled func() bool }
StorageManagerStub --
func (*StorageManagerStub) CancelPrune ¶ added in v1.0.104
func (sms *StorageManagerStub) CancelPrune([]byte, state.TriePruningIdentifier)
CancelPrune --
func (*StorageManagerStub) Close ¶ added in v1.2.0
func (sms *StorageManagerStub) Close() error
Close -
func (*StorageManagerStub) Database ¶ added in v1.0.104
func (sms *StorageManagerStub) Database() common.DBWriteCacher
Database --
func (*StorageManagerStub) EnterSnapshotMode ¶ added in v1.0.104
func (sms *StorageManagerStub) EnterSnapshotMode()
EnterSnapshotMode --
func (*StorageManagerStub) ExitSnapshotMode ¶ added in v1.0.104
func (sms *StorageManagerStub) ExitSnapshotMode()
ExitSnapshotMode --
func (*StorageManagerStub) GetSnapshotDbBatchDelay ¶ added in v1.0.149
func (sms *StorageManagerStub) GetSnapshotDbBatchDelay() int
GetSnapshotDbBatchDelay -
func (*StorageManagerStub) GetSnapshotThatContainsHash ¶ added in v1.0.129
func (sms *StorageManagerStub) GetSnapshotThatContainsHash(d []byte) common.SnapshotDbHandler
GetSnapshotThatContainsHash --
func (*StorageManagerStub) IsInterfaceNil ¶ added in v1.0.104
func (sms *StorageManagerStub) IsInterfaceNil() bool
IsInterfaceNil --
func (*StorageManagerStub) IsPruningEnabled ¶ added in v1.0.104
func (sms *StorageManagerStub) IsPruningEnabled() bool
IsPruningEnabled --
func (*StorageManagerStub) MarkForEviction ¶ added in v1.0.104
func (sms *StorageManagerStub) MarkForEviction(d []byte, m common.ModifiedHashes) error
MarkForEviction --
func (*StorageManagerStub) Prune ¶ added in v1.0.104
func (sms *StorageManagerStub) Prune([]byte, state.TriePruningIdentifier)
Prune --
func (*StorageManagerStub) SetCheckpoint ¶ added in v1.0.104
func (sms *StorageManagerStub) SetCheckpoint([]byte)
SetCheckpoint --
func (*StorageManagerStub) TakeSnapshot ¶ added in v1.0.104
func (sms *StorageManagerStub) TakeSnapshot([]byte)
TakeSnapshot --
type StorerMock ¶
type StorerMock struct {
// contains filtered or unexported fields
}
StorerMock -
func (*StorerMock) GetBulkFromEpoch ¶ added in v1.0.147
GetBulkFromEpoch -
func (*StorerMock) GetFromEpoch ¶
func (sm *StorerMock) GetFromEpoch(key []byte, _ uint32) ([]byte, error)
GetFromEpoch -
func (*StorerMock) GetOldestEpoch ¶ added in v1.2.4
func (sm *StorerMock) GetOldestEpoch() (uint32, error)
GetOldestEpoch -
func (*StorerMock) IsInterfaceNil ¶
func (sm *StorerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*StorerMock) PutInEpoch ¶ added in v1.1.1
func (sm *StorerMock) PutInEpoch(key, data []byte, _ uint32) error
PutInEpoch -
func (*StorerMock) RangeKeys ¶ added in v1.0.138
func (sm *StorerMock) RangeKeys(_ func(key []byte, val []byte) bool)
RangeKeys -
func (*StorerMock) RemoveFromCurrentEpoch ¶ added in v1.3.7
func (sm *StorerMock) RemoveFromCurrentEpoch(key []byte) error
RemoveFromCurrentEpoch -
func (*StorerMock) SearchFirst ¶
func (sm *StorerMock) SearchFirst(key []byte) ([]byte, error)
SearchFirst -
type SyncTimerStub ¶
type SyncTimerStub struct { StartSyncingTimeCalled func() ClockOffsetCalled func() time.Duration FormattedCurrentTimeCalled func() string CurrentTimeCalled func() time.Time }
SyncTimerStub is a mock implementation of SyncTimer interface
func (*SyncTimerStub) ClockOffset ¶
func (sts *SyncTimerStub) ClockOffset() time.Duration
ClockOffset is a mock implementation for ClockOffset
func (*SyncTimerStub) CurrentTime ¶
func (sts *SyncTimerStub) CurrentTime() time.Time
CurrentTime is a mock implementation for CurrentTime
func (*SyncTimerStub) FormattedCurrentTime ¶
func (sts *SyncTimerStub) FormattedCurrentTime() string
FormattedCurrentTime is a mock implementation for FormattedCurrentTime
func (*SyncTimerStub) IsInterfaceNil ¶
func (sts *SyncTimerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*SyncTimerStub) StartSyncingTime ¶ added in v1.0.116
func (sts *SyncTimerStub) StartSyncingTime()
StartSyncingTime is a mock implementation for StartSyncingTime
type TxForCurrentBlockStub ¶ added in v1.1.15
type TxForCurrentBlockStub struct { CleanCalled func() GetTxCalled func(txHash []byte) (data.TransactionHandler, error) AddTxCalled func(txHash []byte, tx data.TransactionHandler) }
TxForCurrentBlockStub -
func (*TxForCurrentBlockStub) AddTx ¶ added in v1.1.15
func (t *TxForCurrentBlockStub) AddTx(txHash []byte, tx data.TransactionHandler)
AddTx -
func (*TxForCurrentBlockStub) Clean ¶ added in v1.1.15
func (t *TxForCurrentBlockStub) Clean()
Clean -
func (*TxForCurrentBlockStub) GetTx ¶ added in v1.1.15
func (t *TxForCurrentBlockStub) GetTx(txHash []byte) (data.TransactionHandler, error)
GetTx -
func (*TxForCurrentBlockStub) IsInterfaceNil ¶ added in v1.1.15
func (t *TxForCurrentBlockStub) IsInterfaceNil() bool
IsInterfaceNil -
type Uint64ByteSliceConverterMock ¶
type Uint64ByteSliceConverterMock struct { ToByteSliceCalled func(uint64) []byte ToUint64Called func([]byte) (uint64, error) }
Uint64ByteSliceConverterMock converts byte slice to/from uint64
func (*Uint64ByteSliceConverterMock) IsInterfaceNil ¶
func (u *Uint64ByteSliceConverterMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*Uint64ByteSliceConverterMock) ToByteSlice ¶
func (u *Uint64ByteSliceConverterMock) ToByteSlice(p uint64) []byte
ToByteSlice is a mock implementation for Uint64ByteSliceConverter
type Uint64SyncMapCacherStub ¶
type Uint64SyncMapCacherStub struct { ClearCalled func() GetCalled func(nonce uint64) (dataRetriever.ShardIdHashMap, bool) MergeCalled func(nonce uint64, src dataRetriever.ShardIdHashMap) RemoveCalled func(nonce uint64, shardId uint32) RegisterHandlerCalled func(handler func(nonce uint64, shardId uint32, value []byte)) HasCalled func(nonce uint64, shardId uint32) bool }
Uint64SyncMapCacherStub -
func (*Uint64SyncMapCacherStub) Get ¶
func (usmcs *Uint64SyncMapCacherStub) Get(nonce uint64) (dataRetriever.ShardIdHashMap, bool)
Get -
func (*Uint64SyncMapCacherStub) Has ¶
func (usmcs *Uint64SyncMapCacherStub) Has(nonce uint64, shardId uint32) bool
Has -
func (*Uint64SyncMapCacherStub) IsInterfaceNil ¶
func (usmcs *Uint64SyncMapCacherStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*Uint64SyncMapCacherStub) Merge ¶
func (usmcs *Uint64SyncMapCacherStub) Merge(nonce uint64, src dataRetriever.ShardIdHashMap)
Merge -
func (*Uint64SyncMapCacherStub) RegisterHandler ¶
func (usmcs *Uint64SyncMapCacherStub) RegisterHandler(handler func(nonce uint64, shardId uint32, value []byte))
RegisterHandler -
func (*Uint64SyncMapCacherStub) Remove ¶
func (usmcs *Uint64SyncMapCacherStub) Remove(nonce uint64, shardId uint32)
Remove -
type UnitOpenerStub ¶ added in v1.0.111
type UnitOpenerStub struct { }
UnitOpenerStub -
func (*UnitOpenerStub) GetMostRecentStorageUnit ¶ added in v1.3.0
GetMostRecentStorageUnit -
func (*UnitOpenerStub) IsInterfaceNil ¶ added in v1.0.111
func (u *UnitOpenerStub) IsInterfaceNil() bool
IsInterfaceNil -
type VMExecutionHandlerStub ¶ added in v1.1.15
type VMExecutionHandlerStub struct { RunSmartContractCreateCalled func(input *vmcommon.ContractCreateInput) (*vmcommon.VMOutput, error) RunSmartContractCallCalled func(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error) GasScheduleChangeCalled func(gasSchedule map[string]map[string]uint64) GetVersionCalled func() string }
VMExecutionHandlerStub -
func (*VMExecutionHandlerStub) GasScheduleChange ¶ added in v1.1.15
func (vm *VMExecutionHandlerStub) GasScheduleChange(gasSchedule map[string]map[string]uint64)
GasScheduleChange -
func (*VMExecutionHandlerStub) GetVersion ¶ added in v1.1.60
func (vm *VMExecutionHandlerStub) GetVersion() string
GetVersion -
func (*VMExecutionHandlerStub) IsInterfaceNil ¶ added in v1.1.15
func (vm *VMExecutionHandlerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*VMExecutionHandlerStub) RunSmartContractCall ¶ added in v1.1.15
func (vm *VMExecutionHandlerStub) RunSmartContractCall(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error)
RunSmartContractCall computes the result of a smart contract call and how the system must change after the execution
func (*VMExecutionHandlerStub) RunSmartContractCreate ¶ added in v1.1.15
func (vm *VMExecutionHandlerStub) RunSmartContractCreate(input *vmcommon.ContractCreateInput) (*vmcommon.VMOutput, error)
RunSmartContractCreate --
type ValidatorInfoSyncerStub ¶ added in v1.0.102
type ValidatorInfoSyncerStub struct { }
ValidatorInfoSyncerStub -
func (*ValidatorInfoSyncerStub) IsInterfaceNil ¶ added in v1.0.102
func (vip *ValidatorInfoSyncerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*ValidatorInfoSyncerStub) SyncMiniBlocks ¶ added in v1.0.102
func (vip *ValidatorInfoSyncerStub) SyncMiniBlocks(_ data.HeaderHandler) ([][]byte, data.BodyHandler, error)
SyncMiniBlocks -
type ValidatorStatisticsProcessorStub ¶ added in v0.0.5
type ValidatorStatisticsProcessorStub struct { ProcessCalled func(validatorInfo data.ShardValidatorInfoHandler) error CommitCalled func() ([]byte, error) IsInterfaceNilCalled func() bool }
ValidatorStatisticsProcessorStub -
func (*ValidatorStatisticsProcessorStub) Commit ¶ added in v0.0.5
func (pm *ValidatorStatisticsProcessorStub) Commit() ([]byte, error)
Commit -
func (*ValidatorStatisticsProcessorStub) IsInterfaceNil ¶ added in v0.0.5
func (pm *ValidatorStatisticsProcessorStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*ValidatorStatisticsProcessorStub) Process ¶ added in v0.0.5
func (pm *ValidatorStatisticsProcessorStub) Process(validatorInfo data.ShardValidatorInfoHandler) error
Process -
Source Files ¶
- addressMock.go
- argumentsParserMock.go
- builtInCostHandlerStub.go
- chainStorerStub.go
- chanceComputerStub.go
- coreComponentsMock.go
- cryptoComponentsMock.go
- dataTrieTrackerStub.go
- economicsHandlerStub.go
- epochStartMetaBlockProcessorStub.go
- epochStartNotifierStub.go
- gasScheduleNotifierMock.go
- headerIntegrityVerifierStub.go
- headerValidatorStub.go
- headersCacherStub.go
- importStartHandlerStub.go
- interceptedMetaBlockMock.go
- latestStorageDataProviderStub.go
- marshalizerMock.go
- messengerStub.go
- metaBlockInterceptorProcessorStub.go
- multiShardsCoordinatorMock.go
- nodeInfoMock.go
- nodesCoordinatorStub.go
- nodesSetupStub.go
- pubkeyConverterMock.go
- raterStub.go
- rewardsCreatorStub.go
- rewardsHandlerStub.go
- roundTimeDurationStub.go
- rounderStub.go
- shardCoordinatorStub.go
- shardIdHashMapStub.go
- shufflerMock.go
- stakingDataProviderStub.go
- storageManagerStub.go
- storerMock.go
- syncTimerStub.go
- txForCurrentBlockStub.go
- uint64ByteSliceConverterMock.go
- uint64SyncMapCacherStub.go
- unitOpenerStub.go
- validatorInfoSyncerStub.go
- validatorStatisticsProcessorStub.go
- vmExecutionHandlerStub.go