Documentation
¶
Index ¶
- func NewMultiShardsCoordinatorMock(nrShard uint32) *multipleShardsCoordinatorMock
- func NewMultipleShardsCoordinatorMock() *multipleShardsCoordinatorMock
- func NewNilTxValidator() (*nilTxValidator, error)
- func NewNonceHashConverterMock() *nonceHashConverterMock
- func NewOneShardCoordinatorMock() *oneShardCoordinatorMock
- type AccountTrackerStub
- type AccountWrapMock
- func (awm *AccountWrapMock) AddressContainer() state.AddressContainer
- func (awm *AccountWrapMock) DataTrie() data.Trie
- func (awm *AccountWrapMock) DataTrieTracker() state.DataTrieTracker
- func (awm *AccountWrapMock) GetCode() []byte
- func (awm *AccountWrapMock) GetCodeHash() []byte
- func (awm *AccountWrapMock) GetNonce() uint64
- func (awm *AccountWrapMock) GetRootHash() []byte
- func (awm *AccountWrapMock) IsInterfaceNil() bool
- func (awm *AccountWrapMock) SetCode(code []byte)
- func (awm *AccountWrapMock) SetCodeHash(codeHash []byte)
- func (awm *AccountWrapMock) SetCodeHashWithJournal(codeHash []byte) error
- func (awm *AccountWrapMock) SetDataTrie(trie data.Trie)
- func (awm *AccountWrapMock) SetDataTrieTracker(tracker state.DataTrieTracker)
- func (awm *AccountWrapMock) SetNonce(nonce uint64)
- func (awm *AccountWrapMock) SetNonceWithJournal(nonce uint64) error
- func (awm *AccountWrapMock) SetRootHash(rootHash []byte)
- type AccountsStub
- func (as *AccountsStub) AddJournalEntry(je state.JournalEntry)
- func (as *AccountsStub) CancelPrune(rootHash []byte, identifier data.TriePruningIdentifier)
- func (as *AccountsStub) ClosePersister() error
- func (as *AccountsStub) Commit() ([]byte, error)
- func (as *AccountsStub) GetAccountWithJournal(addressContainer state.AddressContainer) (state.AccountHandler, error)
- func (as *AccountsStub) GetAllLeaves(rootHash []byte) (map[string][]byte, error)
- func (as *AccountsStub) GetExistingAccount(addressContainer state.AddressContainer) (state.AccountHandler, error)
- func (as *AccountsStub) HasAccount(addressContainer state.AddressContainer) (bool, error)
- func (as *AccountsStub) IsInterfaceNil() bool
- func (as *AccountsStub) IsPruningEnabled() bool
- func (as *AccountsStub) JournalLen() int
- func (as *AccountsStub) PruneTrie(rootHash []byte, identifier data.TriePruningIdentifier) error
- func (as *AccountsStub) PutCode(accountHandler state.AccountHandler, code []byte) error
- func (as *AccountsStub) RecreateTrie(rootHash []byte) error
- func (as *AccountsStub) RemoveAccount(addressContainer state.AddressContainer) error
- func (as *AccountsStub) RemoveCode(codeHash []byte) error
- func (as *AccountsStub) RevertToSnapshot(snapshot int) error
- func (as *AccountsStub) RootHash() ([]byte, error)
- func (as *AccountsStub) SaveDataTrie(journalizedAccountHandler state.AccountHandler) error
- func (as *AccountsStub) SaveJournalizedAccount(journalizedAccountHandler state.AccountHandler) error
- func (as *AccountsStub) SetStateCheckpoint(rootHash []byte)
- func (as *AccountsStub) SnapshotState(rootHash []byte)
- type AddressConverterFake
- func (acf *AddressConverterFake) AddressLen() int
- func (acf *AddressConverterFake) ConvertToHex(addressContainer state.AddressContainer) (string, error)
- func (acf *AddressConverterFake) CreateAddressFromHex(hexAddress string) (state.AddressContainer, error)
- func (acf *AddressConverterFake) CreateAddressFromPublicKeyBytes(pubKey []byte) (state.AddressContainer, error)
- func (acf *AddressConverterFake) IsInterfaceNil() bool
- func (acf *AddressConverterFake) PrepareAddressBytes(addressBytes []byte) ([]byte, error)
- type AddressConverterMock
- func (acm *AddressConverterMock) AddressLen() int
- func (acm *AddressConverterMock) ConvertToHex(addressContainer state.AddressContainer) (string, error)
- func (acm *AddressConverterMock) CreateAddressFromHex(_ string) (state.AddressContainer, error)
- func (acm *AddressConverterMock) CreateAddressFromPublicKeyBytes(pubKey []byte) (state.AddressContainer, error)
- func (acm *AddressConverterMock) IsInterfaceNil() bool
- func (acm *AddressConverterMock) PrepareAddressBytes(_ []byte) ([]byte, error)
- type AddressConverterStub
- func (acs AddressConverterStub) AddressLen() int
- func (acs *AddressConverterStub) ConvertToHex(addressContainer state.AddressContainer) (string, error)
- func (acs *AddressConverterStub) CreateAddressFromHex(hexAddress string) (state.AddressContainer, error)
- func (acs *AddressConverterStub) CreateAddressFromPublicKeyBytes(pubKey []byte) (state.AddressContainer, error)
- func (acs *AddressConverterStub) IsInterfaceNil() bool
- func (acs *AddressConverterStub) PrepareAddressBytes(addressBytes []byte) ([]byte, error)
- type AddressMock
- type AppStatusHandlerStub
- func (ashs *AppStatusHandlerStub) AddUint64(key string, value uint64)
- func (ashs *AppStatusHandlerStub) Close()
- func (ashs *AppStatusHandlerStub) Decrement(key string)
- func (ashs *AppStatusHandlerStub) Increment(key string)
- func (ashs *AppStatusHandlerStub) IsInterfaceNil() bool
- func (ashs *AppStatusHandlerStub) SetInt64Value(key string, value int64)
- func (ashs *AppStatusHandlerStub) SetStringValue(key string, value string)
- func (ashs *AppStatusHandlerStub) SetUInt64Value(key string, value uint64)
- type ArgumentParserMock
- func (ap *ArgumentParserMock) CreateDataFromStorageUpdate(storageUpdates []*vmcommon.StorageUpdate) string
- func (ap *ArgumentParserMock) GetArguments() ([][]byte, error)
- func (ap *ArgumentParserMock) GetCode() ([]byte, error)
- func (ap *ArgumentParserMock) GetFunction() (string, error)
- func (ap *ArgumentParserMock) GetSeparator() string
- func (ap *ArgumentParserMock) GetStorageUpdates(data string) ([]*vmcommon.StorageUpdate, error)
- func (ap *ArgumentParserMock) IsInterfaceNil() bool
- func (ap *ArgumentParserMock) ParseData(data string) error
- type BelNevMock
- func (bnm *BelNevMock) AggregateCommitments(bitmap []byte) error
- func (bnm *BelNevMock) AggregateSigs(bitmap []byte) ([]byte, error)
- func (bnm *BelNevMock) Commitment(index uint16) ([]byte, error)
- func (bnm *BelNevMock) CommitmentHash(index uint16) ([]byte, error)
- func (bnm *BelNevMock) Create(pubKeys []string, index uint16) (crypto.MultiSigner, error)
- func (bnm *BelNevMock) CreateCommitment() (commSecret []byte, commitment []byte)
- func (bnm *BelNevMock) CreateSignatureShare(msg []byte, bitmap []byte) ([]byte, error)
- func (bnm *BelNevMock) IsInterfaceNil() bool
- func (bnm *BelNevMock) Reset(pubKeys []string, index uint16) error
- func (bnm *BelNevMock) SetAggregatedSig(aggSig []byte) error
- func (bnm *BelNevMock) SetMessage(msg []byte) error
- func (bnm *BelNevMock) SignatureShare(index uint16) ([]byte, error)
- func (bnm *BelNevMock) StoreCommitment(index uint16, value []byte) error
- func (bnm *BelNevMock) StoreCommitmentHash(index uint16, commHash []byte) error
- func (bnm *BelNevMock) StoreSignatureShare(index uint16, sig []byte) error
- func (bnm *BelNevMock) Verify(msg []byte, bitmap []byte) error
- func (bnm *BelNevMock) VerifySignatureShare(index uint16, sig []byte, msg []byte, bitmap []byte) error
- type BlackListHandlerStub
- type BlockChainHookHandlerMock
- func (e *BlockChainHookHandlerMock) AddTempAccount(address []byte, balance *big.Int, nonce uint64)
- func (e *BlockChainHookHandlerMock) CleanTempAccounts()
- func (e *BlockChainHookHandlerMock) IsInterfaceNil() bool
- func (e *BlockChainHookHandlerMock) SetCurrentHeader(hdr data.HeaderHandler)
- func (e *BlockChainHookHandlerMock) TempAccount(address []byte) state.AccountHandler
- type BlockChainMock
- func (bc *BlockChainMock) CreateNewHeader() data.HeaderHandler
- func (bc *BlockChainMock) GetCurrentBlockBody() data.BodyHandler
- func (bc *BlockChainMock) GetCurrentBlockHeader() data.HeaderHandler
- func (bc *BlockChainMock) GetCurrentBlockHeaderHash() []byte
- func (bc *BlockChainMock) GetGenesisHeader() data.HeaderHandler
- func (bc *BlockChainMock) GetGenesisHeaderHash() []byte
- func (bc *BlockChainMock) GetLocalHeight() int64
- func (bc *BlockChainMock) GetNetworkHeight() int64
- func (bc *BlockChainMock) HasBadBlock(blockHash []byte) bool
- func (bc *BlockChainMock) IsInterfaceNil() bool
- func (bc *BlockChainMock) PutBadBlock(blockHash []byte)
- func (bc *BlockChainMock) SetCurrentBlockBody(body data.BodyHandler) error
- func (bc *BlockChainMock) SetCurrentBlockHeader(header data.HeaderHandler) error
- func (bc *BlockChainMock) SetCurrentBlockHeaderHash(hash []byte)
- func (bc *BlockChainMock) SetGenesisHeader(genesisBlock data.HeaderHandler) error
- func (bc *BlockChainMock) SetGenesisHeaderHash(hash []byte)
- func (bc *BlockChainMock) SetLocalHeight(height int64)
- func (bc *BlockChainMock) SetNetworkHeight(height int64)
- type BlockNotarizerHandlerMock
- func (bngm *BlockNotarizerHandlerMock) AddNotarizedHeader(shardID uint32, notarizedHeader data.HeaderHandler, notarizedHeaderHash []byte)
- func (bngm *BlockNotarizerHandlerMock) CleanupNotarizedHeadersBehindNonce(shardID uint32, nonce uint64)
- func (bngm *BlockNotarizerHandlerMock) DisplayNotarizedHeaders(shardID uint32, message string)
- func (bngm *BlockNotarizerHandlerMock) GetFirstNotarizedHeader(shardID uint32) (data.HeaderHandler, []byte, error)
- func (bngm *BlockNotarizerHandlerMock) GetLastNotarizedHeader(shardID uint32) (data.HeaderHandler, []byte, error)
- func (bngm *BlockNotarizerHandlerMock) GetLastNotarizedHeaderNonce(shardID uint32) uint64
- func (bngm *BlockNotarizerHandlerMock) GetNotarizedHeader(shardID uint32, offset uint64) (data.HeaderHandler, []byte, error)
- func (bngm *BlockNotarizerHandlerMock) InitNotarizedHeaders(startHeaders map[uint32]data.HeaderHandler) error
- func (bngm *BlockNotarizerHandlerMock) IsInterfaceNil() bool
- func (bngm *BlockNotarizerHandlerMock) RemoveLastNotarizedHeader()
- func (bngm *BlockNotarizerHandlerMock) RestoreNotarizedHeadersToGenesis()
- type BlockNotifierHandlerMock
- type BlockProcessorMock
- func (bpm *BlockProcessorMock) AddLastNotarizedHdr(shardId uint32, processedHdr data.HeaderHandler)
- func (bpm *BlockProcessorMock) ApplyProcessedMiniBlocks(*processedMb.ProcessedMiniBlockTracker)
- func (bpm *BlockProcessorMock) CommitBlock(header data.HeaderHandler, body data.BodyHandler) error
- func (bpm *BlockProcessorMock) CreateBlock(initialHdrData data.HeaderHandler, haveTime func() bool) (data.HeaderHandler, data.BodyHandler, error)
- func (bpm *BlockProcessorMock) CreateGenesisBlock(balances map[string]*big.Int) (data.HeaderHandler, error)
- func (bpm *BlockProcessorMock) CreateNewHeader(round uint64) data.HeaderHandler
- func (bpm *BlockProcessorMock) DecodeBlockBody(dta []byte) data.BodyHandler
- func (bpm *BlockProcessorMock) DecodeBlockHeader(dta []byte) data.HeaderHandler
- func (bpm *BlockProcessorMock) IsInterfaceNil() bool
- func (bpm *BlockProcessorMock) MarshalizedDataToBroadcast(header data.HeaderHandler, body data.BodyHandler) (map[uint32][]byte, map[string][][]byte, error)
- func (bpm *BlockProcessorMock) ProcessBlock(header data.HeaderHandler, body data.BodyHandler, ...) error
- func (bpm *BlockProcessorMock) PruneStateOnRollback(currHeader data.HeaderHandler, prevHeader data.HeaderHandler)
- func (bpm *BlockProcessorMock) RestoreBlockIntoPools(header data.HeaderHandler, body data.BodyHandler) error
- func (bpm *BlockProcessorMock) RestoreLastNotarizedHrdsToGenesis()
- func (bpm *BlockProcessorMock) RevertAccountState(header data.HeaderHandler)
- func (bpm *BlockProcessorMock) RevertStateToBlock(header data.HeaderHandler) error
- func (bpm *BlockProcessorMock) SetNumProcessedObj(_ uint64)
- type BlockSizeComputationStub
- func (bscs *BlockSizeComputationStub) AddNumMiniBlocks(numMiniBlocks int)
- func (bscs *BlockSizeComputationStub) AddNumTxs(numTxs int)
- func (bscs *BlockSizeComputationStub) Init()
- func (bscs *BlockSizeComputationStub) IsInterfaceNil() bool
- func (bscs *BlockSizeComputationStub) IsMaxBlockSizeReached(numNewMiniBlocks int, numNewTxs int) bool
- type BlockSizeThrottlerStub
- func (bsts *BlockSizeThrottlerStub) Add(round uint64, size uint32)
- func (bsts *BlockSizeThrottlerStub) ComputeCurrentMaxSize()
- func (bsts *BlockSizeThrottlerStub) GetCurrentMaxSize() uint32
- func (bsts *BlockSizeThrottlerStub) IsInterfaceNil() bool
- func (bsts *BlockSizeThrottlerStub) Succeed(round uint64)
- type BlockTrackerHandlerMock
- func (bthm *BlockTrackerHandlerMock) ComputeLongestSelfChain() (data.HeaderHandler, []byte, []data.HeaderHandler, [][]byte)
- func (bthm *BlockTrackerHandlerMock) ComputeNumPendingMiniBlocks(headers []data.HeaderHandler)
- func (bthm *BlockTrackerHandlerMock) GetSelfHeaders(headerHandler data.HeaderHandler) []*track.HeaderInfo
- func (bthm *BlockTrackerHandlerMock) IsInterfaceNil() bool
- func (bthm *BlockTrackerHandlerMock) SortHeadersFromNonce(shardID uint32, nonce uint64) ([]data.HeaderHandler, [][]byte)
- type BlockTrackerMock
- func (btm *BlockTrackerMock) AddCrossNotarizedHeader(shardID uint32, crossNotarizedHeader data.HeaderHandler, ...)
- func (btm *BlockTrackerMock) AddSelfNotarizedHeader(shardID uint32, selfNotarizedHeader data.HeaderHandler, ...)
- func (btm *BlockTrackerMock) AddTrackedHeader(header data.HeaderHandler, hash []byte)
- func (btm *BlockTrackerMock) CheckBlockAgainstFinal(headerHandler data.HeaderHandler) error
- func (btm *BlockTrackerMock) CheckBlockAgainstRounder(headerHandler data.HeaderHandler) error
- func (btm *BlockTrackerMock) CleanupHeadersBehindNonce(shardID uint32, selfNotarizedNonce uint64, crossNotarizedNonce uint64)
- func (btm *BlockTrackerMock) CleanupInvalidCrossHeaders(_ uint32, _ uint64)
- func (btm *BlockTrackerMock) ComputeLongestChain(shardID uint32, header data.HeaderHandler) ([]data.HeaderHandler, [][]byte)
- func (btm *BlockTrackerMock) ComputeLongestMetaChainFromLastNotarized() ([]data.HeaderHandler, [][]byte, error)
- func (btm *BlockTrackerMock) ComputeLongestShardsChainsFromLastNotarized() ([]data.HeaderHandler, [][]byte, map[uint32][]data.HeaderHandler, error)
- func (btm *BlockTrackerMock) DisplayTrackedHeaders()
- func (btm *BlockTrackerMock) GetCrossNotarizedHeader(shardID uint32, offset uint64) (data.HeaderHandler, []byte, error)
- func (btm *BlockTrackerMock) GetFinalHeader(shardID uint32) (data.HeaderHandler, []byte, error)
- func (btm *BlockTrackerMock) GetLastCrossNotarizedHeader(shardID uint32) (data.HeaderHandler, []byte, error)
- func (btm *BlockTrackerMock) GetLastCrossNotarizedHeadersForAllShards() (map[uint32]data.HeaderHandler, error)
- func (btm *BlockTrackerMock) GetLastSelfNotarizedHeader(shardID uint32) (data.HeaderHandler, []byte, error)
- func (btm *BlockTrackerMock) GetTrackedHeaders(shardID uint32) ([]data.HeaderHandler, [][]byte)
- func (btm *BlockTrackerMock) GetTrackedHeadersForAllShards() map[uint32][]data.HeaderHandler
- func (btm *BlockTrackerMock) GetTrackedHeadersWithNonce(shardID uint32, nonce uint64) ([]data.HeaderHandler, [][]byte)
- func (btm *BlockTrackerMock) InitNotarizedHeaders(startHeaders map[uint32]data.HeaderHandler) error
- func (btm *BlockTrackerMock) IsInterfaceNil() bool
- func (btm *BlockTrackerMock) IsShardStuck(shardId uint32) bool
- func (btm *BlockTrackerMock) RegisterCrossNotarizedHeadersHandler(...)
- func (btm *BlockTrackerMock) RegisterSelfNotarizedHeadersHandler(...)
- func (btm *BlockTrackerMock) RemoveLastNotarizedHeaders()
- func (btm *BlockTrackerMock) RestoreToGenesis()
- func (btm *BlockTrackerMock) ShouldAddHeader(headerHandler data.HeaderHandler) bool
- type BoostrapStorerMock
- func (bsm *BoostrapStorerMock) Get(round int64) (bootstrapStorage.BootstrapData, error)
- func (bsm *BoostrapStorerMock) GetHighestRound() int64
- func (bsm *BoostrapStorerMock) IsInterfaceNil() bool
- func (bsm *BoostrapStorerMock) Put(round int64, bootData bootstrapStorage.BootstrapData) error
- func (bsm *BoostrapStorerMock) SaveLastRound(_ int64) error
- type CacherMock
- func (cm *CacherMock) Clear()
- func (cm *CacherMock) Get(key []byte) (value interface{}, ok bool)
- func (cm *CacherMock) Has(key []byte) bool
- func (cm *CacherMock) HasOrAdd(key []byte, value interface{}) (bool, bool)
- func (cm *CacherMock) IsInterfaceNil() bool
- func (cm *CacherMock) Keys() [][]byte
- func (cm *CacherMock) Len() int
- func (cm *CacherMock) MaxSize() int
- func (cm *CacherMock) Peek(key []byte) (value interface{}, ok bool)
- func (cm *CacherMock) Put(key []byte, value interface{}) (evicted bool)
- func (cm *CacherMock) RegisterHandler(func(key []byte))
- func (cm *CacherMock) Remove(key []byte)
- func (cm *CacherMock) RemoveOldest()
- type CacherStub
- func (cs *CacherStub) Clear()
- func (cs *CacherStub) Get(key []byte) (value interface{}, ok bool)
- func (cs *CacherStub) Has(key []byte) bool
- func (cs *CacherStub) HasOrAdd(key []byte, value interface{}) (ok, evicted bool)
- func (cs *CacherStub) IsInterfaceNil() bool
- func (cs *CacherStub) Keys() [][]byte
- func (cs *CacherStub) Len() int
- func (cs *CacherStub) MaxSize() int
- func (cs *CacherStub) Peek(key []byte) (value interface{}, ok bool)
- func (cs *CacherStub) Put(key []byte, value interface{}) (evicted bool)
- func (cs *CacherStub) RegisterHandler(handler func(key []byte))
- func (cs *CacherStub) Remove(key []byte)
- func (cs *CacherStub) RemoveOldest()
- type ChainStorerMock
- func (csm *ChainStorerMock) AddStorer(key dataRetriever.UnitType, s storage.Storer)
- func (csm *ChainStorerMock) CloseAll() error
- func (csm *ChainStorerMock) Destroy() error
- func (csm *ChainStorerMock) Get(unitType dataRetriever.UnitType, key []byte) ([]byte, error)
- func (csm *ChainStorerMock) GetAll(unitType dataRetriever.UnitType, keys [][]byte) (map[string][]byte, error)
- func (csm *ChainStorerMock) GetStorer(unitType dataRetriever.UnitType) storage.Storer
- func (csm *ChainStorerMock) Has(unitType dataRetriever.UnitType, key []byte) error
- func (csm *ChainStorerMock) IsInterfaceNil() bool
- func (csm *ChainStorerMock) Put(unitType dataRetriever.UnitType, key []byte, value []byte) error
- type CoordinatorStub
- func (coordinator *CoordinatorStub) CommunicationIdentifier(destShardID uint32) string
- func (coordinator *CoordinatorStub) ComputeId(address state.AddressContainer) uint32
- func (coordinator *CoordinatorStub) IsInterfaceNil() bool
- func (coordinator *CoordinatorStub) NumberOfShards() uint32
- func (coordinator *CoordinatorStub) SameShard(firstAddress, secondAddress state.AddressContainer) bool
- func (coordinator *CoordinatorStub) SelfId() uint32
- type DataTrieTrackerStub
- func (dtts *DataTrieTrackerStub) ClearDataCaches()
- func (dtts *DataTrieTrackerStub) DataTrie() data.Trie
- func (dtts *DataTrieTrackerStub) DirtyData() map[string][]byte
- func (dtts *DataTrieTrackerStub) IsInterfaceNil() bool
- func (dtts *DataTrieTrackerStub) OriginalValue(key []byte) []byte
- func (dtts *DataTrieTrackerStub) RetrieveValue(key []byte) ([]byte, error)
- func (dtts *DataTrieTrackerStub) SaveKeyValue(key []byte, value []byte)
- func (dtts *DataTrieTrackerStub) SetDataTrie(tr data.Trie)
- type EpochEconomicsStub
- type EpochRewardsCreatorStub
- func (e *EpochRewardsCreatorStub) CreateMarshalizedData(body *block.Body) map[string][][]byte
- func (e *EpochRewardsCreatorStub) CreateRewardsMiniBlocks(metaBlock *block.MetaBlock, validatorInfos map[uint32][]*state.ValidatorInfo) (block.MiniBlockSlice, error)
- func (e *EpochRewardsCreatorStub) DeleteTxsFromStorage(metaBlock *block.MetaBlock, body *block.Body)
- func (e *EpochRewardsCreatorStub) IsInterfaceNil() bool
- func (e *EpochRewardsCreatorStub) SaveTxBlockToStorage(metaBlock *block.MetaBlock, body *block.Body)
- func (e *EpochRewardsCreatorStub) VerifyRewardsMiniBlocks(metaBlock *block.MetaBlock, validatorInfos map[uint32][]*state.ValidatorInfo) error
- type EpochStartDataCreatorStub
- type EpochStartTriggerStub
- func (e *EpochStartTriggerStub) Epoch() uint32
- func (e *EpochStartTriggerStub) EpochFinalityAttestingRound() uint64
- func (e *EpochStartTriggerStub) EpochStartMetaHdrHash() []byte
- func (e *EpochStartTriggerStub) EpochStartRound() uint64
- func (e *EpochStartTriggerStub) ForceEpochStart(round uint64) error
- func (e *EpochStartTriggerStub) GetSavedStateKey() []byte
- func (e *EpochStartTriggerStub) IsEpochStart() bool
- func (e *EpochStartTriggerStub) IsInterfaceNil() bool
- func (e *EpochStartTriggerStub) LoadState(_ []byte) error
- func (e *EpochStartTriggerStub) NotifyAll(_ data.HeaderHandler)
- func (e *EpochStartTriggerStub) ReceivedHeader(header data.HeaderHandler)
- func (e *EpochStartTriggerStub) RequestEpochStartIfNeeded(_ data.HeaderHandler)
- func (e *EpochStartTriggerStub) Revert(_ data.HeaderHandler)
- func (e *EpochStartTriggerStub) RevertStateToBlock(_ data.HeaderHandler) error
- func (e *EpochStartTriggerStub) SetCurrentEpochStartRound(_ uint64)
- func (e *EpochStartTriggerStub) SetFinalityAttestingRound(_ uint64)
- func (e *EpochStartTriggerStub) SetProcessed(header data.HeaderHandler)
- func (e *EpochStartTriggerStub) Update(round uint64)
- type EpochValidatorInfoCreatorStub
- func (e *EpochValidatorInfoCreatorStub) CreateValidatorInfoMiniBlocks(validatorInfo map[uint32][]*state.ValidatorInfo) (block.MiniBlockSlice, error)
- func (e *EpochValidatorInfoCreatorStub) DeleteValidatorInfoBlocksFromStorage(metaBlock *block.MetaBlock)
- func (e *EpochValidatorInfoCreatorStub) IsInterfaceNil() bool
- func (e *EpochValidatorInfoCreatorStub) SaveValidatorInfoBlocksToStorage(metaBlock *block.MetaBlock, body *block.Body)
- func (e *EpochValidatorInfoCreatorStub) VerifyValidatorInfoMiniBlocks(miniblocks []*block.MiniBlock, ...) error
- type FeeAccumulatorStub
- type FeeHandlerStub
- func (fhs *FeeHandlerStub) CheckValidityTxValues(tx process.TransactionWithFeeHandler) error
- func (fhs *FeeHandlerStub) ComputeFee(tx process.TransactionWithFeeHandler) *big.Int
- func (fhs *FeeHandlerStub) ComputeGasLimit(tx process.TransactionWithFeeHandler) uint64
- func (fhs *FeeHandlerStub) DeveloperPercentage() float64
- func (fhs *FeeHandlerStub) IsInterfaceNil() bool
- func (fhs *FeeHandlerStub) MaxGasLimitPerBlock() uint64
- func (fhs *FeeHandlerStub) MinGasPrice() uint64
- func (fhs *FeeHandlerStub) SetMaxGasLimitPerBlock(maxGasLimitPerBlock uint64)
- func (fhs *FeeHandlerStub) SetMinGasLimit(minGasLimit uint64)
- func (fhs *FeeHandlerStub) SetMinGasPrice(minGasPrice uint64)
- type FloodPreventerStub
- type ForkDetectorMock
- func (fdm *ForkDetectorMock) AddHeader(header data.HeaderHandler, hash []byte, state process.BlockHeaderState, ...) error
- func (fdm *ForkDetectorMock) CheckFork() *process.ForkInfo
- func (fdm *ForkDetectorMock) GetHighestFinalBlockHash() []byte
- func (fdm *ForkDetectorMock) GetHighestFinalBlockNonce() uint64
- func (fdm *ForkDetectorMock) GetNotarizedHeaderHash(nonce uint64) []byte
- func (fdm *ForkDetectorMock) IsInterfaceNil() bool
- func (fdm *ForkDetectorMock) ProbableHighestNonce() uint64
- func (fdm *ForkDetectorMock) RemoveHeader(nonce uint64, hash []byte)
- func (fdm *ForkDetectorMock) ResetFork()
- func (fdm *ForkDetectorMock) ResetProbableHighestNonce()
- func (fdm *ForkDetectorMock) RestoreToGenesis()
- func (fdm *ForkDetectorMock) SetRollBackNonce(nonce uint64)
- type GasHandlerMock
- func (ghm *GasHandlerMock) ComputeGasConsumedByMiniBlock(miniBlock *block.MiniBlock, mapHashTx map[string]data.TransactionHandler) (uint64, uint64, error)
- func (ghm *GasHandlerMock) ComputeGasConsumedByTx(txSenderShardId uint32, txReceiverShardId uint32, ...) (uint64, uint64, error)
- func (ghm *GasHandlerMock) GasConsumed(hash []byte) uint64
- func (ghm *GasHandlerMock) GasRefunded(hash []byte) uint64
- func (ghm *GasHandlerMock) Init()
- func (ghm *GasHandlerMock) IsInterfaceNil() bool
- func (ghm *GasHandlerMock) RemoveGasConsumed(hashes [][]byte)
- func (ghm *GasHandlerMock) RemoveGasRefunded(hashes [][]byte)
- func (ghm *GasHandlerMock) SetGasConsumed(gasConsumed uint64, hash []byte)
- func (ghm *GasHandlerMock) SetGasRefunded(gasRefunded uint64, hash []byte)
- func (ghm *GasHandlerMock) TotalGasConsumed() uint64
- func (ghm *GasHandlerMock) TotalGasRefunded() uint64
- type GetHdrHandlerStub
- type HasherMock
- type HasherStub
- type HeaderHandlerStub
- func (hhs *HeaderHandlerStub) CheckChainID(reference []byte) error
- func (hhs *HeaderHandlerStub) Clone() data.HeaderHandler
- func (hhs *HeaderHandlerStub) GetAccumulatedFees() *big.Int
- func (hhs *HeaderHandlerStub) GetChainID() []byte
- func (hhs *HeaderHandlerStub) GetEpoch() uint32
- func (hhs *HeaderHandlerStub) GetEpochStartMetaHash() []byte
- func (hhs *HeaderHandlerStub) GetLeaderSignature() []byte
- func (hhs *HeaderHandlerStub) GetMiniBlockHeadersWithDst(destId uint32) map[string]uint32
- func (hhs *HeaderHandlerStub) GetMiniBlockProcessed(_ []byte) bool
- func (hhs *HeaderHandlerStub) GetNonce() uint64
- func (hhs *HeaderHandlerStub) GetPrevHash() []byte
- func (hhs *HeaderHandlerStub) GetPrevRandSeed() []byte
- func (hhs *HeaderHandlerStub) GetPubKeysBitmap() []byte
- func (hhs *HeaderHandlerStub) GetRandSeed() []byte
- func (hhs *HeaderHandlerStub) GetReceiptsHash() []byte
- func (hhs *HeaderHandlerStub) GetRootHash() []byte
- func (hhs *HeaderHandlerStub) GetRound() uint64
- func (hhs *HeaderHandlerStub) GetShardID() uint32
- func (hhs *HeaderHandlerStub) GetSignature() []byte
- func (hhs *HeaderHandlerStub) GetTimeStamp() uint64
- func (hhs *HeaderHandlerStub) GetTxCount() uint32
- func (hhs *HeaderHandlerStub) GetValidatorStatsRootHash() []byte
- func (hhs *HeaderHandlerStub) IsInterfaceNil() bool
- func (hhs *HeaderHandlerStub) IsStartOfEpochBlock() bool
- func (hhs *HeaderHandlerStub) ItemsInBody() uint32
- func (hhs *HeaderHandlerStub) ItemsInHeader() uint32
- func (hhs *HeaderHandlerStub) SetAccumulatedFees(_ *big.Int)
- func (hhs *HeaderHandlerStub) SetChainID(_ []byte)
- func (hhs *HeaderHandlerStub) SetEpoch(_ uint32)
- func (hhs *HeaderHandlerStub) SetLeaderSignature(_ []byte)
- func (hhs *HeaderHandlerStub) SetMiniBlockProcessed(_ []byte, _ bool)
- func (hhs *HeaderHandlerStub) SetNonce(_ uint64)
- func (hhs *HeaderHandlerStub) SetPrevHash(_ []byte)
- func (hhs *HeaderHandlerStub) SetPrevRandSeed(_ []byte)
- func (hhs *HeaderHandlerStub) SetPubKeysBitmap(_ []byte)
- func (hhs *HeaderHandlerStub) SetRandSeed(_ []byte)
- func (hhs *HeaderHandlerStub) SetRootHash(_ []byte)
- func (hhs *HeaderHandlerStub) SetRound(_ uint64)
- func (hhs *HeaderHandlerStub) SetShardID(_ uint32)
- func (hhs *HeaderHandlerStub) SetSignature(_ []byte)
- func (hhs *HeaderHandlerStub) SetTimeStamp(_ uint64)
- func (hhs *HeaderHandlerStub) SetTxCount(_ uint32)
- func (hhs *HeaderHandlerStub) SetValidatorStatsRootHash(_ []byte)
- type HeaderResolverMock
- func (hrm *HeaderResolverMock) IsInterfaceNil() bool
- func (hrm *HeaderResolverMock) ProcessReceivedMessage(message p2p.MessageP2P, _ p2p.PeerID) error
- func (hrm *HeaderResolverMock) RequestDataFromEpoch(identifier []byte) error
- func (hrm *HeaderResolverMock) RequestDataFromHash(hash []byte, epoch uint32) error
- func (hrm *HeaderResolverMock) RequestDataFromNonce(nonce uint64, epoch uint32) error
- func (hrm *HeaderResolverMock) SetEpochHandler(epochHandler dataRetriever.EpochHandler) error
- type HeaderSigVerifierStub
- 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) 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 IndexerMock
- func (im *IndexerMock) IsInterfaceNil() bool
- func (im *IndexerMock) IsNilIndexer() bool
- func (im *IndexerMock) SaveBlock(body data.BodyHandler, header data.HeaderHandler, ...)
- func (im *IndexerMock) SaveMetaBlock(_ data.HeaderHandler, _ []uint64)
- func (im *IndexerMock) SaveRoundInfo(_ indexer.RoundInfo)
- func (im *IndexerMock) SaveValidatorsPubKeys(_ map[uint32][][]byte)
- func (im *IndexerMock) UpdateTPS(_ statistics.TPSBenchmark)
- type InterceptedDataFactoryStub
- type InterceptedDataStub
- type InterceptedTxHandlerStub
- func (iths *InterceptedTxHandlerStub) Fee() *big.Int
- func (iths *InterceptedTxHandlerStub) Nonce() uint64
- func (iths *InterceptedTxHandlerStub) ReceiverShardId() uint32
- func (iths *InterceptedTxHandlerStub) SenderAddress() state.AddressContainer
- func (iths *InterceptedTxHandlerStub) SenderShardId() uint32
- func (iths *InterceptedTxHandlerStub) Transaction() data.TransactionHandler
- type InterceptorProcessorStub
- func (ips *InterceptorProcessorStub) IsInterfaceNil() bool
- func (ips *InterceptorProcessorStub) Save(data process.InterceptedData) error
- func (ips *InterceptorProcessorStub) SignalEndOfProcessing(_ []process.InterceptedData)
- func (ips *InterceptorProcessorStub) Validate(data process.InterceptedData) error
- type InterceptorStub
- type InterceptorThrottlerStub
- func (its *InterceptorThrottlerStub) CanProcess() bool
- func (its *InterceptorThrottlerStub) EndProcessing()
- func (its *InterceptorThrottlerStub) EndProcessingCount() int32
- func (its *InterceptorThrottlerStub) IsInterfaceNil() bool
- func (its *InterceptorThrottlerStub) StartProcessing()
- func (its *InterceptorThrottlerStub) StartProcessingCount() int32
- type InterimProcessorContainerMock
- func (ipcm *InterimProcessorContainerMock) Add(_ block.Type, _ process.IntermediateTransactionHandler) error
- func (ipcm *InterimProcessorContainerMock) AddMultiple(_ []block.Type, _ []process.IntermediateTransactionHandler) error
- func (ipcm *InterimProcessorContainerMock) Get(key block.Type) (process.IntermediateTransactionHandler, error)
- func (ipcm *InterimProcessorContainerMock) IsInterfaceNil() bool
- func (ipcm *InterimProcessorContainerMock) Keys() []block.Type
- func (ipcm *InterimProcessorContainerMock) Len() int
- func (ipcm *InterimProcessorContainerMock) Remove(_ block.Type)
- func (ipcm *InterimProcessorContainerMock) Replace(_ block.Type, _ process.IntermediateTransactionHandler) error
- type IntermediateTransactionHandlerMock
- func (ith *IntermediateTransactionHandlerMock) AddIntermediateTransactions(txs []data.TransactionHandler) error
- func (ith *IntermediateTransactionHandlerMock) CreateAllInterMiniBlocks() []*block.MiniBlock
- func (ith *IntermediateTransactionHandlerMock) CreateBlockStarted()
- func (ith *IntermediateTransactionHandlerMock) CreateMarshalizedData(txHashes [][]byte) ([][]byte, error)
- func (ith *IntermediateTransactionHandlerMock) GetAllCurrentFinishedTxs() map[string]data.TransactionHandler
- func (ith *IntermediateTransactionHandlerMock) GetCreatedInShardMiniBlock() *block.MiniBlock
- func (ith *IntermediateTransactionHandlerMock) IsInterfaceNil() bool
- func (ith *IntermediateTransactionHandlerMock) RemoveProcessedResultsFor(txHashes [][]byte)
- func (ith *IntermediateTransactionHandlerMock) SaveCurrentIntermediateTxToStorage() error
- func (ith *IntermediateTransactionHandlerMock) VerifyInterMiniBlocks(body *block.Body) error
- type MarshalizerMock
- type MarshalizerStub
- type MessageHandlerStub
- type MessageSignVerifierMock
- type MessengerStub
- func (ms *MessengerStub) Addresses() []string
- func (ms *MessengerStub) Bootstrap() error
- func (ms *MessengerStub) Broadcast(topic string, buff []byte)
- func (ms *MessengerStub) BroadcastOnChannel(channel string, topic string, buff []byte)
- func (ms *MessengerStub) Close() error
- func (ms *MessengerStub) ConnectToPeer(address string) error
- func (ms *MessengerStub) ConnectedPeers() []p2p.PeerID
- func (ms *MessengerStub) CreateTopic(name string, createChannelForTopic bool) error
- func (ms *MessengerStub) HasTopic(name string) bool
- func (ms *MessengerStub) HasTopicValidator(name string) bool
- func (ms *MessengerStub) ID() p2p.PeerID
- func (ms *MessengerStub) IsConnected(peerID p2p.PeerID) bool
- func (ms *MessengerStub) IsInterfaceNil() bool
- func (ms *MessengerStub) OutgoingChannelLoadBalancer() p2p.ChannelLoadBalancer
- func (ms *MessengerStub) Peers() []p2p.PeerID
- func (ms *MessengerStub) RegisterMessageProcessor(topic string, handler p2p.MessageProcessor) error
- func (ms *MessengerStub) SendToConnectedPeer(topic string, buff []byte, peerID p2p.PeerID) error
- func (ms *MessengerStub) TrimConnections()
- func (ms *MessengerStub) UnregisterMessageProcessor(topic string) error
- type MiniBlocksResolverMock
- func (hrm *MiniBlocksResolverMock) GetMiniBlocks(hashes [][]byte) (block.MiniBlockSlice, [][]byte)
- func (hrm *MiniBlocksResolverMock) GetMiniBlocksFromPool(hashes [][]byte) (block.MiniBlockSlice, [][]byte)
- func (hrm *MiniBlocksResolverMock) IsInterfaceNil() bool
- func (hrm *MiniBlocksResolverMock) ProcessReceivedMessage(message p2p.MessageP2P, _ p2p.PeerID) error
- func (hrm *MiniBlocksResolverMock) RequestDataFromHash(hash []byte, epoch uint32) error
- func (hrm *MiniBlocksResolverMock) RequestDataFromHashArray(hashes [][]byte, epoch uint32) error
- type NetworkConnectionWatcherStub
- type NodesCoordinatorMock
- func (ncm *NodesCoordinatorMock) ComputeConsensusGroup(randomess []byte, round uint64, shardId uint32, epoch uint32) ([]sharding.Validator, error)
- func (ncm *NodesCoordinatorMock) ComputeLeaving([]sharding.Validator) []sharding.Validator
- func (ncm *NodesCoordinatorMock) ConsensusGroupSize(shardId uint32) int
- func (ncm *NodesCoordinatorMock) GetAllEligibleValidatorsPublicKeys(_ uint32) (map[uint32][][]byte, error)
- func (ncm *NodesCoordinatorMock) GetAllWaitingValidatorsPublicKeys(_ uint32) (map[uint32][][]byte, error)
- func (ncm *NodesCoordinatorMock) GetConsensusValidatorsPublicKeys(randomness []byte, round uint64, shardId uint32, epoch uint32) ([]string, error)
- func (ncm *NodesCoordinatorMock) GetConsensusValidatorsRewardsAddresses(randomness []byte, round uint64, shardId uint32, epoch uint32) ([]string, error)
- func (ncm *NodesCoordinatorMock) GetConsensusWhitelistedNodes(_ uint32) (map[string]struct{}, error)
- func (ncm *NodesCoordinatorMock) GetNumTotalEligible() uint64
- func (ncm *NodesCoordinatorMock) GetOwnPublicKey() []byte
- func (ncm *NodesCoordinatorMock) GetSavedStateKey() []byte
- func (ncm *NodesCoordinatorMock) GetSelectedPublicKeys(selection []byte, shardId uint32, epoch uint32) (publicKeys []string, err error)
- func (ncm *NodesCoordinatorMock) GetValidatorWithPublicKey(publicKey []byte, epoch uint32) (sharding.Validator, uint32, error)
- func (ncm *NodesCoordinatorMock) GetValidatorsIndexes(_ []string, _ uint32) ([]uint64, error)
- func (ncm *NodesCoordinatorMock) IsInterfaceNil() bool
- func (ncm *NodesCoordinatorMock) LoadState(_ []byte) error
- func (ncm *NodesCoordinatorMock) SetNodesPerShards(eligible map[uint32][]sharding.Validator, _ map[uint32][]sharding.Validator, ...) error
- func (ncm *NodesCoordinatorMock) ShardIdForEpoch(_ uint32) (uint32, error)
- type ObjectsContainerStub
- func (ocs *ObjectsContainerStub) Add(key string, val interface{}) error
- func (ocs *ObjectsContainerStub) Get(key string) (interface{}, error)
- func (ocs *ObjectsContainerStub) Len() int
- func (ocs *ObjectsContainerStub) Remove(key string)
- func (ocs *ObjectsContainerStub) Replace(key string, val interface{}) error
- type P2PAntifloodHandlerStub
- type P2PMessageMock
- func (msg *P2PMessageMock) Data() []byte
- func (msg *P2PMessageMock) From() []byte
- func (msg *P2PMessageMock) IsInterfaceNil() bool
- func (msg *P2PMessageMock) Key() []byte
- func (msg *P2PMessageMock) Peer() p2p.PeerID
- func (msg *P2PMessageMock) SeqNo() []byte
- func (msg *P2PMessageMock) Signature() []byte
- func (msg *P2PMessageMock) Topics() []string
- type PeerAccountHandlerMock
- func (pahm *PeerAccountHandlerMock) AddToAccumulatedFees(value *big.Int) error
- func (pahm *PeerAccountHandlerMock) AddressContainer() state.AddressContainer
- func (pahm *PeerAccountHandlerMock) DataTrie() data.Trie
- func (pahm *PeerAccountHandlerMock) DataTrieTracker() state.DataTrieTracker
- func (pahm *PeerAccountHandlerMock) DecreaseLeaderSuccessRateWithJournal(value uint32) error
- func (pahm *PeerAccountHandlerMock) DecreaseValidatorSuccessRateWithJournal(value uint32) error
- func (pahm *PeerAccountHandlerMock) GetCode() []byte
- func (pahm *PeerAccountHandlerMock) GetCodeHash() []byte
- func (pahm *PeerAccountHandlerMock) GetNonce() uint64
- func (pahm *PeerAccountHandlerMock) GetRating() uint32
- func (pahm *PeerAccountHandlerMock) GetRootHash() []byte
- func (pahm *PeerAccountHandlerMock) GetTempRating() uint32
- func (pahm *PeerAccountHandlerMock) IncreaseLeaderSuccessRateWithJournal(value uint32) error
- func (pahm *PeerAccountHandlerMock) IncreaseNumSelectedInSuccessBlocks() error
- func (pahm *PeerAccountHandlerMock) IncreaseValidatorSuccessRateWithJournal(value uint32) error
- func (pahm *PeerAccountHandlerMock) IsInterfaceNil() bool
- func (pahm *PeerAccountHandlerMock) ResetAtNewEpoch() error
- func (pahm *PeerAccountHandlerMock) SetBLSPublicKeyWithJournal(address []byte) error
- func (pahm *PeerAccountHandlerMock) SetCode(code []byte)
- func (pahm *PeerAccountHandlerMock) SetCodeHash(codeHash []byte)
- func (pahm *PeerAccountHandlerMock) SetCodeHashWithJournal(codeHash []byte) error
- func (pahm *PeerAccountHandlerMock) SetDataTrie(trie data.Trie)
- func (pahm *PeerAccountHandlerMock) SetDataTrieTracker(tracker state.DataTrieTracker)
- func (pahm *PeerAccountHandlerMock) SetNonce(nonce uint64)
- func (pahm *PeerAccountHandlerMock) SetNonceWithJournal(nonce uint64) error
- func (pahm *PeerAccountHandlerMock) SetRatingWithJournal(rating uint32) error
- func (pahm *PeerAccountHandlerMock) SetRewardAddressWithJournal(address []byte) error
- func (pahm *PeerAccountHandlerMock) SetRootHash(rootHash []byte)
- func (pahm *PeerAccountHandlerMock) SetSchnorrPublicKeyWithJournal(address []byte) error
- func (pahm *PeerAccountHandlerMock) SetStakeWithJournal(stake *big.Int) error
- func (pahm *PeerAccountHandlerMock) SetTempRatingWithJournal(rating uint32) error
- type PeerChangesHandler
- type PendingMiniBlocksHandlerStub
- func (p *PendingMiniBlocksHandlerStub) AddProcessedHeader(handler data.HeaderHandler) error
- func (p *PendingMiniBlocksHandlerStub) GetPendingMiniBlocks(shardID uint32) [][]byte
- func (p *PendingMiniBlocksHandlerStub) IsInterfaceNil() bool
- func (p *PendingMiniBlocksHandlerStub) RevertHeader(handler data.HeaderHandler) error
- func (p *PendingMiniBlocksHandlerStub) SetPendingMiniBlocks(shardID uint32, mbHashes [][]byte)
- type PoolsHolderMock
- func (phm *PoolsHolderMock) CurrentBlockTxs() dataRetriever.TransactionCacher
- func (phm *PoolsHolderMock) Headers() dataRetriever.HeadersPool
- func (phm *PoolsHolderMock) IsInterfaceNil() bool
- func (phm *PoolsHolderMock) MiniBlocks() storage.Cacher
- func (phm *PoolsHolderMock) PeerChangesBlocks() storage.Cacher
- func (phm *PoolsHolderMock) RewardTransactions() dataRetriever.ShardedDataCacherNotifier
- func (phm *PoolsHolderMock) SetTransactions(transactions dataRetriever.ShardedDataCacherNotifier)
- func (phm *PoolsHolderMock) SetUnsignedTransactions(scrs dataRetriever.ShardedDataCacherNotifier)
- func (phm *PoolsHolderMock) Transactions() dataRetriever.ShardedDataCacherNotifier
- func (phm *PoolsHolderMock) TrieNodes() storage.Cacher
- func (phm *PoolsHolderMock) UnsignedTransactions() dataRetriever.ShardedDataCacherNotifier
- type PoolsHolderStub
- func (phs *PoolsHolderStub) CurrentBlockTxs() dataRetriever.TransactionCacher
- func (phs *PoolsHolderStub) Headers() dataRetriever.HeadersPool
- func (phs *PoolsHolderStub) IsInterfaceNil() bool
- func (phs *PoolsHolderStub) MetaBlocks() storage.Cacher
- func (phs *PoolsHolderStub) MiniBlocks() storage.Cacher
- func (phs *PoolsHolderStub) PeerChangesBlocks() storage.Cacher
- func (phs *PoolsHolderStub) RewardTransactions() dataRetriever.ShardedDataCacherNotifier
- func (phs *PoolsHolderStub) Transactions() dataRetriever.ShardedDataCacherNotifier
- func (phs *PoolsHolderStub) TrieNodes() storage.Cacher
- func (phs *PoolsHolderStub) UnsignedTransactions() dataRetriever.ShardedDataCacherNotifier
- type PreProcessorContainerMock
- func (ppcm *PreProcessorContainerMock) Add(_ block.Type, _ process.PreProcessor) error
- func (ppcm *PreProcessorContainerMock) AddMultiple(_ []block.Type, _ []process.PreProcessor) error
- func (ppcm *PreProcessorContainerMock) Get(key block.Type) (process.PreProcessor, error)
- func (ppcm *PreProcessorContainerMock) IsInterfaceNil() bool
- func (ppcm *PreProcessorContainerMock) Keys() []block.Type
- func (ppcm *PreProcessorContainerMock) Len() int
- func (ppcm *PreProcessorContainerMock) Remove(_ block.Type)
- func (ppcm *PreProcessorContainerMock) Replace(_ block.Type, _ process.PreProcessor) error
- type PreProcessorMock
- func (ppm *PreProcessorMock) CreateAndProcessMiniBlocks(haveTime func() bool) (block.MiniBlockSlice, error)
- func (ppm *PreProcessorMock) CreateBlockStarted()
- func (ppm *PreProcessorMock) CreateMarshalizedData(txHashes [][]byte) ([][]byte, error)
- func (ppm *PreProcessorMock) GetAllCurrentUsedTxs() map[string]data.TransactionHandler
- func (ppm *PreProcessorMock) IsDataPrepared(requestedTxs int, haveTime func() time.Duration) error
- func (ppm *PreProcessorMock) IsInterfaceNil() bool
- func (ppm *PreProcessorMock) ProcessBlockTransactions(body *block.Body, haveTime func() bool) error
- func (ppm *PreProcessorMock) ProcessMiniBlock(miniBlock *block.MiniBlock, haveTime func() bool) ([][]byte, error)
- func (ppm *PreProcessorMock) RemoveTxBlockFromPools(body *block.Body, miniBlockPool storage.Cacher) error
- func (ppm *PreProcessorMock) RequestBlockTransactions(body *block.Body) int
- func (ppm *PreProcessorMock) RequestTransactionsForMiniBlock(miniBlock *block.MiniBlock) int
- func (ppm *PreProcessorMock) RestoreTxBlockIntoPools(body *block.Body, miniBlockPool storage.Cacher) (int, error)
- func (ppm *PreProcessorMock) SaveTxBlockToStorage(body *block.Body) error
- type ProtobufMarshalizerMock
- type QuotaStatusHandlerStub
- func (qshs *QuotaStatusHandlerStub) AddQuota(identifier string, numReceived uint32, sizeReceived uint64, ...)
- func (qshs *QuotaStatusHandlerStub) IsInterfaceNil() bool
- func (qshs *QuotaStatusHandlerStub) ResetStatistics()
- func (qshs *QuotaStatusHandlerStub) SetGlobalQuota(numReceived uint32, sizeReceived uint64, numProcessed uint32, ...)
- type RaterMock
- func (rm *RaterMock) ComputeDecreaseProposer(val uint32) uint32
- func (rm *RaterMock) ComputeDecreaseValidator(val uint32) uint32
- func (rm *RaterMock) ComputeIncreaseProposer(val uint32) uint32
- func (rm *RaterMock) ComputeIncreaseValidator(val uint32) uint32
- func (rm *RaterMock) GetChance(rating uint32) uint32
- func (rm *RaterMock) GetRating(pk string) uint32
- func (rm *RaterMock) GetStartRating() uint32
- func (rm *RaterMock) IsInterfaceNil() bool
- func (rm *RaterMock) SetRatingReader(reader sharding.RatingReader)
- func (rm *RaterMock) UpdateRatingFromTempRating(pks []string) error
- type RatingReaderMock
- type RatingsInfoMock
- func (rd *RatingsInfoMock) MaxRating() uint32
- func (rd *RatingsInfoMock) MinRating() uint32
- func (rd *RatingsInfoMock) ProposerDecreaseRatingStep() uint32
- func (rd *RatingsInfoMock) ProposerIncreaseRatingStep() uint32
- func (rd *RatingsInfoMock) SelectionChances() []process.SelectionChance
- func (rd *RatingsInfoMock) StartRating() uint32
- func (rd *RatingsInfoMock) ValidatorDecreaseRatingStep() uint32
- func (rd *RatingsInfoMock) ValidatorIncreaseRatingStep() uint32
- type RequestHandlerStub
- func (rhs *RequestHandlerStub) IsInterfaceNil() bool
- func (rhs *RequestHandlerStub) RequestMetaHeader(hash []byte)
- func (rhs *RequestHandlerStub) RequestMetaHeaderByNonce(nonce uint64)
- func (rhs *RequestHandlerStub) RequestMiniBlock(destShardID uint32, miniblockHash []byte)
- func (rhs *RequestHandlerStub) RequestMiniBlocks(destShardID uint32, miniblocksHashes [][]byte)
- func (rhs *RequestHandlerStub) RequestRewardTransactions(destShardID uint32, txHashes [][]byte)
- func (rhs *RequestHandlerStub) RequestShardHeader(shardID uint32, hash []byte)
- func (rhs *RequestHandlerStub) RequestShardHeaderByNonce(shardID uint32, nonce uint64)
- func (rhs *RequestHandlerStub) RequestStartOfEpochMetaBlock(epoch uint32)
- func (rhs *RequestHandlerStub) RequestTransaction(destShardID uint32, txHashes [][]byte)
- func (rhs *RequestHandlerStub) RequestTrieNodes(destShardID uint32, miniblockHash []byte, topic string)
- func (rhs *RequestHandlerStub) RequestUnsignedTransactions(destShardID uint32, txHashes [][]byte)
- func (rhs *RequestHandlerStub) SetEpoch(_ uint32)
- type RequestedItemsHandlerStub
- type ResolverStub
- type ResolversContainerStub
- func (rcs *ResolversContainerStub) Add(key string, val dataRetriever.Resolver) error
- func (rcs *ResolversContainerStub) AddMultiple(_ []string, _ []dataRetriever.Resolver) error
- func (rcs *ResolversContainerStub) Get(key string) (dataRetriever.Resolver, error)
- func (rcs *ResolversContainerStub) IsInterfaceNil() bool
- func (rcs *ResolversContainerStub) Len() int
- func (rcs *ResolversContainerStub) Remove(key string)
- func (rcs *ResolversContainerStub) Replace(key string, val dataRetriever.Resolver) error
- type ResolversFinderStub
- func (rfs *ResolversFinderStub) CrossShardResolver(baseTopic string, crossShard uint32) (dataRetriever.Resolver, error)
- func (rfs *ResolversFinderStub) IntraShardResolver(baseTopic string) (dataRetriever.Resolver, error)
- func (rfs *ResolversFinderStub) MetaChainResolver(baseTopic string) (dataRetriever.Resolver, error)
- type RewardTxProcessorMock
- type RewardsHandlerMock
- type RoundStub
- func (rnds *RoundStub) Index() int32
- func (rnds *RoundStub) RemainingTime(startTime time.Time, maxTime time.Duration) time.Duration
- func (rnds *RoundStub) TimeDuration() time.Duration
- func (rnds *RoundStub) TimeStamp() time.Time
- func (rnds *RoundStub) UpdateRound(genesisRoundTimeStamp time.Time, timeStamp time.Time)
- type RounderMock
- func (rndm *RounderMock) Index() int64
- func (rndm *RounderMock) IsInterfaceNil() bool
- func (rndm *RounderMock) RemainingTime(_ time.Time, _ time.Duration) time.Duration
- func (rndm *RounderMock) TimeDuration() time.Duration
- func (rndm *RounderMock) TimeStamp() time.Time
- func (rndm *RounderMock) UpdateRound(genesisRoundTimeStamp time.Time, timeStamp time.Time)
- type SCProcessorMock
- func (sc *SCProcessorMock) ComputeTransactionType(tx data.TransactionHandler) (process.TransactionType, error)
- func (sc *SCProcessorMock) DeploySmartContract(tx data.TransactionHandler, acntSrc state.UserAccountHandler) error
- func (sc *SCProcessorMock) ExecuteSmartContractTransaction(tx data.TransactionHandler, acntSrc, acntDst state.UserAccountHandler) error
- func (sc *SCProcessorMock) IsInterfaceNil() bool
- func (sc *SCProcessorMock) ProcessSmartContractResult(scr *smartContractResult.SmartContractResult) error
- type SCToProtocolStub
- type ScQueryStub
- type ServiceContainerMock
- type ShardIdHasMapMock
- func (sihsm *ShardIdHasMapMock) Delete(shardId uint32)
- func (sihsm *ShardIdHasMapMock) IsInterfaceNil() bool
- func (sihsm *ShardIdHasMapMock) Load(shardId uint32) ([]byte, bool)
- func (sihsm *ShardIdHasMapMock) Range(f func(shardId uint32, hash []byte) bool)
- func (sihsm *ShardIdHasMapMock) Store(shardId uint32, hash []byte)
- type ShardedDataStub
- func (sd *ShardedDataStub) AddData(key []byte, data interface{}, cacheId string)
- func (sd *ShardedDataStub) Clear()
- func (sd *ShardedDataStub) ClearShardStore(cacheId string)
- func (sd *ShardedDataStub) CreateShardStore(cacheId string)
- func (sd *ShardedDataStub) IsInterfaceNil() bool
- func (sd *ShardedDataStub) MergeShardStores(sourceCacheId, destCacheId string)
- func (sd *ShardedDataStub) RegisterHandler(handler func(key []byte))
- func (sd *ShardedDataStub) RemoveData(key []byte, cacheId string)
- func (sd *ShardedDataStub) RemoveDataFromAllShards(key []byte)
- func (sd *ShardedDataStub) RemoveSetOfDataFromPool(keys [][]byte, cacheId string)
- func (sd *ShardedDataStub) SearchFirstData(key []byte) (value interface{}, ok bool)
- func (sd *ShardedDataStub) ShardDataStore(cacheId string) (c storage.Cacher)
- type SignerMock
- type SingleSignKeyGenMock
- func (sskgm *SingleSignKeyGenMock) GeneratePair() (crypto.PrivateKey, crypto.PublicKey)
- func (sskgm *SingleSignKeyGenMock) IsInterfaceNil() bool
- func (sskgm *SingleSignKeyGenMock) PrivateKeyFromByteArray(_ []byte) (crypto.PrivateKey, error)
- func (sskgm *SingleSignKeyGenMock) PublicKeyFromByteArray(b []byte) (crypto.PublicKey, error)
- func (sskgm *SingleSignKeyGenMock) Suite() crypto.Suite
- type SingleSignPublicKey
- type SmartContractResultsProcessorMock
- type StorageBootstrapperMock
- 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) GetFromEpoch(key []byte, _ uint32) ([]byte, error)
- func (sm *StorerMock) Has(_ []byte) error
- func (sm *StorerMock) HasInEpoch(_ []byte, _ uint32) error
- func (sm *StorerMock) IsInterfaceNil() bool
- func (sm *StorerMock) Put(key, data []byte) error
- func (sm *StorerMock) Remove(key []byte) error
- func (sm *StorerMock) SearchFirst(_ []byte) ([]byte, error)
- type StorerStub
- func (ss *StorerStub) ClearCache()
- func (ss *StorerStub) Close() error
- func (ss *StorerStub) DestroyUnit() error
- func (ss *StorerStub) Get(key []byte) ([]byte, error)
- func (ss *StorerStub) GetFromEpoch(key []byte, epoch uint32) ([]byte, error)
- func (ss *StorerStub) Has(key []byte) error
- func (ss *StorerStub) HasInEpoch(key []byte, epoch uint32) error
- func (ss *StorerStub) IsInterfaceNil() bool
- func (ss *StorerStub) Put(key, data []byte) error
- func (ss *StorerStub) Remove(key []byte) error
- func (ss *StorerStub) SearchFirst(key []byte) ([]byte, error)
- type SyncStarterStub
- type SyncTimerMock
- type TemporaryAccountsHandlerMock
- func (tahm *TemporaryAccountsHandlerMock) AddTempAccount(address []byte, balance *big.Int, nonce uint64)
- func (tahm *TemporaryAccountsHandlerMock) CleanTempAccounts()
- func (tahm *TemporaryAccountsHandlerMock) IsInterfaceNil() bool
- func (tahm *TemporaryAccountsHandlerMock) TempAccount(address []byte) state.AccountHandler
- type TopicAntiFloodStub
- type TopicHandlerStub
- type TransactionCoordinatorMock
- func (tcm *TransactionCoordinatorMock) ComputeTransactionType(tx data.TransactionHandler) (process.TransactionType, error)
- func (tcm *TransactionCoordinatorMock) CreateBlockStarted()
- func (tcm *TransactionCoordinatorMock) CreateMarshalizedData(body *block.Body) map[string][][]byte
- func (tcm *TransactionCoordinatorMock) CreateMbsAndProcessCrossShardTransactionsDstMe(header data.HeaderHandler, processedMiniBlocksHashes map[string]struct{}, ...) (block.MiniBlockSlice, uint32, bool, error)
- func (tcm *TransactionCoordinatorMock) CreateMbsAndProcessTransactionsFromMe(haveTime func() bool) block.MiniBlockSlice
- func (tcm *TransactionCoordinatorMock) CreateReceiptsHash() ([]byte, error)
- func (tcm *TransactionCoordinatorMock) GetAllCurrentUsedTxs(blockType block.Type) map[string]data.TransactionHandler
- func (tcm *TransactionCoordinatorMock) IsDataPreparedForProcessing(haveTime func() time.Duration) error
- func (tcm *TransactionCoordinatorMock) IsInterfaceNil() bool
- func (tcm *TransactionCoordinatorMock) ProcessBlockTransaction(body *block.Body, haveTime func() time.Duration) error
- func (tcm *TransactionCoordinatorMock) RemoveBlockDataFromPool(body *block.Body) error
- func (tcm *TransactionCoordinatorMock) RequestBlockTransactions(body *block.Body)
- func (tcm *TransactionCoordinatorMock) RequestMiniBlocks(header data.HeaderHandler)
- func (tcm *TransactionCoordinatorMock) RestoreBlockDataFromStorage(body *block.Body) (int, error)
- func (tcm *TransactionCoordinatorMock) SaveBlockDataToStorage(body *block.Body) error
- func (tcm *TransactionCoordinatorMock) VerifyCreatedBlockTransactions(hdr data.HeaderHandler, body *block.Body) error
- type TransactionInterceptorMock
- func (tim *TransactionInterceptorMock) AddressConverter() state.AddressConverter
- func (tim *TransactionInterceptorMock) Check() bool
- func (tim *TransactionInterceptorMock) GetTransaction() *transaction.Transaction
- func (tim *TransactionInterceptorMock) Hash() []byte
- func (tim *TransactionInterceptorMock) ID() string
- func (tim *TransactionInterceptorMock) IsAddressedToOtherShards() bool
- func (tim *TransactionInterceptorMock) IsInterfaceNil() bool
- func (tim *TransactionInterceptorMock) RcvShard() uint32
- func (tim *TransactionInterceptorMock) SetAddressConverter(converter state.AddressConverter)
- func (tim *TransactionInterceptorMock) SetHash(hash []byte)
- func (tim *TransactionInterceptorMock) SndShard() uint32
- func (tim *TransactionInterceptorMock) VerifySig() bool
- type TransactionPoolMock
- type TrieStub
- func (ts *TrieStub) AppendToOldHashes(hashes [][]byte)
- func (ts *TrieStub) CancelPrune(rootHash []byte, identifier data.TriePruningIdentifier)
- func (ts *TrieStub) ClosePersister() error
- func (ts *TrieStub) Commit() error
- func (ts *TrieStub) Database() data.DBWriteCacher
- func (ts *TrieStub) DeepClone() (data.Trie, error)
- func (ts *TrieStub) Delete(key []byte) error
- func (ts *TrieStub) Get(key []byte) ([]byte, error)
- func (ts *TrieStub) GetAllLeaves() (map[string][]byte, error)
- func (ts *TrieStub) GetSerializedNodes(hash []byte, maxBuffToSend uint64) ([][]byte, error)
- func (ts *TrieStub) IsInterfaceNil() bool
- func (ts *TrieStub) IsPruningEnabled() bool
- func (ts *TrieStub) Prove(key []byte) ([][]byte, error)
- func (ts *TrieStub) Prune(rootHash []byte, identifier data.TriePruningIdentifier) error
- func (ts *TrieStub) Recreate(root []byte) (data.Trie, error)
- func (ts *TrieStub) ResetOldHashes() [][]byte
- func (ts *TrieStub) Root() ([]byte, error)
- func (ts *TrieStub) SetCheckpoint(_ []byte)
- func (ts *TrieStub) Snapshot() error
- func (ts *TrieStub) String() string
- func (ts *TrieStub) TakeSnapshot(_ []byte)
- func (ts *TrieStub) Update(key, value []byte) error
- func (ts *TrieStub) VerifyProof(proofs [][]byte, key []byte) (bool, error)
- type TxForCurrentBlockStub
- type TxPoolsCleanerMock
- type TxProcessorMock
- func (tp *TxProcessorMock) IsInterfaceNil() bool
- func (tp *TxProcessorMock) ProcessSmartContractResult(scr *smartContractResult.SmartContractResult) error
- func (tp *TxProcessorMock) ProcessTransaction(transaction *transaction.Transaction) error
- func (tp *TxProcessorMock) SetBalancesToTrie(accBalance map[string]*big.Int) (rootHash []byte, err error)
- type TxTypeHandlerMock
- type TxValidatorHandlerStub
- type TxValidatorStub
- 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 UnsignedTxHandlerMock
- func (ut *UnsignedTxHandlerMock) AddRewardTxFromBlock(tx data.TransactionHandler)
- func (ut *UnsignedTxHandlerMock) CleanProcessedUTxs()
- func (ut *UnsignedTxHandlerMock) CreateAllUTxs() []data.TransactionHandler
- func (ut *UnsignedTxHandlerMock) IsInterfaceNil() bool
- func (ut *UnsignedTxHandlerMock) ProcessTransactionFee(cost *big.Int, hash []byte)
- func (ut *UnsignedTxHandlerMock) VerifyCreatedUTxs() error
- type UserAccountStub
- func (u *UserAccountStub) AddToBalance(value *big.Int) error
- func (u *UserAccountStub) AddToDeveloperReward(value *big.Int) error
- func (u *UserAccountStub) AddressContainer() state.AddressContainer
- func (u *UserAccountStub) ChangeOwnerAddress(sndAddress []byte, newAddress []byte) error
- func (u *UserAccountStub) ClaimDeveloperRewards(sndAddress []byte) (*big.Int, error)
- func (u *UserAccountStub) DataTrie() data.Trie
- func (u *UserAccountStub) DataTrieTracker() state.DataTrieTracker
- func (u *UserAccountStub) GetBalance() *big.Int
- func (u *UserAccountStub) GetCode() []byte
- func (u *UserAccountStub) GetCodeHash() []byte
- func (u *UserAccountStub) GetNonce() uint64
- func (u *UserAccountStub) GetOwnerAddress() []byte
- func (u *UserAccountStub) GetRootHash() []byte
- func (u *UserAccountStub) IsInterfaceNil() bool
- func (u *UserAccountStub) SetCode(code []byte)
- func (u *UserAccountStub) SetCodeHash(code []byte)
- func (u *UserAccountStub) SetCodeHashWithJournal(codeHash []byte) error
- func (u *UserAccountStub) SetDataTrie(trie data.Trie)
- func (u *UserAccountStub) SetNonce(nonce uint64)
- func (u *UserAccountStub) SetNonceWithJournal(nonce uint64) error
- func (u *UserAccountStub) SetOwnerAddressWithJournal(ownerAddress []byte) error
- func (u *UserAccountStub) SetRootHash(hash []byte)
- func (u *UserAccountStub) SubFromBalance(value *big.Int) error
- type VMContainerMock
- func (v *VMContainerMock) Add(key []byte, val vmcommon.VMExecutionHandler) error
- func (v *VMContainerMock) AddMultiple(keys [][]byte, vms []vmcommon.VMExecutionHandler) error
- func (v *VMContainerMock) Get(key []byte) (vmcommon.VMExecutionHandler, error)
- func (v *VMContainerMock) IsInterfaceNil() bool
- func (v *VMContainerMock) Keys() [][]byte
- func (v *VMContainerMock) Len() int
- func (v *VMContainerMock) Remove(key []byte)
- func (v *VMContainerMock) Replace(key []byte, val vmcommon.VMExecutionHandler) error
- type VMExecutionHandlerStub
- type ValidatorMock
- type ValidatorSettingsStub
- type ValidatorStatisticsProcessorStub
- func (vsp *ValidatorStatisticsProcessorStub) GetPeerAccount(address []byte) (state.PeerAccountHandler, error)
- func (vsp *ValidatorStatisticsProcessorStub) GetValidatorInfoForRootHash(rootHash []byte) (map[uint32][]*state.ValidatorInfo, error)
- func (vsp *ValidatorStatisticsProcessorStub) IsInterfaceNil() bool
- func (vsp *ValidatorStatisticsProcessorStub) Process(vid data.ValidatorInfoHandler) error
- func (vsp *ValidatorStatisticsProcessorStub) ResetValidatorStatisticsAtNewEpoch(vInfos map[uint32][]*state.ValidatorInfo) error
- func (vsp *ValidatorStatisticsProcessorStub) RevertPeerState(header data.HeaderHandler) error
- func (vsp *ValidatorStatisticsProcessorStub) RootHash() ([]byte, error)
- func (vsp *ValidatorStatisticsProcessorStub) UpdatePeerState(header data.HeaderHandler, _ map[string]data.HeaderHandler) ([]byte, error)
- type ValidityAttesterStub
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMultiShardsCoordinatorMock ¶
func NewMultiShardsCoordinatorMock(nrShard uint32) *multipleShardsCoordinatorMock
NewMultiShardsCoordinatorMock -
func NewMultipleShardsCoordinatorMock ¶
func NewMultipleShardsCoordinatorMock() *multipleShardsCoordinatorMock
NewMultipleShardsCoordinatorMock -
func NewNilTxValidator ¶
func NewNilTxValidator() (*nilTxValidator, error)
NewNilTxValidator creates a new nil tx handler validator instance
func NewNonceHashConverterMock ¶
func NewNonceHashConverterMock() *nonceHashConverterMock
NewNonceHashConverterMock -
func NewOneShardCoordinatorMock ¶
func NewOneShardCoordinatorMock() *oneShardCoordinatorMock
NewOneShardCoordinatorMock -
Types ¶
type AccountTrackerStub ¶ added in v1.0.3
type AccountTrackerStub struct {
SaveAccountCalled func(accountHandler state.AccountHandler) error
JournalizeCalled func(entry state.JournalEntry)
}
AccountTrackerStub -
func (*AccountTrackerStub) IsInterfaceNil ¶ added in v1.0.16
func (ats *AccountTrackerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*AccountTrackerStub) Journalize ¶ added in v1.0.3
func (ats *AccountTrackerStub) Journalize(entry state.JournalEntry)
Journalize -
func (*AccountTrackerStub) SaveAccount ¶ added in v1.0.3
func (ats *AccountTrackerStub) SaveAccount(accountHandler state.AccountHandler) error
SaveAccount -
type AccountWrapMock ¶
type AccountWrapMock struct {
MockValue int
SetNonceWithJournalCalled func(nonce uint64) error `json:"-"`
SetCodeHashWithJournalCalled func(codeHash []byte) error `json:"-"`
SetCodeWithJournalCalled func(codeHash []byte) error `json:"-"`
// contains filtered or unexported fields
}
AccountWrapMock -
func NewAccountWrapMock ¶
func NewAccountWrapMock(adr state.AddressContainer, tracker state.AccountTracker) *AccountWrapMock
NewAccountWrapMock -
func (*AccountWrapMock) AddressContainer ¶
func (awm *AccountWrapMock) AddressContainer() state.AddressContainer
AddressContainer -
func (*AccountWrapMock) DataTrieTracker ¶
func (awm *AccountWrapMock) DataTrieTracker() state.DataTrieTracker
DataTrieTracker -
func (*AccountWrapMock) GetCodeHash ¶
func (awm *AccountWrapMock) GetCodeHash() []byte
GetCodeHash -
func (*AccountWrapMock) GetRootHash ¶
func (awm *AccountWrapMock) GetRootHash() []byte
GetRootHash -
func (*AccountWrapMock) IsInterfaceNil ¶
func (awm *AccountWrapMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*AccountWrapMock) SetCodeHash ¶
func (awm *AccountWrapMock) SetCodeHash(codeHash []byte)
SetCodeHash -
func (*AccountWrapMock) SetCodeHashWithJournal ¶ added in v1.0.3
func (awm *AccountWrapMock) SetCodeHashWithJournal(codeHash []byte) error
SetCodeHashWithJournal -
func (*AccountWrapMock) SetDataTrie ¶
func (awm *AccountWrapMock) SetDataTrie(trie data.Trie)
SetDataTrie -
func (*AccountWrapMock) SetDataTrieTracker ¶ added in v1.0.3
func (awm *AccountWrapMock) SetDataTrieTracker(tracker state.DataTrieTracker)
SetDataTrieTracker -
func (*AccountWrapMock) SetNonce ¶ added in v1.0.3
func (awm *AccountWrapMock) SetNonce(nonce uint64)
SetNonce -
func (*AccountWrapMock) SetNonceWithJournal ¶ added in v1.0.3
func (awm *AccountWrapMock) SetNonceWithJournal(nonce uint64) error
SetNonceWithJournal -
func (*AccountWrapMock) SetRootHash ¶
func (awm *AccountWrapMock) SetRootHash(rootHash []byte)
SetRootHash -
type AccountsStub ¶
type AccountsStub struct {
AddJournalEntryCalled func(je state.JournalEntry)
CommitCalled func() ([]byte, error)
GetAccountWithJournalCalled func(addressContainer state.AddressContainer) (state.AccountHandler, error)
GetExistingAccountCalled func(addressContainer state.AddressContainer) (state.AccountHandler, error)
HasAccountStateCalled func(addressContainer state.AddressContainer) (bool, error)
JournalLenCalled func() int
PutCodeCalled func(accountHandler state.AccountHandler, code []byte) error
RemoveAccountCalled func(addressContainer state.AddressContainer) error
RemoveCodeCalled func(codeHash []byte) error
RevertToSnapshotCalled func(snapshot int) error
SaveAccountStateCalled func(acountWrapper state.AccountHandler) error
SaveDataTrieCalled func(acountWrapper state.AccountHandler) error
RootHashCalled func() ([]byte, error)
RecreateTrieCalled func(rootHash []byte) error
PruneTrieCalled func(rootHash []byte, identifier data.TriePruningIdentifier) error
SnapshotStateCalled func(rootHash []byte)
SetStateCheckpointCalled func(rootHash []byte)
CancelPruneCalled func(rootHash []byte, identifier data.TriePruningIdentifier)
IsPruningEnabledCalled func() bool
GetAllLeavesCalled func(rootHash []byte) (map[string][]byte, error)
}
AccountsStub -
func (*AccountsStub) AddJournalEntry ¶
func (as *AccountsStub) AddJournalEntry(je state.JournalEntry)
AddJournalEntry -
func (*AccountsStub) CancelPrune ¶
func (as *AccountsStub) CancelPrune(rootHash []byte, identifier data.TriePruningIdentifier)
CancelPrune -
func (*AccountsStub) ClosePersister ¶ added in v1.0.78
func (as *AccountsStub) ClosePersister() error
ClosePersister -
func (*AccountsStub) GetAccountWithJournal ¶ added in v1.0.3
func (as *AccountsStub) GetAccountWithJournal(addressContainer state.AddressContainer) (state.AccountHandler, error)
GetAccountWithJournal -
func (*AccountsStub) GetAllLeaves ¶
func (as *AccountsStub) GetAllLeaves(rootHash []byte) (map[string][]byte, error)
GetAllLeaves -
func (*AccountsStub) GetExistingAccount ¶
func (as *AccountsStub) GetExistingAccount(addressContainer state.AddressContainer) (state.AccountHandler, error)
GetExistingAccount -
func (*AccountsStub) HasAccount ¶ added in v1.0.3
func (as *AccountsStub) HasAccount(addressContainer state.AddressContainer) (bool, error)
HasAccount -
func (*AccountsStub) IsInterfaceNil ¶
func (as *AccountsStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*AccountsStub) IsPruningEnabled ¶
func (as *AccountsStub) IsPruningEnabled() bool
IsPruningEnabled -
func (*AccountsStub) PruneTrie ¶
func (as *AccountsStub) PruneTrie(rootHash []byte, identifier data.TriePruningIdentifier) error
PruneTrie -
func (*AccountsStub) PutCode ¶ added in v1.0.3
func (as *AccountsStub) PutCode(accountHandler state.AccountHandler, code []byte) error
PutCode -
func (*AccountsStub) RecreateTrie ¶
func (as *AccountsStub) RecreateTrie(rootHash []byte) error
RecreateTrie -
func (*AccountsStub) RemoveAccount ¶
func (as *AccountsStub) RemoveAccount(addressContainer state.AddressContainer) error
RemoveAccount -
func (*AccountsStub) RemoveCode ¶ added in v1.0.3
func (as *AccountsStub) RemoveCode(codeHash []byte) error
RemoveCode -
func (*AccountsStub) RevertToSnapshot ¶
func (as *AccountsStub) RevertToSnapshot(snapshot int) error
RevertToSnapshot -
func (*AccountsStub) SaveDataTrie ¶ added in v1.0.3
func (as *AccountsStub) SaveDataTrie(journalizedAccountHandler state.AccountHandler) error
SaveDataTrie -
func (*AccountsStub) SaveJournalizedAccount ¶ added in v1.0.3
func (as *AccountsStub) SaveJournalizedAccount(journalizedAccountHandler state.AccountHandler) error
SaveJournalizedAccount -
func (*AccountsStub) SetStateCheckpoint ¶
func (as *AccountsStub) SetStateCheckpoint(rootHash []byte)
SetStateCheckpoint -
func (*AccountsStub) SnapshotState ¶
func (as *AccountsStub) SnapshotState(rootHash []byte)
SnapshotState -
type AddressConverterFake ¶
type AddressConverterFake struct {
// contains filtered or unexported fields
}
AddressConverterFake -
func NewAddressConverterFake ¶
func NewAddressConverterFake(addressLen int, prefix string) *AddressConverterFake
NewAddressConverterFake -
func (*AddressConverterFake) AddressLen ¶
func (acf *AddressConverterFake) AddressLen() int
AddressLen -
func (*AddressConverterFake) ConvertToHex ¶
func (acf *AddressConverterFake) ConvertToHex(addressContainer state.AddressContainer) (string, error)
ConvertToHex -
func (*AddressConverterFake) CreateAddressFromHex ¶
func (acf *AddressConverterFake) CreateAddressFromHex(hexAddress string) (state.AddressContainer, error)
CreateAddressFromHex -
func (*AddressConverterFake) CreateAddressFromPublicKeyBytes ¶
func (acf *AddressConverterFake) CreateAddressFromPublicKeyBytes(pubKey []byte) (state.AddressContainer, error)
CreateAddressFromPublicKeyBytes -
func (*AddressConverterFake) IsInterfaceNil ¶
func (acf *AddressConverterFake) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*AddressConverterFake) PrepareAddressBytes ¶
func (acf *AddressConverterFake) PrepareAddressBytes(addressBytes []byte) ([]byte, error)
PrepareAddressBytes -
type AddressConverterMock ¶
AddressConverterMock -
func (*AddressConverterMock) AddressLen ¶
func (acm *AddressConverterMock) AddressLen() int
AddressLen -
func (*AddressConverterMock) ConvertToHex ¶
func (acm *AddressConverterMock) ConvertToHex(addressContainer state.AddressContainer) (string, error)
ConvertToHex -
func (*AddressConverterMock) CreateAddressFromHex ¶
func (acm *AddressConverterMock) CreateAddressFromHex(_ string) (state.AddressContainer, error)
CreateAddressFromHex -
func (*AddressConverterMock) CreateAddressFromPublicKeyBytes ¶
func (acm *AddressConverterMock) CreateAddressFromPublicKeyBytes(pubKey []byte) (state.AddressContainer, error)
CreateAddressFromPublicKeyBytes -
func (*AddressConverterMock) IsInterfaceNil ¶
func (acm *AddressConverterMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*AddressConverterMock) PrepareAddressBytes ¶
func (acm *AddressConverterMock) PrepareAddressBytes(_ []byte) ([]byte, error)
PrepareAddressBytes -
type AddressConverterStub ¶
type AddressConverterStub struct {
CreateAddressFromPublicKeyBytesCalled func(pubKey []byte) (state.AddressContainer, error)
ConvertToHexCalled func(addressContainer state.AddressContainer) (string, error)
CreateAddressFromHexCalled func(hexAddress string) (state.AddressContainer, error)
PrepareAddressBytesCalled func(addressBytes []byte) ([]byte, error)
AddressLenHandler func() int
}
AddressConverterStub -
func (AddressConverterStub) AddressLen ¶
func (acs AddressConverterStub) AddressLen() int
AddressLen -
func (*AddressConverterStub) ConvertToHex ¶
func (acs *AddressConverterStub) ConvertToHex(addressContainer state.AddressContainer) (string, error)
ConvertToHex -
func (*AddressConverterStub) CreateAddressFromHex ¶
func (acs *AddressConverterStub) CreateAddressFromHex(hexAddress string) (state.AddressContainer, error)
CreateAddressFromHex -
func (*AddressConverterStub) CreateAddressFromPublicKeyBytes ¶
func (acs *AddressConverterStub) CreateAddressFromPublicKeyBytes(pubKey []byte) (state.AddressContainer, error)
CreateAddressFromPublicKeyBytes -
func (*AddressConverterStub) IsInterfaceNil ¶
func (acs *AddressConverterStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*AddressConverterStub) PrepareAddressBytes ¶
func (acs *AddressConverterStub) PrepareAddressBytes(addressBytes []byte) ([]byte, error)
PrepareAddressBytes -
type AddressMock ¶
type AddressMock struct {
// contains filtered or unexported fields
}
AddressMock is the struct holding a mock address
func NewAddressMock ¶
func NewAddressMock(adr []byte) *AddressMock
NewAddressMock creates a new Address with the same byte slice as the parameter received
func (*AddressMock) Bytes ¶
func (adr *AddressMock) Bytes() []byte
Bytes returns the data corresponding to this address
func (*AddressMock) IsInterfaceNil ¶
func (adr *AddressMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type AppStatusHandlerStub ¶
type AppStatusHandlerStub struct {
AddUint64Handler func(key string, value uint64)
IncrementHandler func(key string)
DecrementHandler func(key string)
SetUInt64ValueHandler func(key string, value uint64)
SetInt64ValueHandler func(key string, value int64)
SetStringValueHandler func(key string, value string)
CloseHandler func()
}
AppStatusHandlerStub is a stub implementation of AppStatusHandler
func (*AppStatusHandlerStub) AddUint64 ¶
func (ashs *AppStatusHandlerStub) AddUint64(key string, value uint64)
AddUint64 will call the handler of the stub for incrementing
func (*AppStatusHandlerStub) Close ¶
func (ashs *AppStatusHandlerStub) Close()
Close will call the handler of the stub for closing
func (*AppStatusHandlerStub) Decrement ¶
func (ashs *AppStatusHandlerStub) Decrement(key string)
Decrement will call the handler of the stub for decrementing
func (*AppStatusHandlerStub) Increment ¶
func (ashs *AppStatusHandlerStub) Increment(key string)
Increment will call the handler of the stub for incrementing
func (*AppStatusHandlerStub) IsInterfaceNil ¶
func (ashs *AppStatusHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*AppStatusHandlerStub) SetInt64Value ¶
func (ashs *AppStatusHandlerStub) SetInt64Value(key string, value int64)
SetInt64Value will call the handler of the stub for setting an int64 value
func (*AppStatusHandlerStub) SetStringValue ¶
func (ashs *AppStatusHandlerStub) SetStringValue(key string, value string)
SetStringValue will call the handler of the stub for setting an string value
func (*AppStatusHandlerStub) SetUInt64Value ¶
func (ashs *AppStatusHandlerStub) SetUInt64Value(key string, value uint64)
SetUInt64Value will call the handler of the stub for setting an uint64 value
type ArgumentParserMock ¶
type ArgumentParserMock struct {
ParseDataCalled func(data string) error
GetArgumentsCalled func() ([][]byte, error)
GetCodeCalled func() ([]byte, error)
GetFunctionCalled func() (string, error)
GetSeparatorCalled func() string
CreateDataFromStorageUpdateCalled func(storageUpdates []*vmcommon.StorageUpdate) string
GetStorageUpdatesCalled func(data string) ([]*vmcommon.StorageUpdate, error)
}
ArgumentParserMock -
func (*ArgumentParserMock) CreateDataFromStorageUpdate ¶
func (ap *ArgumentParserMock) CreateDataFromStorageUpdate(storageUpdates []*vmcommon.StorageUpdate) string
CreateDataFromStorageUpdate -
func (*ArgumentParserMock) GetArguments ¶
func (ap *ArgumentParserMock) GetArguments() ([][]byte, error)
GetArguments -
func (*ArgumentParserMock) GetCode ¶
func (ap *ArgumentParserMock) GetCode() ([]byte, error)
GetCode -
func (*ArgumentParserMock) GetFunction ¶
func (ap *ArgumentParserMock) GetFunction() (string, error)
GetFunction -
func (*ArgumentParserMock) GetSeparator ¶
func (ap *ArgumentParserMock) GetSeparator() string
GetSeparator -
func (*ArgumentParserMock) GetStorageUpdates ¶
func (ap *ArgumentParserMock) GetStorageUpdates(data string) ([]*vmcommon.StorageUpdate, error)
GetStorageUpdates -
func (*ArgumentParserMock) IsInterfaceNil ¶
func (ap *ArgumentParserMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ArgumentParserMock) ParseData ¶
func (ap *ArgumentParserMock) ParseData(data string) error
ParseData -
type BelNevMock ¶
type BelNevMock struct {
VerifyMock func(msg []byte, bitmap []byte) error
CommitmentHashMock func(index uint16) ([]byte, error)
CreateCommitmentMock func() ([]byte, []byte)
AggregateCommitmentsMock func(bitmap []byte) error
AggregateSigsMock func(bitmap []byte) ([]byte, error)
StoreCommitmentMock func(index uint16, value []byte) error
StoreCommitmentHashMock func(uint16, []byte) error
CommitmentMock func(uint16) ([]byte, error)
CreateMock func(pubKeys []string, index uint16) (crypto.MultiSigner, error)
// contains filtered or unexported fields
}
BelNevMock is used to mock belare neven multisignature scheme
func (*BelNevMock) AggregateCommitments ¶
func (bnm *BelNevMock) AggregateCommitments(bitmap []byte) error
AggregateCommitments aggregates the list of commitments
func (*BelNevMock) AggregateSigs ¶
func (bnm *BelNevMock) AggregateSigs(bitmap []byte) ([]byte, error)
AggregateSigs aggregates all collected partial signatures
func (*BelNevMock) Commitment ¶
func (bnm *BelNevMock) Commitment(index uint16) ([]byte, error)
Commitment returns the commitment from the list with the specified position
func (*BelNevMock) CommitmentHash ¶
func (bnm *BelNevMock) CommitmentHash(index uint16) ([]byte, error)
CommitmentHash returns the commitment hash from the list on the specified position
func (*BelNevMock) Create ¶
func (bnm *BelNevMock) Create(pubKeys []string, index uint16) (crypto.MultiSigner, error)
Create resets the multiSigner and initializes corresponding fields with the given params
func (*BelNevMock) CreateCommitment ¶
func (bnm *BelNevMock) CreateCommitment() (commSecret []byte, commitment []byte)
CreateCommitment creates a secret commitment and the corresponding public commitment point
func (*BelNevMock) CreateSignatureShare ¶
func (bnm *BelNevMock) CreateSignatureShare(msg []byte, bitmap []byte) ([]byte, error)
CreateSignatureShare creates a partial signature
func (*BelNevMock) IsInterfaceNil ¶
func (bnm *BelNevMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*BelNevMock) Reset ¶
func (bnm *BelNevMock) Reset(pubKeys []string, index uint16) error
Reset -
func (*BelNevMock) SetAggregatedSig ¶
func (bnm *BelNevMock) SetAggregatedSig(aggSig []byte) error
SetAggregatedSig sets the aggregated signature according to the given byte array
func (*BelNevMock) SetMessage ¶
func (bnm *BelNevMock) SetMessage(msg []byte) error
SetMessage sets the message to be signed
func (*BelNevMock) SignatureShare ¶
func (bnm *BelNevMock) SignatureShare(index uint16) ([]byte, error)
SignatureShare -
func (*BelNevMock) StoreCommitment ¶
func (bnm *BelNevMock) StoreCommitment(index uint16, value []byte) error
StoreCommitment adds a commitment to the list on the specified position
func (*BelNevMock) StoreCommitmentHash ¶
func (bnm *BelNevMock) StoreCommitmentHash(index uint16, commHash []byte) error
StoreCommitmentHash adds a commitment hash to the list on the specified position
func (*BelNevMock) StoreSignatureShare ¶
func (bnm *BelNevMock) StoreSignatureShare(index uint16, sig []byte) error
StoreSignatureShare adds the partial signature of the signer with specified position
func (*BelNevMock) Verify ¶
func (bnm *BelNevMock) Verify(msg []byte, bitmap []byte) error
Verify returns nil if the aggregateed signature is verified for the given public keys
func (*BelNevMock) VerifySignatureShare ¶
func (bnm *BelNevMock) VerifySignatureShare(index uint16, sig []byte, msg []byte, bitmap []byte) error
VerifySignatureShare verifies the partial signature of the signer with specified position
type BlackListHandlerStub ¶
type BlackListHandlerStub struct {
AddCalled func(key string) error
HasCalled func(key string) bool
SweepCalled func()
}
BlackListHandlerStub -
func (*BlackListHandlerStub) IsInterfaceNil ¶
func (blhs *BlackListHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
type BlockChainHookHandlerMock ¶
type BlockChainHookHandlerMock struct {
AddTempAccountCalled func(address []byte, balance *big.Int, nonce uint64)
CleanTempAccountsCalled func()
TempAccountCalled func(address []byte) state.AccountHandler
SetCurrentHeaderCalled func(hdr data.HeaderHandler)
}
BlockChainHookHandlerMock -
func (*BlockChainHookHandlerMock) AddTempAccount ¶
func (e *BlockChainHookHandlerMock) AddTempAccount(address []byte, balance *big.Int, nonce uint64)
AddTempAccount -
func (*BlockChainHookHandlerMock) CleanTempAccounts ¶
func (e *BlockChainHookHandlerMock) CleanTempAccounts()
CleanTempAccounts -
func (*BlockChainHookHandlerMock) IsInterfaceNil ¶
func (e *BlockChainHookHandlerMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*BlockChainHookHandlerMock) SetCurrentHeader ¶
func (e *BlockChainHookHandlerMock) SetCurrentHeader(hdr data.HeaderHandler)
SetCurrentHeader -
func (*BlockChainHookHandlerMock) TempAccount ¶
func (e *BlockChainHookHandlerMock) TempAccount(address []byte) state.AccountHandler
TempAccount -
type BlockChainMock ¶
type BlockChainMock struct {
GetGenesisHeaderCalled func() data.HeaderHandler
SetGenesisHeaderCalled func(handler data.HeaderHandler) error
GetGenesisHeaderHashCalled func() []byte
SetGenesisHeaderHashCalled func([]byte)
GetCurrentBlockHeaderCalled func() data.HeaderHandler
SetCurrentBlockHeaderCalled func(data.HeaderHandler) error
GetCurrentBlockHeaderHashCalled func() []byte
SetCurrentBlockHeaderHashCalled func([]byte)
GetCurrentBlockBodyCalled func() data.BodyHandler
SetCurrentBlockBodyCalled func(data.BodyHandler) error
GetLocalHeightCalled func() int64
SetLocalHeightCalled func(int64)
GetNetworkHeightCalled func() int64
SetNetworkHeightCalled func(int64)
HasBadBlockCalled func([]byte) bool
PutBadBlockCalled func([]byte)
CreateNewHeaderCalled func() data.HeaderHandler
}
BlockChainMock is a mock implementation of the blockchain interface
func (*BlockChainMock) CreateNewHeader ¶
func (bc *BlockChainMock) CreateNewHeader() data.HeaderHandler
CreateNewHeader -
func (*BlockChainMock) GetCurrentBlockBody ¶
func (bc *BlockChainMock) GetCurrentBlockBody() data.BodyHandler
GetCurrentBlockBody returns the tx block body pointer
func (*BlockChainMock) GetCurrentBlockHeader ¶
func (bc *BlockChainMock) GetCurrentBlockHeader() data.HeaderHandler
GetCurrentBlockHeader returns current block header pointer
func (*BlockChainMock) GetCurrentBlockHeaderHash ¶
func (bc *BlockChainMock) GetCurrentBlockHeaderHash() []byte
GetCurrentBlockHeaderHash returns the current block header hash
func (*BlockChainMock) GetGenesisHeader ¶
func (bc *BlockChainMock) GetGenesisHeader() data.HeaderHandler
GetGenesisHeader returns the genesis block header pointer
func (*BlockChainMock) GetGenesisHeaderHash ¶
func (bc *BlockChainMock) GetGenesisHeaderHash() []byte
GetGenesisHeaderHash returns the genesis block header hash
func (*BlockChainMock) GetLocalHeight ¶ added in v1.0.3
func (bc *BlockChainMock) GetLocalHeight() int64
GetLocalHeight returns the height of the local chain
func (*BlockChainMock) GetNetworkHeight ¶ added in v1.0.3
func (bc *BlockChainMock) GetNetworkHeight() int64
GetNetworkHeight sets the perceived height of the network chain
func (*BlockChainMock) HasBadBlock ¶ added in v1.0.3
func (bc *BlockChainMock) HasBadBlock(blockHash []byte) bool
HasBadBlock returns true if the provided hash is blacklisted as a bad block, or false otherwise
func (*BlockChainMock) IsInterfaceNil ¶
func (bc *BlockChainMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*BlockChainMock) PutBadBlock ¶ added in v1.0.3
func (bc *BlockChainMock) PutBadBlock(blockHash []byte)
PutBadBlock adds the given serialized block to the bad block cache, blacklisting it
func (*BlockChainMock) SetCurrentBlockBody ¶
func (bc *BlockChainMock) SetCurrentBlockBody(body data.BodyHandler) error
SetCurrentBlockBody sets the tx block body pointer
func (*BlockChainMock) SetCurrentBlockHeader ¶
func (bc *BlockChainMock) SetCurrentBlockHeader(header data.HeaderHandler) error
SetCurrentBlockHeader sets current block header pointer
func (*BlockChainMock) SetCurrentBlockHeaderHash ¶
func (bc *BlockChainMock) SetCurrentBlockHeaderHash(hash []byte)
SetCurrentBlockHeaderHash returns the current block header hash
func (*BlockChainMock) SetGenesisHeader ¶
func (bc *BlockChainMock) SetGenesisHeader(genesisBlock data.HeaderHandler) error
SetGenesisHeader sets the genesis block header pointer
func (*BlockChainMock) SetGenesisHeaderHash ¶
func (bc *BlockChainMock) SetGenesisHeaderHash(hash []byte)
SetGenesisHeaderHash sets the genesis block header hash
func (*BlockChainMock) SetLocalHeight ¶ added in v1.0.3
func (bc *BlockChainMock) SetLocalHeight(height int64)
SetLocalHeight sets the height of the local chain
func (*BlockChainMock) SetNetworkHeight ¶ added in v1.0.3
func (bc *BlockChainMock) SetNetworkHeight(height int64)
SetNetworkHeight sets the perceived height of the network chain
type BlockNotarizerHandlerMock ¶
type BlockNotarizerHandlerMock struct {
AddNotarizedHeaderCalled func(shardID uint32, notarizedHeader data.HeaderHandler, notarizedHeaderHash []byte)
CleanupNotarizedHeadersBehindNonceCalled func(shardID uint32, nonce uint64)
DisplayNotarizedHeadersCalled func(shardID uint32, message string)
GetFirstNotarizedHeaderCalled func(shardID uint32) (data.HeaderHandler, []byte, error)
GetLastNotarizedHeaderCalled func(shardID uint32) (data.HeaderHandler, []byte, error)
GetLastNotarizedHeaderNonceCalled func(shardID uint32) uint64
GetNotarizedHeaderCalled func(shardID uint32, offset uint64) (data.HeaderHandler, []byte, error)
InitNotarizedHeadersCalled func(startHeaders map[uint32]data.HeaderHandler) error
RemoveLastNotarizedHeaderCalled func()
RestoreNotarizedHeadersToGenesisCalled func()
}
BlockNotarizerHandlerMock -
func (*BlockNotarizerHandlerMock) AddNotarizedHeader ¶
func (bngm *BlockNotarizerHandlerMock) AddNotarizedHeader(shardID uint32, notarizedHeader data.HeaderHandler, notarizedHeaderHash []byte)
AddNotarizedHeader -
func (*BlockNotarizerHandlerMock) CleanupNotarizedHeadersBehindNonce ¶
func (bngm *BlockNotarizerHandlerMock) CleanupNotarizedHeadersBehindNonce(shardID uint32, nonce uint64)
CleanupNotarizedHeadersBehindNonce -
func (*BlockNotarizerHandlerMock) DisplayNotarizedHeaders ¶
func (bngm *BlockNotarizerHandlerMock) DisplayNotarizedHeaders(shardID uint32, message string)
DisplayNotarizedHeaders -
func (*BlockNotarizerHandlerMock) GetFirstNotarizedHeader ¶
func (bngm *BlockNotarizerHandlerMock) GetFirstNotarizedHeader(shardID uint32) (data.HeaderHandler, []byte, error)
GetFirstNotarizedHeader -
func (*BlockNotarizerHandlerMock) GetLastNotarizedHeader ¶
func (bngm *BlockNotarizerHandlerMock) GetLastNotarizedHeader(shardID uint32) (data.HeaderHandler, []byte, error)
GetLastNotarizedHeader -
func (*BlockNotarizerHandlerMock) GetLastNotarizedHeaderNonce ¶
func (bngm *BlockNotarizerHandlerMock) GetLastNotarizedHeaderNonce(shardID uint32) uint64
GetLastNotarizedHeaderNonce -
func (*BlockNotarizerHandlerMock) GetNotarizedHeader ¶
func (bngm *BlockNotarizerHandlerMock) GetNotarizedHeader(shardID uint32, offset uint64) (data.HeaderHandler, []byte, error)
GetNotarizedHeader -
func (*BlockNotarizerHandlerMock) InitNotarizedHeaders ¶
func (bngm *BlockNotarizerHandlerMock) InitNotarizedHeaders(startHeaders map[uint32]data.HeaderHandler) error
InitNotarizedHeaders -
func (*BlockNotarizerHandlerMock) IsInterfaceNil ¶
func (bngm *BlockNotarizerHandlerMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*BlockNotarizerHandlerMock) RemoveLastNotarizedHeader ¶
func (bngm *BlockNotarizerHandlerMock) RemoveLastNotarizedHeader()
RemoveLastNotarizedHeader -
func (*BlockNotarizerHandlerMock) RestoreNotarizedHeadersToGenesis ¶
func (bngm *BlockNotarizerHandlerMock) RestoreNotarizedHeadersToGenesis()
RestoreNotarizedHeadersToGenesis -
type BlockNotifierHandlerMock ¶
type BlockNotifierHandlerMock struct {
CallHandlersCalled func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte)
RegisterHandlerCalled func(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte))
}
BlockNotifierHandlerMock -
func (*BlockNotifierHandlerMock) CallHandlers ¶
func (bnhm *BlockNotifierHandlerMock) CallHandlers(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte)
CallHandlers -
func (*BlockNotifierHandlerMock) IsInterfaceNil ¶
func (bnhm *BlockNotifierHandlerMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*BlockNotifierHandlerMock) RegisterHandler ¶
func (bnhm *BlockNotifierHandlerMock) RegisterHandler(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte))
RegisterHandler -
type BlockProcessorMock ¶
type BlockProcessorMock struct {
ProcessBlockCalled func(header data.HeaderHandler, body data.BodyHandler, haveTime func() time.Duration) error
CommitBlockCalled func(header data.HeaderHandler, body data.BodyHandler) error
RevertAccountStateCalled func(header data.HeaderHandler)
CreateGenesisBlockCalled func(balances map[string]*big.Int) (data.HeaderHandler, error)
CreateBlockCalled func(initialHdrData data.HeaderHandler, haveTime func() bool) (data.HeaderHandler, data.BodyHandler, error)
RestoreBlockIntoPoolsCalled func(header data.HeaderHandler, body data.BodyHandler) error
SetOnRequestTransactionCalled func(f func(destShardID uint32, txHash []byte))
MarshalizedDataToBroadcastCalled func(header data.HeaderHandler, body data.BodyHandler) (map[uint32][]byte, map[string][][]byte, error)
DecodeBlockBodyCalled func(dta []byte) data.BodyHandler
DecodeBlockHeaderCalled func(dta []byte) data.HeaderHandler
AddLastNotarizedHdrCalled func(shardId uint32, processedHdr data.HeaderHandler)
CreateNewHeaderCalled func(round uint64) data.HeaderHandler
PruneStateOnRollbackCalled func(currHeader data.HeaderHandler, prevHeader data.HeaderHandler)
RevertStateToBlockCalled func(header data.HeaderHandler) error
}
BlockProcessorMock -
func (*BlockProcessorMock) AddLastNotarizedHdr ¶
func (bpm *BlockProcessorMock) AddLastNotarizedHdr(shardId uint32, processedHdr data.HeaderHandler)
AddLastNotarizedHdr -
func (*BlockProcessorMock) ApplyProcessedMiniBlocks ¶
func (bpm *BlockProcessorMock) ApplyProcessedMiniBlocks(*processedMb.ProcessedMiniBlockTracker)
ApplyProcessedMiniBlocks -
func (*BlockProcessorMock) CommitBlock ¶
func (bpm *BlockProcessorMock) CommitBlock(header data.HeaderHandler, body data.BodyHandler) error
CommitBlock -
func (*BlockProcessorMock) CreateBlock ¶
func (bpm *BlockProcessorMock) CreateBlock(initialHdrData data.HeaderHandler, haveTime func() bool) (data.HeaderHandler, data.BodyHandler, error)
CreateBlock -
func (*BlockProcessorMock) CreateGenesisBlock ¶
func (bpm *BlockProcessorMock) CreateGenesisBlock(balances map[string]*big.Int) (data.HeaderHandler, error)
CreateGenesisBlock -
func (*BlockProcessorMock) CreateNewHeader ¶
func (bpm *BlockProcessorMock) CreateNewHeader(round uint64) data.HeaderHandler
CreateNewHeader -
func (*BlockProcessorMock) DecodeBlockBody ¶
func (bpm *BlockProcessorMock) DecodeBlockBody(dta []byte) data.BodyHandler
DecodeBlockBody -
func (*BlockProcessorMock) DecodeBlockHeader ¶
func (bpm *BlockProcessorMock) DecodeBlockHeader(dta []byte) data.HeaderHandler
DecodeBlockHeader -
func (*BlockProcessorMock) IsInterfaceNil ¶
func (bpm *BlockProcessorMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*BlockProcessorMock) MarshalizedDataToBroadcast ¶
func (bpm *BlockProcessorMock) MarshalizedDataToBroadcast(header data.HeaderHandler, body data.BodyHandler) (map[uint32][]byte, map[string][][]byte, error)
MarshalizedDataToBroadcast -
func (*BlockProcessorMock) ProcessBlock ¶
func (bpm *BlockProcessorMock) ProcessBlock(header data.HeaderHandler, body data.BodyHandler, haveTime func() time.Duration) error
ProcessBlock -
func (*BlockProcessorMock) PruneStateOnRollback ¶
func (bpm *BlockProcessorMock) PruneStateOnRollback(currHeader data.HeaderHandler, prevHeader data.HeaderHandler)
PruneStateOnRollback recreates thee state tries to the root hashes indicated by the provided header
func (*BlockProcessorMock) RestoreBlockIntoPools ¶
func (bpm *BlockProcessorMock) RestoreBlockIntoPools(header data.HeaderHandler, body data.BodyHandler) error
RestoreBlockIntoPools -
func (*BlockProcessorMock) RestoreLastNotarizedHrdsToGenesis ¶
func (bpm *BlockProcessorMock) RestoreLastNotarizedHrdsToGenesis()
RestoreLastNotarizedHrdsToGenesis -
func (*BlockProcessorMock) RevertAccountState ¶
func (bpm *BlockProcessorMock) RevertAccountState(header data.HeaderHandler)
RevertAccountState -
func (*BlockProcessorMock) RevertStateToBlock ¶
func (bpm *BlockProcessorMock) RevertStateToBlock(header data.HeaderHandler) error
RevertStateToBlock recreates thee state tries to the root hashes indicated by the provided header
func (*BlockProcessorMock) SetNumProcessedObj ¶
func (bpm *BlockProcessorMock) SetNumProcessedObj(_ uint64)
SetNumProcessedObj -
type BlockSizeComputationStub ¶
type BlockSizeComputationStub struct {
InitCalled func()
AddNumMiniBlocksCalled func(int)
AddNumTxsCalled func(int)
IsMaxBlockSizeReachedCalled func(int, int) bool
}
BlockSizeComputationStub -
func (*BlockSizeComputationStub) AddNumMiniBlocks ¶
func (bscs *BlockSizeComputationStub) AddNumMiniBlocks(numMiniBlocks int)
AddNumMiniBlocks -
func (*BlockSizeComputationStub) AddNumTxs ¶
func (bscs *BlockSizeComputationStub) AddNumTxs(numTxs int)
AddNumTxs -
func (*BlockSizeComputationStub) IsInterfaceNil ¶
func (bscs *BlockSizeComputationStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*BlockSizeComputationStub) IsMaxBlockSizeReached ¶
func (bscs *BlockSizeComputationStub) IsMaxBlockSizeReached(numNewMiniBlocks int, numNewTxs int) bool
IsMaxBlockSizeReached -
type BlockSizeThrottlerStub ¶
type BlockSizeThrottlerStub struct {
GetCurrentMaxSizeCalled func() uint32
AddCalled func(round uint64, size uint32)
SucceedCalled func(round uint64)
ComputeCurrentMaxSizeCalled func()
}
BlockSizeThrottlerStub -
func (*BlockSizeThrottlerStub) Add ¶
func (bsts *BlockSizeThrottlerStub) Add(round uint64, size uint32)
Add -
func (*BlockSizeThrottlerStub) ComputeCurrentMaxSize ¶
func (bsts *BlockSizeThrottlerStub) ComputeCurrentMaxSize()
ComputeCurrentMaxSize -
func (*BlockSizeThrottlerStub) GetCurrentMaxSize ¶
func (bsts *BlockSizeThrottlerStub) GetCurrentMaxSize() uint32
GetCurrentMaxSize -
func (*BlockSizeThrottlerStub) IsInterfaceNil ¶
func (bsts *BlockSizeThrottlerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*BlockSizeThrottlerStub) Succeed ¶
func (bsts *BlockSizeThrottlerStub) Succeed(round uint64)
Succeed -
type BlockTrackerHandlerMock ¶
type BlockTrackerHandlerMock struct {
GetSelfHeadersCalled func(headerHandler data.HeaderHandler) []*track.HeaderInfo
ComputeNumPendingMiniBlocksCalled func(headers []data.HeaderHandler)
ComputeLongestSelfChainCalled func() (data.HeaderHandler, []byte, []data.HeaderHandler, [][]byte)
SortHeadersFromNonceCalled func(shardID uint32, nonce uint64) ([]data.HeaderHandler, [][]byte)
}
BlockTrackerHandlerMock -
func (*BlockTrackerHandlerMock) ComputeLongestSelfChain ¶
func (bthm *BlockTrackerHandlerMock) ComputeLongestSelfChain() (data.HeaderHandler, []byte, []data.HeaderHandler, [][]byte)
ComputeLongestSelfChain -
func (*BlockTrackerHandlerMock) ComputeNumPendingMiniBlocks ¶
func (bthm *BlockTrackerHandlerMock) ComputeNumPendingMiniBlocks(headers []data.HeaderHandler)
ComputeNumPendingMiniBlocks -
func (*BlockTrackerHandlerMock) GetSelfHeaders ¶
func (bthm *BlockTrackerHandlerMock) GetSelfHeaders(headerHandler data.HeaderHandler) []*track.HeaderInfo
GetSelfHeaders -
func (*BlockTrackerHandlerMock) IsInterfaceNil ¶
func (bthm *BlockTrackerHandlerMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*BlockTrackerHandlerMock) SortHeadersFromNonce ¶
func (bthm *BlockTrackerHandlerMock) SortHeadersFromNonce(shardID uint32, nonce uint64) ([]data.HeaderHandler, [][]byte)
SortHeadersFromNonce -
type BlockTrackerMock ¶
type BlockTrackerMock struct {
AddTrackedHeaderCalled func(header data.HeaderHandler, hash []byte)
AddCrossNotarizedHeaderCalled func(shardID uint32, crossNotarizedHeader data.HeaderHandler, crossNotarizedHeaderHash []byte)
AddSelfNotarizedHeaderCalled func(shardID uint32, selfNotarizedHeader data.HeaderHandler, selfNotarizedHeaderHash []byte)
CheckBlockAgainstFinalCalled func(headerHandler data.HeaderHandler) error
CheckBlockAgainstRounderCalled func(headerHandler data.HeaderHandler) error
CleanupHeadersBehindNonceCalled func(shardID uint32, selfNotarizedNonce uint64, crossNotarizedNonce uint64)
ComputeLongestChainCalled func(shardID uint32, header data.HeaderHandler) ([]data.HeaderHandler, [][]byte)
ComputeLongestMetaChainFromLastNotarizedCalled func() ([]data.HeaderHandler, [][]byte, error)
ComputeLongestShardsChainsFromLastNotarizedCalled func() ([]data.HeaderHandler, [][]byte, map[uint32][]data.HeaderHandler, error)
DisplayTrackedHeadersCalled func()
GetCrossNotarizedHeaderCalled func(shardID uint32, offset uint64) (data.HeaderHandler, []byte, error)
GetFinalHeaderCalled func(shardID uint32) (data.HeaderHandler, []byte, error)
GetLastCrossNotarizedHeaderCalled func(shardID uint32) (data.HeaderHandler, []byte, error)
GetLastCrossNotarizedHeadersForAllShardsCalled func() (map[uint32]data.HeaderHandler, error)
GetLastSelfNotarizedHeaderCalled func(shardID uint32) (data.HeaderHandler, []byte, error)
GetTrackedHeadersCalled func(shardID uint32) ([]data.HeaderHandler, [][]byte)
GetTrackedHeadersForAllShardsCalled func() map[uint32][]data.HeaderHandler
GetTrackedHeadersWithNonceCalled func(shardID uint32, nonce uint64) ([]data.HeaderHandler, [][]byte)
IsShardStuckCalled func(shardId uint32) bool
RegisterCrossNotarizedHeadersHandlerCalled func(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte))
RegisterSelfNotarizedHeadersHandlerCalled func(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte))
RemoveLastNotarizedHeadersCalled func()
RestoreToGenesisCalled func()
ShouldAddHeaderCalled func(headerHandler data.HeaderHandler) bool
// contains filtered or unexported fields
}
BlockTrackerMock -
func NewBlockTrackerMock ¶
func NewBlockTrackerMock(shardCoordinator sharding.Coordinator, startHeaders map[uint32]data.HeaderHandler) *BlockTrackerMock
NewBlockTrackerMock -
func (*BlockTrackerMock) AddCrossNotarizedHeader ¶
func (btm *BlockTrackerMock) AddCrossNotarizedHeader(shardID uint32, crossNotarizedHeader data.HeaderHandler, crossNotarizedHeaderHash []byte)
AddCrossNotarizedHeader -
func (*BlockTrackerMock) AddSelfNotarizedHeader ¶
func (btm *BlockTrackerMock) AddSelfNotarizedHeader(shardID uint32, selfNotarizedHeader data.HeaderHandler, selfNotarizedHeaderHash []byte)
AddSelfNotarizedHeader -
func (*BlockTrackerMock) AddTrackedHeader ¶
func (btm *BlockTrackerMock) AddTrackedHeader(header data.HeaderHandler, hash []byte)
AddTrackedHeader -
func (*BlockTrackerMock) CheckBlockAgainstFinal ¶
func (btm *BlockTrackerMock) CheckBlockAgainstFinal(headerHandler data.HeaderHandler) error
CheckBlockAgainstFinal -
func (*BlockTrackerMock) CheckBlockAgainstRounder ¶
func (btm *BlockTrackerMock) CheckBlockAgainstRounder(headerHandler data.HeaderHandler) error
CheckBlockAgainstRounder -
func (*BlockTrackerMock) CleanupHeadersBehindNonce ¶
func (btm *BlockTrackerMock) CleanupHeadersBehindNonce(shardID uint32, selfNotarizedNonce uint64, crossNotarizedNonce uint64)
CleanupHeadersBehindNonce -
func (*BlockTrackerMock) CleanupInvalidCrossHeaders ¶
func (btm *BlockTrackerMock) CleanupInvalidCrossHeaders(_ uint32, _ uint64)
CleanupInvalidCrossHeaders -
func (*BlockTrackerMock) ComputeLongestChain ¶
func (btm *BlockTrackerMock) ComputeLongestChain(shardID uint32, header data.HeaderHandler) ([]data.HeaderHandler, [][]byte)
ComputeLongestChain -
func (*BlockTrackerMock) ComputeLongestMetaChainFromLastNotarized ¶
func (btm *BlockTrackerMock) ComputeLongestMetaChainFromLastNotarized() ([]data.HeaderHandler, [][]byte, error)
ComputeLongestMetaChainFromLastNotarized -
func (*BlockTrackerMock) ComputeLongestShardsChainsFromLastNotarized ¶
func (btm *BlockTrackerMock) ComputeLongestShardsChainsFromLastNotarized() ([]data.HeaderHandler, [][]byte, map[uint32][]data.HeaderHandler, error)
ComputeLongestShardsChainsFromLastNotarized -
func (*BlockTrackerMock) DisplayTrackedHeaders ¶
func (btm *BlockTrackerMock) DisplayTrackedHeaders()
DisplayTrackedHeaders -
func (*BlockTrackerMock) GetCrossNotarizedHeader ¶
func (btm *BlockTrackerMock) GetCrossNotarizedHeader(shardID uint32, offset uint64) (data.HeaderHandler, []byte, error)
GetCrossNotarizedHeader -
func (*BlockTrackerMock) GetFinalHeader ¶
func (btm *BlockTrackerMock) GetFinalHeader(shardID uint32) (data.HeaderHandler, []byte, error)
GetFinalHeader -
func (*BlockTrackerMock) GetLastCrossNotarizedHeader ¶
func (btm *BlockTrackerMock) GetLastCrossNotarizedHeader(shardID uint32) (data.HeaderHandler, []byte, error)
GetLastCrossNotarizedHeader -
func (*BlockTrackerMock) GetLastCrossNotarizedHeadersForAllShards ¶
func (btm *BlockTrackerMock) GetLastCrossNotarizedHeadersForAllShards() (map[uint32]data.HeaderHandler, error)
GetLastCrossNotarizedHeadersForAllShards -
func (*BlockTrackerMock) GetLastSelfNotarizedHeader ¶
func (btm *BlockTrackerMock) GetLastSelfNotarizedHeader(shardID uint32) (data.HeaderHandler, []byte, error)
GetLastSelfNotarizedHeader -
func (*BlockTrackerMock) GetTrackedHeaders ¶
func (btm *BlockTrackerMock) GetTrackedHeaders(shardID uint32) ([]data.HeaderHandler, [][]byte)
GetTrackedHeaders -
func (*BlockTrackerMock) GetTrackedHeadersForAllShards ¶
func (btm *BlockTrackerMock) GetTrackedHeadersForAllShards() map[uint32][]data.HeaderHandler
GetTrackedHeadersForAllShards -
func (*BlockTrackerMock) GetTrackedHeadersWithNonce ¶
func (btm *BlockTrackerMock) GetTrackedHeadersWithNonce(shardID uint32, nonce uint64) ([]data.HeaderHandler, [][]byte)
GetTrackedHeadersWithNonce -
func (*BlockTrackerMock) InitNotarizedHeaders ¶
func (btm *BlockTrackerMock) InitNotarizedHeaders(startHeaders map[uint32]data.HeaderHandler) error
InitNotarizedHeaders -
func (*BlockTrackerMock) IsInterfaceNil ¶
func (btm *BlockTrackerMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*BlockTrackerMock) IsShardStuck ¶
func (btm *BlockTrackerMock) IsShardStuck(shardId uint32) bool
IsShardStuck -
func (*BlockTrackerMock) RegisterCrossNotarizedHeadersHandler ¶
func (btm *BlockTrackerMock) RegisterCrossNotarizedHeadersHandler(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte))
RegisterCrossNotarizedHeadersHandler -
func (*BlockTrackerMock) RegisterSelfNotarizedHeadersHandler ¶
func (btm *BlockTrackerMock) RegisterSelfNotarizedHeadersHandler(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte))
RegisterSelfNotarizedHeadersHandler -
func (*BlockTrackerMock) RemoveLastNotarizedHeaders ¶
func (btm *BlockTrackerMock) RemoveLastNotarizedHeaders()
RemoveLastNotarizedHeaders -
func (*BlockTrackerMock) RestoreToGenesis ¶
func (btm *BlockTrackerMock) RestoreToGenesis()
RestoreToGenesis -
func (*BlockTrackerMock) ShouldAddHeader ¶
func (btm *BlockTrackerMock) ShouldAddHeader(headerHandler data.HeaderHandler) bool
ShouldAddHeader -
type BoostrapStorerMock ¶
type BoostrapStorerMock struct {
PutCalled func(round int64, bootData bootstrapStorage.BootstrapData) error
GetCalled func(round int64) (bootstrapStorage.BootstrapData, error)
GetHighestRoundCalled func() int64
}
BoostrapStorerMock -
func (*BoostrapStorerMock) Get ¶
func (bsm *BoostrapStorerMock) Get(round int64) (bootstrapStorage.BootstrapData, error)
Get -
func (*BoostrapStorerMock) GetHighestRound ¶
func (bsm *BoostrapStorerMock) GetHighestRound() int64
GetHighestRound -
func (*BoostrapStorerMock) IsInterfaceNil ¶
func (bsm *BoostrapStorerMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*BoostrapStorerMock) Put ¶
func (bsm *BoostrapStorerMock) Put(round int64, bootData bootstrapStorage.BootstrapData) error
Put -
func (*BoostrapStorerMock) SaveLastRound ¶
func (bsm *BoostrapStorerMock) SaveLastRound(_ int64) error
SaveLastRound -
type CacherMock ¶
type CacherMock struct {
// contains filtered or unexported fields
}
CacherMock -
func (*CacherMock) HasOrAdd ¶
func (cm *CacherMock) HasOrAdd(key []byte, value interface{}) (bool, bool)
HasOrAdd -
func (*CacherMock) IsInterfaceNil ¶
func (cm *CacherMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*CacherMock) Peek ¶
func (cm *CacherMock) Peek(key []byte) (value interface{}, ok bool)
Peek -
func (*CacherMock) Put ¶
func (cm *CacherMock) Put(key []byte, value interface{}) (evicted bool)
Put -
func (*CacherMock) RegisterHandler ¶
func (cm *CacherMock) RegisterHandler(func(key []byte))
RegisterHandler -
type CacherStub ¶
type CacherStub struct {
ClearCalled func()
PutCalled func(key []byte, value interface{}) (evicted bool)
GetCalled func(key []byte) (value interface{}, ok bool)
HasCalled func(key []byte) bool
PeekCalled func(key []byte) (value interface{}, ok bool)
HasOrAddCalled func(key []byte, value interface{}) (ok, evicted bool)
RemoveCalled func(key []byte)
RemoveOldestCalled func()
KeysCalled func() [][]byte
LenCalled func() int
MaxSizeCalled func() int
RegisterHandlerCalled func(func(key []byte))
}
CacherStub -
func (*CacherStub) HasOrAdd ¶
func (cs *CacherStub) HasOrAdd(key []byte, value interface{}) (ok, evicted bool)
HasOrAdd -
func (*CacherStub) IsInterfaceNil ¶
func (cs *CacherStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*CacherStub) Peek ¶
func (cs *CacherStub) Peek(key []byte) (value interface{}, ok bool)
Peek -
func (*CacherStub) Put ¶
func (cs *CacherStub) Put(key []byte, value interface{}) (evicted bool)
Put -
func (*CacherStub) RegisterHandler ¶
func (cs *CacherStub) RegisterHandler(handler func(key []byte))
RegisterHandler -
type ChainStorerMock ¶
type ChainStorerMock struct {
AddStorerCalled func(key dataRetriever.UnitType, s storage.Storer)
GetStorerCalled func(unitType dataRetriever.UnitType) storage.Storer
HasCalled func(unitType dataRetriever.UnitType, key []byte) error
GetCalled func(unitType dataRetriever.UnitType, key []byte) ([]byte, error)
PutCalled func(unitType dataRetriever.UnitType, key []byte, value []byte) error
GetAllCalled func(unitType dataRetriever.UnitType, keys [][]byte) (map[string][]byte, error)
DestroyCalled func() error
CloseAllCalled func() error
}
ChainStorerMock is a mock implementation of the ChianStorer interface
func (*ChainStorerMock) AddStorer ¶
func (csm *ChainStorerMock) AddStorer(key dataRetriever.UnitType, s storage.Storer)
AddStorer will add a new storer to the chain map
func (*ChainStorerMock) Destroy ¶
func (csm *ChainStorerMock) Destroy() error
Destroy removes the underlying files/resources used by the storage service
func (*ChainStorerMock) Get ¶
func (csm *ChainStorerMock) Get(unitType dataRetriever.UnitType, key []byte) ([]byte, error)
Get returns the value for the given key if found in the selected storage unit, nil otherwise. It can return an error if the provided unit type is not supported or if the storage unit underlying implementation reports an error
func (*ChainStorerMock) GetAll ¶
func (csm *ChainStorerMock) GetAll(unitType dataRetriever.UnitType, keys [][]byte) (map[string][]byte, error)
GetAll gets all the elements with keys in the keys array, from the selected storage unit It can report an error if the provided unit type is not supported, if there is a missing key in the unit, or if the underlying implementation of the storage unit reports an error.
func (*ChainStorerMock) GetStorer ¶
func (csm *ChainStorerMock) GetStorer(unitType dataRetriever.UnitType) storage.Storer
GetStorer returns the storer from the chain map or nil if the storer was not found
func (*ChainStorerMock) Has ¶
func (csm *ChainStorerMock) Has(unitType dataRetriever.UnitType, key []byte) error
Has returns true if the key is found in the selected Unit or false otherwise It can return an error if the provided unit type is not supported or if the underlying implementation of the storage unit reports an error.
func (*ChainStorerMock) IsInterfaceNil ¶
func (csm *ChainStorerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ChainStorerMock) Put ¶
func (csm *ChainStorerMock) Put(unitType dataRetriever.UnitType, key []byte, value []byte) error
Put stores the key, value pair in the selected storage unit It can return an error if the provided unit type is not supported or if the storage unit underlying implementation reports an error
type CoordinatorStub ¶
type CoordinatorStub struct {
NumberOfShardsCalled func() uint32
ComputeIdCalled func(address state.AddressContainer) uint32
SelfIdCalled func() uint32
SameShardCalled func(firstAddress, secondAddress state.AddressContainer) bool
CommunicationIdentifierCalled func(destShardID uint32) string
}
CoordinatorStub -
func (*CoordinatorStub) CommunicationIdentifier ¶
func (coordinator *CoordinatorStub) CommunicationIdentifier(destShardID uint32) string
CommunicationIdentifier -
func (*CoordinatorStub) ComputeId ¶
func (coordinator *CoordinatorStub) ComputeId(address state.AddressContainer) uint32
ComputeId -
func (*CoordinatorStub) IsInterfaceNil ¶
func (coordinator *CoordinatorStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*CoordinatorStub) NumberOfShards ¶
func (coordinator *CoordinatorStub) NumberOfShards() uint32
NumberOfShards -
func (*CoordinatorStub) SameShard ¶
func (coordinator *CoordinatorStub) SameShard(firstAddress, secondAddress state.AddressContainer) bool
SameShard -
type DataTrieTrackerStub ¶
type DataTrieTrackerStub struct {
ClearDataCachesCalled func()
DirtyDataCalled func() map[string][]byte
OriginalValueCalled func(key []byte) []byte
RetrieveValueCalled func(key []byte) ([]byte, error)
SaveKeyValueCalled func(key []byte, value []byte)
SetDataTrieCalled func(tr data.Trie)
DataTrieCalled func() data.Trie
}
DataTrieTrackerStub -
func (*DataTrieTrackerStub) ClearDataCaches ¶
func (dtts *DataTrieTrackerStub) ClearDataCaches()
ClearDataCaches -
func (*DataTrieTrackerStub) DataTrie ¶
func (dtts *DataTrieTrackerStub) DataTrie() data.Trie
DataTrie -
func (*DataTrieTrackerStub) DirtyData ¶
func (dtts *DataTrieTrackerStub) DirtyData() map[string][]byte
DirtyData -
func (*DataTrieTrackerStub) IsInterfaceNil ¶
func (dtts *DataTrieTrackerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*DataTrieTrackerStub) OriginalValue ¶
func (dtts *DataTrieTrackerStub) OriginalValue(key []byte) []byte
OriginalValue -
func (*DataTrieTrackerStub) RetrieveValue ¶
func (dtts *DataTrieTrackerStub) RetrieveValue(key []byte) ([]byte, error)
RetrieveValue -
func (*DataTrieTrackerStub) SaveKeyValue ¶
func (dtts *DataTrieTrackerStub) SaveKeyValue(key []byte, value []byte)
SaveKeyValue -
func (*DataTrieTrackerStub) SetDataTrie ¶
func (dtts *DataTrieTrackerStub) SetDataTrie(tr data.Trie)
SetDataTrie -
type EpochEconomicsStub ¶
type EpochEconomicsStub struct {
ComputeEndOfEpochEconomicsCalled func(metaBlock *block.MetaBlock) (*block.Economics, error)
VerifyRewardsPerBlockCalled func(metaBlock *block.MetaBlock) error
}
EpochEconomicsStub -
func (*EpochEconomicsStub) ComputeEndOfEpochEconomics ¶
func (e *EpochEconomicsStub) ComputeEndOfEpochEconomics(metaBlock *block.MetaBlock) (*block.Economics, error)
ComputeEndOfEpochEconomics -
func (*EpochEconomicsStub) IsInterfaceNil ¶
func (e *EpochEconomicsStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*EpochEconomicsStub) VerifyRewardsPerBlock ¶
func (e *EpochEconomicsStub) VerifyRewardsPerBlock(metaBlock *block.MetaBlock) error
VerifyRewardsPerBlock -
type EpochRewardsCreatorStub ¶
type EpochRewardsCreatorStub struct {
CreateRewardsMiniBlocksCalled func(metaBlock *block.MetaBlock, validatorInfos map[uint32][]*state.ValidatorInfo) (block.MiniBlockSlice, error)
VerifyRewardsMiniBlocksCalled func(metaBlock *block.MetaBlock, validatorInfos map[uint32][]*state.ValidatorInfo) error
CreateMarshalizedDataCalled func(body *block.Body) map[string][][]byte
SaveTxBlockToStorageCalled func(metaBlock *block.MetaBlock, body *block.Body)
DeleteTxsFromStorageCalled func(metaBlock *block.MetaBlock, body *block.Body)
}
EpochRewardsCreatorStub -
func (*EpochRewardsCreatorStub) CreateMarshalizedData ¶
func (e *EpochRewardsCreatorStub) CreateMarshalizedData(body *block.Body) map[string][][]byte
CreateMarshalizedData -
func (*EpochRewardsCreatorStub) CreateRewardsMiniBlocks ¶
func (e *EpochRewardsCreatorStub) CreateRewardsMiniBlocks(metaBlock *block.MetaBlock, validatorInfos map[uint32][]*state.ValidatorInfo) (block.MiniBlockSlice, error)
CreateRewardsMiniBlocks -
func (*EpochRewardsCreatorStub) DeleteTxsFromStorage ¶
func (e *EpochRewardsCreatorStub) DeleteTxsFromStorage(metaBlock *block.MetaBlock, body *block.Body)
DeleteTxsFromStorage -
func (*EpochRewardsCreatorStub) IsInterfaceNil ¶
func (e *EpochRewardsCreatorStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*EpochRewardsCreatorStub) SaveTxBlockToStorage ¶
func (e *EpochRewardsCreatorStub) SaveTxBlockToStorage(metaBlock *block.MetaBlock, body *block.Body)
SaveTxBlockToStorage -
func (*EpochRewardsCreatorStub) VerifyRewardsMiniBlocks ¶
func (e *EpochRewardsCreatorStub) VerifyRewardsMiniBlocks(metaBlock *block.MetaBlock, validatorInfos map[uint32][]*state.ValidatorInfo) error
VerifyRewardsMiniBlocks -
type EpochStartDataCreatorStub ¶
type EpochStartDataCreatorStub struct {
CreateEpochStartDataCalled func() (*block.EpochStart, error)
VerifyEpochStartDataForMetablockCalled func(metaBlock *block.MetaBlock) error
}
EpochStartDataCreatorStub -
func (*EpochStartDataCreatorStub) CreateEpochStartData ¶
func (e *EpochStartDataCreatorStub) CreateEpochStartData() (*block.EpochStart, error)
CreateEpochStartData -
func (*EpochStartDataCreatorStub) IsInterfaceNil ¶
func (e *EpochStartDataCreatorStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*EpochStartDataCreatorStub) VerifyEpochStartDataForMetablock ¶
func (e *EpochStartDataCreatorStub) VerifyEpochStartDataForMetablock(metaBlock *block.MetaBlock) error
VerifyEpochStartDataForMetablock -
type EpochStartTriggerStub ¶
type EpochStartTriggerStub struct {
ForceEpochStartCalled func(round uint64) error
IsEpochStartCalled func() bool
EpochCalled func() uint32
ReceivedHeaderCalled func(handler data.HeaderHandler)
UpdateCalled func(round uint64)
ProcessedCalled func(header data.HeaderHandler)
EpochStartRoundCalled func() uint64
EpochFinalityAttestingRoundCalled func() uint64
}
EpochStartTriggerStub -
func (*EpochStartTriggerStub) EpochFinalityAttestingRound ¶
func (e *EpochStartTriggerStub) EpochFinalityAttestingRound() uint64
EpochFinalityAttestingRound -
func (*EpochStartTriggerStub) EpochStartMetaHdrHash ¶
func (e *EpochStartTriggerStub) EpochStartMetaHdrHash() []byte
EpochStartMetaHdrHash -
func (*EpochStartTriggerStub) EpochStartRound ¶
func (e *EpochStartTriggerStub) EpochStartRound() uint64
EpochStartRound -
func (*EpochStartTriggerStub) ForceEpochStart ¶
func (e *EpochStartTriggerStub) ForceEpochStart(round uint64) error
ForceEpochStart -
func (*EpochStartTriggerStub) GetSavedStateKey ¶
func (e *EpochStartTriggerStub) GetSavedStateKey() []byte
GetSavedStateKey -
func (*EpochStartTriggerStub) IsEpochStart ¶
func (e *EpochStartTriggerStub) IsEpochStart() bool
IsEpochStart -
func (*EpochStartTriggerStub) IsInterfaceNil ¶
func (e *EpochStartTriggerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*EpochStartTriggerStub) LoadState ¶
func (e *EpochStartTriggerStub) LoadState(_ []byte) error
LoadState -
func (*EpochStartTriggerStub) NotifyAll ¶
func (e *EpochStartTriggerStub) NotifyAll(_ data.HeaderHandler)
NotifyAll -
func (*EpochStartTriggerStub) ReceivedHeader ¶
func (e *EpochStartTriggerStub) ReceivedHeader(header data.HeaderHandler)
ReceivedHeader -
func (*EpochStartTriggerStub) RequestEpochStartIfNeeded ¶
func (e *EpochStartTriggerStub) RequestEpochStartIfNeeded(_ data.HeaderHandler)
RequestEpochStartIfNeeded -
func (*EpochStartTriggerStub) Revert ¶
func (e *EpochStartTriggerStub) Revert(_ data.HeaderHandler)
Revert -
func (*EpochStartTriggerStub) RevertStateToBlock ¶
func (e *EpochStartTriggerStub) RevertStateToBlock(_ data.HeaderHandler) error
RevertStateToBlock -
func (*EpochStartTriggerStub) SetCurrentEpochStartRound ¶
func (e *EpochStartTriggerStub) SetCurrentEpochStartRound(_ uint64)
SetCurrentEpochStartRound -
func (*EpochStartTriggerStub) SetFinalityAttestingRound ¶
func (e *EpochStartTriggerStub) SetFinalityAttestingRound(_ uint64)
SetFinalityAttestingRound -
func (*EpochStartTriggerStub) SetProcessed ¶
func (e *EpochStartTriggerStub) SetProcessed(header data.HeaderHandler)
SetProcessed -
func (*EpochStartTriggerStub) Update ¶
func (e *EpochStartTriggerStub) Update(round uint64)
Update -
type EpochValidatorInfoCreatorStub ¶
type EpochValidatorInfoCreatorStub struct {
CreateValidatorInfoMiniBlocksCalled func(validatorInfos map[uint32][]*state.ValidatorInfo) (block.MiniBlockSlice, error)
VerifyValidatorInfoMiniBlocksCalled func(miniblocks []*block.MiniBlock, validatorInfos map[uint32][]*state.ValidatorInfo) error
CreateMarshalizedDataCalled func(body block.Body) map[string][][]byte
SaveTxBlockToStorageCalled func(metaBlock *block.MetaBlock, body *block.Body)
DeleteTxsFromStorageCalled func(metaBlock *block.MetaBlock)
}
EpochValidatorInfoCreatorStub -
func (*EpochValidatorInfoCreatorStub) CreateValidatorInfoMiniBlocks ¶
func (e *EpochValidatorInfoCreatorStub) CreateValidatorInfoMiniBlocks(validatorInfo map[uint32][]*state.ValidatorInfo) (block.MiniBlockSlice, error)
CreateValidatorInfoMiniBlocks -
func (*EpochValidatorInfoCreatorStub) DeleteValidatorInfoBlocksFromStorage ¶
func (e *EpochValidatorInfoCreatorStub) DeleteValidatorInfoBlocksFromStorage(metaBlock *block.MetaBlock)
DeleteValidatorInfoBlocksFromStorage -
func (*EpochValidatorInfoCreatorStub) IsInterfaceNil ¶
func (e *EpochValidatorInfoCreatorStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*EpochValidatorInfoCreatorStub) SaveValidatorInfoBlocksToStorage ¶
func (e *EpochValidatorInfoCreatorStub) SaveValidatorInfoBlocksToStorage(metaBlock *block.MetaBlock, body *block.Body)
SaveValidatorInfoBlocksToStorage -
func (*EpochValidatorInfoCreatorStub) VerifyValidatorInfoMiniBlocks ¶
func (e *EpochValidatorInfoCreatorStub) VerifyValidatorInfoMiniBlocks(miniblocks []*block.MiniBlock, validatorInfos map[uint32][]*state.ValidatorInfo) error
VerifyValidatorInfoMiniBlocks -
type FeeAccumulatorStub ¶
type FeeAccumulatorStub struct {
CreateBlockStartedCalled func()
GetAccumulatedFeesCalled func() *big.Int
ProcessTransactionFeeCalled func(cost *big.Int, hash []byte)
RevertFeesCalled func(txHashes [][]byte)
}
FeeAccumulatorStub is a stub which implements TransactionFeeHandler interface
func (*FeeAccumulatorStub) CreateBlockStarted ¶
func (f *FeeAccumulatorStub) CreateBlockStarted()
CreateBlockStarted -
func (*FeeAccumulatorStub) GetAccumulatedFees ¶
func (f *FeeAccumulatorStub) GetAccumulatedFees() *big.Int
GetAccumulatedFees -
func (*FeeAccumulatorStub) IsInterfaceNil ¶
func (f *FeeAccumulatorStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*FeeAccumulatorStub) ProcessTransactionFee ¶
func (f *FeeAccumulatorStub) ProcessTransactionFee(cost *big.Int, txHash []byte)
ProcessTransactionFee -
func (*FeeAccumulatorStub) RevertFees ¶
func (f *FeeAccumulatorStub) RevertFees(txHashes [][]byte)
RevertFees -
type FeeHandlerStub ¶
type FeeHandlerStub struct {
SetMaxGasLimitPerBlockCalled func(maxGasLimitPerBlock uint64)
SetMinGasPriceCalled func(minGasPrice uint64)
SetMinGasLimitCalled func(minGasLimit uint64)
MaxGasLimitPerBlockCalled func() uint64
ComputeGasLimitCalled func(tx process.TransactionWithFeeHandler) uint64
ComputeFeeCalled func(tx process.TransactionWithFeeHandler) *big.Int
CheckValidityTxValuesCalled func(tx process.TransactionWithFeeHandler) error
DeveloperPercentageCalled func() float64
MinGasPriceCalled func() uint64
}
FeeHandlerStub -
func (*FeeHandlerStub) CheckValidityTxValues ¶
func (fhs *FeeHandlerStub) CheckValidityTxValues(tx process.TransactionWithFeeHandler) error
CheckValidityTxValues -
func (*FeeHandlerStub) ComputeFee ¶
func (fhs *FeeHandlerStub) ComputeFee(tx process.TransactionWithFeeHandler) *big.Int
ComputeFee -
func (*FeeHandlerStub) ComputeGasLimit ¶
func (fhs *FeeHandlerStub) ComputeGasLimit(tx process.TransactionWithFeeHandler) uint64
ComputeGasLimit -
func (*FeeHandlerStub) DeveloperPercentage ¶
func (fhs *FeeHandlerStub) DeveloperPercentage() float64
DeveloperPercentage -
func (*FeeHandlerStub) IsInterfaceNil ¶
func (fhs *FeeHandlerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*FeeHandlerStub) MaxGasLimitPerBlock ¶
func (fhs *FeeHandlerStub) MaxGasLimitPerBlock() uint64
MaxGasLimitPerBlock -
func (*FeeHandlerStub) SetMaxGasLimitPerBlock ¶
func (fhs *FeeHandlerStub) SetMaxGasLimitPerBlock(maxGasLimitPerBlock uint64)
SetMaxGasLimitPerBlock -
func (*FeeHandlerStub) SetMinGasLimit ¶
func (fhs *FeeHandlerStub) SetMinGasLimit(minGasLimit uint64)
SetMinGasLimit -
func (*FeeHandlerStub) SetMinGasPrice ¶
func (fhs *FeeHandlerStub) SetMinGasPrice(minGasPrice uint64)
SetMinGasPrice -
type FloodPreventerStub ¶
type FloodPreventerStub struct {
AccumulateGlobalCalled func(identifier string, size uint64) bool
AccumulateCalled func(identifier string, size uint64) bool
ResetCalled func()
}
FloodPreventerStub -
func (*FloodPreventerStub) Accumulate ¶
func (fps *FloodPreventerStub) Accumulate(identifier string, size uint64) bool
Accumulate -
func (*FloodPreventerStub) AccumulateGlobal ¶
func (fps *FloodPreventerStub) AccumulateGlobal(identifier string, size uint64) bool
AccumulateGlobal -
func (*FloodPreventerStub) IsInterfaceNil ¶
func (fps *FloodPreventerStub) IsInterfaceNil() bool
IsInterfaceNil -
type ForkDetectorMock ¶
type ForkDetectorMock struct {
AddHeaderCalled func(header data.HeaderHandler, hash []byte, state process.BlockHeaderState, selfNotarizedHeaders []data.HeaderHandler, selfNotarizedHeadersHashes [][]byte) error
RemoveHeaderCalled func(nonce uint64, hash []byte)
CheckForkCalled func() *process.ForkInfo
GetHighestFinalBlockNonceCalled func() uint64
GetHighestFinalBlockHashCalled func() []byte
ProbableHighestNonceCalled func() uint64
ResetForkCalled func()
GetNotarizedHeaderHashCalled func(nonce uint64) []byte
SetRollBackNonceCalled func(nonce uint64)
RestoreToGenesisCalled func()
ResetProbableHighestNonceCalled func()
}
ForkDetectorMock -
func (*ForkDetectorMock) AddHeader ¶
func (fdm *ForkDetectorMock) AddHeader(header data.HeaderHandler, hash []byte, state process.BlockHeaderState, selfNotarizedHeaders []data.HeaderHandler, selfNotarizedHeadersHashes [][]byte) error
AddHeader -
func (*ForkDetectorMock) CheckFork ¶
func (fdm *ForkDetectorMock) CheckFork() *process.ForkInfo
CheckFork -
func (*ForkDetectorMock) GetHighestFinalBlockHash ¶
func (fdm *ForkDetectorMock) GetHighestFinalBlockHash() []byte
GetHighestFinalBlockHash -
func (*ForkDetectorMock) GetHighestFinalBlockNonce ¶
func (fdm *ForkDetectorMock) GetHighestFinalBlockNonce() uint64
GetHighestFinalBlockNonce -
func (*ForkDetectorMock) GetNotarizedHeaderHash ¶
func (fdm *ForkDetectorMock) GetNotarizedHeaderHash(nonce uint64) []byte
GetNotarizedHeaderHash -
func (*ForkDetectorMock) IsInterfaceNil ¶
func (fdm *ForkDetectorMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ForkDetectorMock) ProbableHighestNonce ¶
func (fdm *ForkDetectorMock) ProbableHighestNonce() uint64
ProbableHighestNonce -
func (*ForkDetectorMock) RemoveHeader ¶
func (fdm *ForkDetectorMock) RemoveHeader(nonce uint64, hash []byte)
RemoveHeader -
func (*ForkDetectorMock) ResetProbableHighestNonce ¶
func (fdm *ForkDetectorMock) ResetProbableHighestNonce()
ResetProbableHighestNonce -
func (*ForkDetectorMock) RestoreToGenesis ¶
func (fdm *ForkDetectorMock) RestoreToGenesis()
RestoreToGenesis -
func (*ForkDetectorMock) SetRollBackNonce ¶
func (fdm *ForkDetectorMock) SetRollBackNonce(nonce uint64)
SetRollBackNonce -
type GasHandlerMock ¶
type GasHandlerMock struct {
InitCalled func()
SetGasConsumedCalled func(gasConsumed uint64, hash []byte)
SetGasRefundedCalled func(gasRefunded uint64, hash []byte)
GasConsumedCalled func(hash []byte) uint64
GasRefundedCalled func(hash []byte) uint64
TotalGasConsumedCalled func() uint64
TotalGasRefundedCalled func() uint64
RemoveGasConsumedCalled func(hashes [][]byte)
RemoveGasRefundedCalled func(hashes [][]byte)
ComputeGasConsumedByMiniBlockCalled func(miniBlock *block.MiniBlock, mapHashTx map[string]data.TransactionHandler) (uint64, uint64, error)
ComputeGasConsumedByTxCalled func(txSenderShardId uint32, txReceiverSharedId uint32, txHandler data.TransactionHandler) (uint64, uint64, error)
}
GasHandlerMock -
func (*GasHandlerMock) ComputeGasConsumedByMiniBlock ¶
func (ghm *GasHandlerMock) ComputeGasConsumedByMiniBlock(miniBlock *block.MiniBlock, mapHashTx map[string]data.TransactionHandler) (uint64, uint64, error)
ComputeGasConsumedByMiniBlock -
func (*GasHandlerMock) ComputeGasConsumedByTx ¶
func (ghm *GasHandlerMock) ComputeGasConsumedByTx(txSenderShardId uint32, txReceiverShardId uint32, txHandler data.TransactionHandler) (uint64, uint64, error)
ComputeGasConsumedByTx -
func (*GasHandlerMock) GasConsumed ¶
func (ghm *GasHandlerMock) GasConsumed(hash []byte) uint64
GasConsumed -
func (*GasHandlerMock) GasRefunded ¶
func (ghm *GasHandlerMock) GasRefunded(hash []byte) uint64
GasRefunded -
func (*GasHandlerMock) IsInterfaceNil ¶
func (ghm *GasHandlerMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*GasHandlerMock) RemoveGasConsumed ¶
func (ghm *GasHandlerMock) RemoveGasConsumed(hashes [][]byte)
RemoveGasConsumed -
func (*GasHandlerMock) RemoveGasRefunded ¶
func (ghm *GasHandlerMock) RemoveGasRefunded(hashes [][]byte)
RemoveGasRefunded -
func (*GasHandlerMock) SetGasConsumed ¶
func (ghm *GasHandlerMock) SetGasConsumed(gasConsumed uint64, hash []byte)
SetGasConsumed -
func (*GasHandlerMock) SetGasRefunded ¶
func (ghm *GasHandlerMock) SetGasRefunded(gasRefunded uint64, hash []byte)
SetGasRefunded -
func (*GasHandlerMock) TotalGasConsumed ¶
func (ghm *GasHandlerMock) TotalGasConsumed() uint64
TotalGasConsumed -
func (*GasHandlerMock) TotalGasRefunded ¶
func (ghm *GasHandlerMock) TotalGasRefunded() uint64
TotalGasRefunded -
type GetHdrHandlerStub ¶
type GetHdrHandlerStub struct {
HeaderHandlerCalled func() data.HeaderHandler
}
GetHdrHandlerStub -
func (*GetHdrHandlerStub) HeaderHandler ¶
func (ghhs *GetHdrHandlerStub) HeaderHandler() data.HeaderHandler
HeaderHandler -
type HasherMock ¶
type HasherMock struct {
}
HasherMock that will be used for testing
func (HasherMock) Compute ¶
func (sha HasherMock) Compute(s string) []byte
Compute will output the SHA's equivalent of the input string
func (HasherMock) EmptyHash ¶
func (sha HasherMock) EmptyHash() []byte
EmptyHash will return the equivalent of empty string SHA's
func (HasherMock) IsInterfaceNil ¶
func (sha HasherMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type HasherStub ¶
HasherStub -
func (*HasherStub) IsInterfaceNil ¶
func (hash *HasherStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type HeaderHandlerStub ¶
type HeaderHandlerStub struct {
GetMiniBlockHeadersWithDstCalled func(destId uint32) map[string]uint32
GetPubKeysBitmapCalled func() []byte
GetSignatureCalled func() []byte
GetRootHashCalled func() []byte
GetRandSeedCalled func() []byte
GetPrevRandSeedCalled func() []byte
GetPrevHashCalled func() []byte
CloneCalled func() data.HeaderHandler
GetChainIDCalled func() []byte
CheckChainIDCalled func(reference []byte) error
GetAccumulatedFeesCalled func() *big.Int
}
HeaderHandlerStub -
func (*HeaderHandlerStub) CheckChainID ¶
func (hhs *HeaderHandlerStub) CheckChainID(reference []byte) error
CheckChainID -
func (*HeaderHandlerStub) GetAccumulatedFees ¶
func (hhs *HeaderHandlerStub) GetAccumulatedFees() *big.Int
GetAccumulatedFees -
func (*HeaderHandlerStub) GetChainID ¶
func (hhs *HeaderHandlerStub) GetChainID() []byte
GetChainID -
func (*HeaderHandlerStub) GetEpochStartMetaHash ¶
func (hhs *HeaderHandlerStub) GetEpochStartMetaHash() []byte
GetEpochStartMetaHash -
func (*HeaderHandlerStub) GetLeaderSignature ¶
func (hhs *HeaderHandlerStub) GetLeaderSignature() []byte
GetLeaderSignature -
func (*HeaderHandlerStub) GetMiniBlockHeadersWithDst ¶
func (hhs *HeaderHandlerStub) GetMiniBlockHeadersWithDst(destId uint32) map[string]uint32
GetMiniBlockHeadersWithDst -
func (*HeaderHandlerStub) GetMiniBlockProcessed ¶
func (hhs *HeaderHandlerStub) GetMiniBlockProcessed(_ []byte) bool
GetMiniBlockProcessed -
func (*HeaderHandlerStub) GetPrevHash ¶
func (hhs *HeaderHandlerStub) GetPrevHash() []byte
GetPrevHash -
func (*HeaderHandlerStub) GetPrevRandSeed ¶
func (hhs *HeaderHandlerStub) GetPrevRandSeed() []byte
GetPrevRandSeed -
func (*HeaderHandlerStub) GetPubKeysBitmap ¶
func (hhs *HeaderHandlerStub) GetPubKeysBitmap() []byte
GetPubKeysBitmap -
func (*HeaderHandlerStub) GetRandSeed ¶
func (hhs *HeaderHandlerStub) GetRandSeed() []byte
GetRandSeed -
func (*HeaderHandlerStub) GetReceiptsHash ¶
func (hhs *HeaderHandlerStub) GetReceiptsHash() []byte
GetReceiptsHash -
func (*HeaderHandlerStub) GetRootHash ¶
func (hhs *HeaderHandlerStub) GetRootHash() []byte
GetRootHash -
func (*HeaderHandlerStub) GetShardID ¶
func (hhs *HeaderHandlerStub) GetShardID() uint32
GetShardID -
func (*HeaderHandlerStub) GetSignature ¶
func (hhs *HeaderHandlerStub) GetSignature() []byte
GetSignature -
func (*HeaderHandlerStub) GetTimeStamp ¶
func (hhs *HeaderHandlerStub) GetTimeStamp() uint64
GetTimeStamp -
func (*HeaderHandlerStub) GetTxCount ¶
func (hhs *HeaderHandlerStub) GetTxCount() uint32
GetTxCount -
func (*HeaderHandlerStub) GetValidatorStatsRootHash ¶
func (hhs *HeaderHandlerStub) GetValidatorStatsRootHash() []byte
GetValidatorStatsRootHash -
func (*HeaderHandlerStub) IsInterfaceNil ¶
func (hhs *HeaderHandlerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*HeaderHandlerStub) IsStartOfEpochBlock ¶
func (hhs *HeaderHandlerStub) IsStartOfEpochBlock() bool
IsStartOfEpochBlock -
func (*HeaderHandlerStub) ItemsInBody ¶
func (hhs *HeaderHandlerStub) ItemsInBody() uint32
ItemsInBody -
func (*HeaderHandlerStub) ItemsInHeader ¶
func (hhs *HeaderHandlerStub) ItemsInHeader() uint32
ItemsInHeader -
func (*HeaderHandlerStub) SetAccumulatedFees ¶
func (hhs *HeaderHandlerStub) SetAccumulatedFees(_ *big.Int)
SetAccumulatedFees -
func (*HeaderHandlerStub) SetChainID ¶
func (hhs *HeaderHandlerStub) SetChainID(_ []byte)
SetChainID -
func (*HeaderHandlerStub) SetLeaderSignature ¶
func (hhs *HeaderHandlerStub) SetLeaderSignature(_ []byte)
SetLeaderSignature -
func (*HeaderHandlerStub) SetMiniBlockProcessed ¶
func (hhs *HeaderHandlerStub) SetMiniBlockProcessed(_ []byte, _ bool)
SetMiniBlockProcessed -
func (*HeaderHandlerStub) SetPrevHash ¶
func (hhs *HeaderHandlerStub) SetPrevHash(_ []byte)
SetPrevHash -
func (*HeaderHandlerStub) SetPrevRandSeed ¶
func (hhs *HeaderHandlerStub) SetPrevRandSeed(_ []byte)
SetPrevRandSeed -
func (*HeaderHandlerStub) SetPubKeysBitmap ¶
func (hhs *HeaderHandlerStub) SetPubKeysBitmap(_ []byte)
SetPubKeysBitmap -
func (*HeaderHandlerStub) SetRandSeed ¶
func (hhs *HeaderHandlerStub) SetRandSeed(_ []byte)
SetRandSeed -
func (*HeaderHandlerStub) SetRootHash ¶
func (hhs *HeaderHandlerStub) SetRootHash(_ []byte)
SetRootHash -
func (*HeaderHandlerStub) SetShardID ¶
func (hhs *HeaderHandlerStub) SetShardID(_ uint32)
SetShardID -
func (*HeaderHandlerStub) SetSignature ¶
func (hhs *HeaderHandlerStub) SetSignature(_ []byte)
SetSignature -
func (*HeaderHandlerStub) SetTimeStamp ¶
func (hhs *HeaderHandlerStub) SetTimeStamp(_ uint64)
SetTimeStamp -
func (*HeaderHandlerStub) SetTxCount ¶
func (hhs *HeaderHandlerStub) SetTxCount(_ uint32)
SetTxCount -
func (*HeaderHandlerStub) SetValidatorStatsRootHash ¶
func (hhs *HeaderHandlerStub) SetValidatorStatsRootHash(_ []byte)
SetValidatorStatsRootHash -
type HeaderResolverMock ¶
type HeaderResolverMock struct {
RequestDataFromHashCalled func(hash []byte, epoch uint32) error
ProcessReceivedMessageCalled func(message p2p.MessageP2P) error
RequestDataFromNonceCalled func(nonce uint64, epoch uint32) error
RequestDataFromEpochCalled func(identifier []byte) error
SetEpochHandlerCalled func(epochHandler dataRetriever.EpochHandler) error
}
HeaderResolverMock -
func (*HeaderResolverMock) IsInterfaceNil ¶
func (hrm *HeaderResolverMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*HeaderResolverMock) ProcessReceivedMessage ¶
func (hrm *HeaderResolverMock) ProcessReceivedMessage(message p2p.MessageP2P, _ p2p.PeerID) error
ProcessReceivedMessage -
func (*HeaderResolverMock) RequestDataFromEpoch ¶
func (hrm *HeaderResolverMock) RequestDataFromEpoch(identifier []byte) error
RequestDataFromEpoch -
func (*HeaderResolverMock) RequestDataFromHash ¶
func (hrm *HeaderResolverMock) RequestDataFromHash(hash []byte, epoch uint32) error
RequestDataFromHash -
func (*HeaderResolverMock) RequestDataFromNonce ¶
func (hrm *HeaderResolverMock) RequestDataFromNonce(nonce uint64, epoch uint32) error
RequestDataFromNonce -
func (*HeaderResolverMock) SetEpochHandler ¶
func (hrm *HeaderResolverMock) SetEpochHandler(epochHandler dataRetriever.EpochHandler) error
SetEpochHandler -
type HeaderSigVerifierStub ¶
type HeaderSigVerifierStub struct {
VerifyRandSeedAndLeaderSignatureCalled func(header data.HeaderHandler) error
VerifySignatureCalled func(header data.HeaderHandler) error
}
HeaderSigVerifierStub -
func (*HeaderSigVerifierStub) IsInterfaceNil ¶
func (hsvm *HeaderSigVerifierStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*HeaderSigVerifierStub) VerifyRandSeedAndLeaderSignature ¶
func (hsvm *HeaderSigVerifierStub) VerifyRandSeedAndLeaderSignature(header data.HeaderHandler) error
VerifyRandSeedAndLeaderSignature -
func (*HeaderSigVerifierStub) VerifySignature ¶
func (hsvm *HeaderSigVerifierStub) VerifySignature(header data.HeaderHandler) error
VerifySignature -
type HeaderValidatorStub ¶
type HeaderValidatorStub struct {
HeaderValidForProcessingCalled func(headerHandler process.HdrValidatorHandler) error
}
HeaderValidatorStub -
func (*HeaderValidatorStub) HeaderValidForProcessing ¶
func (h *HeaderValidatorStub) HeaderValidForProcessing(headerHandler process.HdrValidatorHandler) error
HeaderValidForProcessing -
func (*HeaderValidatorStub) IsInterfaceNil ¶
func (h *HeaderValidatorStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
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
}
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) 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 IndexerMock ¶
type IndexerMock struct {
SaveBlockCalled func(body data.BodyHandler, header data.HeaderHandler, txPool map[string]data.TransactionHandler)
}
IndexerMock is a mock implementation fot the Indexer interface
func (*IndexerMock) IsInterfaceNil ¶
func (im *IndexerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*IndexerMock) SaveBlock ¶
func (im *IndexerMock) SaveBlock(body data.BodyHandler, header data.HeaderHandler, txPool map[string]data.TransactionHandler, _ []uint64)
SaveBlock -
func (*IndexerMock) SaveMetaBlock ¶
func (im *IndexerMock) SaveMetaBlock(_ data.HeaderHandler, _ []uint64)
SaveMetaBlock -
func (*IndexerMock) SaveRoundInfo ¶
func (im *IndexerMock) SaveRoundInfo(_ indexer.RoundInfo)
SaveRoundInfo -
func (*IndexerMock) SaveValidatorsPubKeys ¶
func (im *IndexerMock) SaveValidatorsPubKeys(_ map[uint32][][]byte)
SaveValidatorsPubKeys -
func (*IndexerMock) UpdateTPS ¶
func (im *IndexerMock) UpdateTPS(_ statistics.TPSBenchmark)
UpdateTPS -
type InterceptedDataFactoryStub ¶
type InterceptedDataFactoryStub struct {
CreateCalled func(buff []byte) (process.InterceptedData, error)
}
InterceptedDataFactoryStub -
func (*InterceptedDataFactoryStub) Create ¶
func (idfs *InterceptedDataFactoryStub) Create(buff []byte) (process.InterceptedData, error)
Create -
func (*InterceptedDataFactoryStub) IsInterfaceNil ¶
func (idfs *InterceptedDataFactoryStub) IsInterfaceNil() bool
IsInterfaceNil -
type InterceptedDataStub ¶
type InterceptedDataStub struct {
CheckValidityCalled func() error
IsForCurrentShardCalled func() bool
HashCalled func() []byte
}
InterceptedDataStub -
func (*InterceptedDataStub) CheckValidity ¶
func (ids *InterceptedDataStub) CheckValidity() error
CheckValidity -
func (*InterceptedDataStub) IsForCurrentShard ¶
func (ids *InterceptedDataStub) IsForCurrentShard() bool
IsForCurrentShard -
func (*InterceptedDataStub) IsInterfaceNil ¶
func (ids *InterceptedDataStub) IsInterfaceNil() bool
IsInterfaceNil -
type InterceptedTxHandlerStub ¶
type InterceptedTxHandlerStub struct {
SenderShardIdCalled func() uint32
ReceiverShardIdCalled func() uint32
NonceCalled func() uint64
SenderAddressCalled func() state.AddressContainer
FeeCalled func() *big.Int
TransactionCalled func() data.TransactionHandler
}
InterceptedTxHandlerStub -
func (*InterceptedTxHandlerStub) Nonce ¶
func (iths *InterceptedTxHandlerStub) Nonce() uint64
Nonce -
func (*InterceptedTxHandlerStub) ReceiverShardId ¶
func (iths *InterceptedTxHandlerStub) ReceiverShardId() uint32
ReceiverShardId -
func (*InterceptedTxHandlerStub) SenderAddress ¶
func (iths *InterceptedTxHandlerStub) SenderAddress() state.AddressContainer
SenderAddress -
func (*InterceptedTxHandlerStub) SenderShardId ¶
func (iths *InterceptedTxHandlerStub) SenderShardId() uint32
SenderShardId -
func (*InterceptedTxHandlerStub) Transaction ¶
func (iths *InterceptedTxHandlerStub) Transaction() data.TransactionHandler
Transaction -
type InterceptorProcessorStub ¶
type InterceptorProcessorStub struct {
ValidateCalled func(data process.InterceptedData) error
SaveCalled func(data process.InterceptedData) error
}
InterceptorProcessorStub -
func (*InterceptorProcessorStub) IsInterfaceNil ¶
func (ips *InterceptorProcessorStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*InterceptorProcessorStub) Save ¶
func (ips *InterceptorProcessorStub) Save(data process.InterceptedData) error
Save -
func (*InterceptorProcessorStub) SignalEndOfProcessing ¶
func (ips *InterceptorProcessorStub) SignalEndOfProcessing(_ []process.InterceptedData)
SignalEndOfProcessing -
func (*InterceptorProcessorStub) Validate ¶
func (ips *InterceptorProcessorStub) Validate(data process.InterceptedData) error
Validate -
type InterceptorStub ¶
type InterceptorStub struct {
ProcessReceivedMessageCalled func(message p2p.MessageP2P) error
}
InterceptorStub -
func (*InterceptorStub) IsInterfaceNil ¶
func (is *InterceptorStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*InterceptorStub) ProcessReceivedMessage ¶
func (is *InterceptorStub) ProcessReceivedMessage(message p2p.MessageP2P, _ p2p.PeerID) error
ProcessReceivedMessage -
type InterceptorThrottlerStub ¶
type InterceptorThrottlerStub struct {
CanProcessCalled func() bool
// contains filtered or unexported fields
}
InterceptorThrottlerStub -
func (*InterceptorThrottlerStub) CanProcess ¶
func (its *InterceptorThrottlerStub) CanProcess() bool
CanProcess -
func (*InterceptorThrottlerStub) EndProcessing ¶
func (its *InterceptorThrottlerStub) EndProcessing()
EndProcessing -
func (*InterceptorThrottlerStub) EndProcessingCount ¶
func (its *InterceptorThrottlerStub) EndProcessingCount() int32
EndProcessingCount -
func (*InterceptorThrottlerStub) IsInterfaceNil ¶
func (its *InterceptorThrottlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*InterceptorThrottlerStub) StartProcessing ¶
func (its *InterceptorThrottlerStub) StartProcessing()
StartProcessing -
func (*InterceptorThrottlerStub) StartProcessingCount ¶
func (its *InterceptorThrottlerStub) StartProcessingCount() int32
StartProcessingCount -
type InterimProcessorContainerMock ¶
type InterimProcessorContainerMock struct {
GetCalled func(key block.Type) (process.IntermediateTransactionHandler, error)
KeysCalled func() []block.Type
}
InterimProcessorContainerMock -
func (*InterimProcessorContainerMock) Add ¶
func (ipcm *InterimProcessorContainerMock) Add(_ block.Type, _ process.IntermediateTransactionHandler) error
Add -
func (*InterimProcessorContainerMock) AddMultiple ¶
func (ipcm *InterimProcessorContainerMock) AddMultiple(_ []block.Type, _ []process.IntermediateTransactionHandler) error
AddMultiple -
func (*InterimProcessorContainerMock) Get ¶
func (ipcm *InterimProcessorContainerMock) Get(key block.Type) (process.IntermediateTransactionHandler, error)
Get -
func (*InterimProcessorContainerMock) IsInterfaceNil ¶
func (ipcm *InterimProcessorContainerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*InterimProcessorContainerMock) Keys ¶
func (ipcm *InterimProcessorContainerMock) Keys() []block.Type
Keys -
func (*InterimProcessorContainerMock) Len ¶
func (ipcm *InterimProcessorContainerMock) Len() int
Len -
func (*InterimProcessorContainerMock) Remove ¶
func (ipcm *InterimProcessorContainerMock) Remove(_ block.Type)
Remove -
func (*InterimProcessorContainerMock) Replace ¶
func (ipcm *InterimProcessorContainerMock) Replace(_ block.Type, _ process.IntermediateTransactionHandler) error
Replace -
type IntermediateTransactionHandlerMock ¶
type IntermediateTransactionHandlerMock struct {
AddIntermediateTransactionsCalled func(txs []data.TransactionHandler) error
CreateAllInterMiniBlocksCalled func() []*block.MiniBlock
VerifyInterMiniBlocksCalled func(body *block.Body) error
SaveCurrentIntermediateTxToStorageCalled func() error
CreateBlockStartedCalled func()
CreateMarshalizedDataCalled func(txHashes [][]byte) ([][]byte, error)
GetAllCurrentFinishedTxsCalled func() map[string]data.TransactionHandler
RemoveProcessedResultsForCalled func(txHashes [][]byte)
}
IntermediateTransactionHandlerMock -
func (*IntermediateTransactionHandlerMock) AddIntermediateTransactions ¶
func (ith *IntermediateTransactionHandlerMock) AddIntermediateTransactions(txs []data.TransactionHandler) error
AddIntermediateTransactions -
func (*IntermediateTransactionHandlerMock) CreateAllInterMiniBlocks ¶
func (ith *IntermediateTransactionHandlerMock) CreateAllInterMiniBlocks() []*block.MiniBlock
CreateAllInterMiniBlocks -
func (*IntermediateTransactionHandlerMock) CreateBlockStarted ¶
func (ith *IntermediateTransactionHandlerMock) CreateBlockStarted()
CreateBlockStarted -
func (*IntermediateTransactionHandlerMock) CreateMarshalizedData ¶
func (ith *IntermediateTransactionHandlerMock) CreateMarshalizedData(txHashes [][]byte) ([][]byte, error)
CreateMarshalizedData -
func (*IntermediateTransactionHandlerMock) GetAllCurrentFinishedTxs ¶
func (ith *IntermediateTransactionHandlerMock) GetAllCurrentFinishedTxs() map[string]data.TransactionHandler
GetAllCurrentFinishedTxs -
func (*IntermediateTransactionHandlerMock) GetCreatedInShardMiniBlock ¶
func (ith *IntermediateTransactionHandlerMock) GetCreatedInShardMiniBlock() *block.MiniBlock
GetCreatedInShardMiniBlock -
func (*IntermediateTransactionHandlerMock) IsInterfaceNil ¶
func (ith *IntermediateTransactionHandlerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*IntermediateTransactionHandlerMock) RemoveProcessedResultsFor ¶
func (ith *IntermediateTransactionHandlerMock) RemoveProcessedResultsFor(txHashes [][]byte)
RemoveProcessedResultsFor -
func (*IntermediateTransactionHandlerMock) SaveCurrentIntermediateTxToStorage ¶
func (ith *IntermediateTransactionHandlerMock) SaveCurrentIntermediateTxToStorage() error
SaveCurrentIntermediateTxToStorage -
func (*IntermediateTransactionHandlerMock) VerifyInterMiniBlocks ¶
func (ith *IntermediateTransactionHandlerMock) VerifyInterMiniBlocks(body *block.Body) error
VerifyInterMiniBlocks -
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 MarshalizerStub ¶
type MarshalizerStub struct {
MarshalCalled func(obj interface{}) ([]byte, error)
UnmarshalCalled func(obj interface{}, buff []byte) error
}
MarshalizerStub -
func (*MarshalizerStub) IsInterfaceNil ¶
func (ms *MarshalizerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*MarshalizerStub) Marshal ¶
func (ms *MarshalizerStub) Marshal(obj interface{}) ([]byte, error)
Marshal -
func (*MarshalizerStub) Unmarshal ¶
func (ms *MarshalizerStub) Unmarshal(obj interface{}, buff []byte) error
Unmarshal -
type MessageHandlerStub ¶
type MessageHandlerStub struct {
ConnectedPeersOnTopicCalled func(topic string) []p2p.PeerID
SendToConnectedPeerCalled func(topic string, buff []byte, peerID p2p.PeerID) error
}
MessageHandlerStub -
func (*MessageHandlerStub) ConnectedPeersOnTopic ¶
func (mhs *MessageHandlerStub) ConnectedPeersOnTopic(topic string) []p2p.PeerID
ConnectedPeersOnTopic -
func (*MessageHandlerStub) IsInterfaceNil ¶
func (mhs *MessageHandlerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*MessageHandlerStub) SendToConnectedPeer ¶
func (mhs *MessageHandlerStub) SendToConnectedPeer(topic string, buff []byte, peerID p2p.PeerID) error
SendToConnectedPeer -
type MessageSignVerifierMock ¶
type MessageSignVerifierMock struct {
}
MessageSignVerifierMock -
func (*MessageSignVerifierMock) IsInterfaceNil ¶
func (m *MessageSignVerifierMock) IsInterfaceNil() bool
IsInterfaceNil -
type MessengerStub ¶
type MessengerStub struct {
CloseCalled func() error
IDCalled func() p2p.PeerID
PeersCalled func() []p2p.PeerID
AddressesCalled func() []string
ConnectToPeerCalled func(address string) error
TrimConnectionsCalled func()
IsConnectedCalled func(peerID p2p.PeerID) bool
ConnectedPeersCalled func() []p2p.PeerID
CreateTopicCalled func(name string, createChannelForTopic bool) error
HasTopicCalled func(name string) bool
HasTopicValidatorCalled func(name string) bool
BroadcastOnChannelCalled func(channel string, topic string, buff []byte)
BroadcastCalled func(topic string, buff []byte)
RegisterMessageProcessorCalled func(topic string, handler p2p.MessageProcessor) error
UnregisterMessageProcessorCalled func(topic string) error
SendToConnectedPeerCalled func(topic string, buff []byte, peerID p2p.PeerID) error
OutgoingChannelLoadBalancerCalled func() p2p.ChannelLoadBalancer
BootstrapCalled func() error
}
MessengerStub -
func (*MessengerStub) Broadcast ¶
func (ms *MessengerStub) Broadcast(topic string, buff []byte)
Broadcast -
func (*MessengerStub) BroadcastOnChannel ¶
func (ms *MessengerStub) BroadcastOnChannel(channel string, topic string, buff []byte)
BroadcastOnChannel -
func (*MessengerStub) ConnectToPeer ¶
func (ms *MessengerStub) ConnectToPeer(address string) error
ConnectToPeer -
func (*MessengerStub) ConnectedPeers ¶
func (ms *MessengerStub) ConnectedPeers() []p2p.PeerID
ConnectedPeers -
func (*MessengerStub) CreateTopic ¶
func (ms *MessengerStub) CreateTopic(name string, createChannelForTopic bool) error
CreateTopic -
func (*MessengerStub) HasTopicValidator ¶
func (ms *MessengerStub) HasTopicValidator(name string) bool
HasTopicValidator -
func (*MessengerStub) IsConnected ¶
func (ms *MessengerStub) IsConnected(peerID p2p.PeerID) bool
IsConnected -
func (*MessengerStub) IsInterfaceNil ¶
func (ms *MessengerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*MessengerStub) OutgoingChannelLoadBalancer ¶
func (ms *MessengerStub) OutgoingChannelLoadBalancer() p2p.ChannelLoadBalancer
OutgoingChannelLoadBalancer -
func (*MessengerStub) RegisterMessageProcessor ¶
func (ms *MessengerStub) RegisterMessageProcessor(topic string, handler p2p.MessageProcessor) error
RegisterMessageProcessor -
func (*MessengerStub) SendToConnectedPeer ¶
SendToConnectedPeer -
func (*MessengerStub) TrimConnections ¶
func (ms *MessengerStub) TrimConnections()
TrimConnections -
func (*MessengerStub) UnregisterMessageProcessor ¶
func (ms *MessengerStub) UnregisterMessageProcessor(topic string) error
UnregisterMessageProcessor -
type MiniBlocksResolverMock ¶
type MiniBlocksResolverMock struct {
RequestDataFromHashCalled func(hash []byte, epoch uint32) error
RequestDataFromHashArrayCalled func(hashes [][]byte, epoch uint32) error
ProcessReceivedMessageCalled func(message p2p.MessageP2P) error
GetMiniBlocksCalled func(hashes [][]byte) (block.MiniBlockSlice, [][]byte)
GetMiniBlocksFromPoolCalled func(hashes [][]byte) (block.MiniBlockSlice, [][]byte)
}
MiniBlocksResolverMock -
func (*MiniBlocksResolverMock) GetMiniBlocks ¶
func (hrm *MiniBlocksResolverMock) GetMiniBlocks(hashes [][]byte) (block.MiniBlockSlice, [][]byte)
GetMiniBlocks -
func (*MiniBlocksResolverMock) GetMiniBlocksFromPool ¶
func (hrm *MiniBlocksResolverMock) GetMiniBlocksFromPool(hashes [][]byte) (block.MiniBlockSlice, [][]byte)
GetMiniBlocksFromPool -
func (*MiniBlocksResolverMock) IsInterfaceNil ¶
func (hrm *MiniBlocksResolverMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*MiniBlocksResolverMock) ProcessReceivedMessage ¶
func (hrm *MiniBlocksResolverMock) ProcessReceivedMessage(message p2p.MessageP2P, _ p2p.PeerID) error
ProcessReceivedMessage -
func (*MiniBlocksResolverMock) RequestDataFromHash ¶
func (hrm *MiniBlocksResolverMock) RequestDataFromHash(hash []byte, epoch uint32) error
RequestDataFromHash -
func (*MiniBlocksResolverMock) RequestDataFromHashArray ¶
func (hrm *MiniBlocksResolverMock) RequestDataFromHashArray(hashes [][]byte, epoch uint32) error
RequestDataFromHashArray -
type NetworkConnectionWatcherStub ¶
type NetworkConnectionWatcherStub struct {
IsConnectedToTheNetworkCalled func() bool
}
NetworkConnectionWatcherStub -
func (*NetworkConnectionWatcherStub) IsConnectedToTheNetwork ¶
func (cws *NetworkConnectionWatcherStub) IsConnectedToTheNetwork() bool
IsConnectedToTheNetwork -
func (*NetworkConnectionWatcherStub) IsInterfaceNil ¶
func (cws *NetworkConnectionWatcherStub) IsInterfaceNil() bool
IsInterfaceNil -
type NodesCoordinatorMock ¶
type NodesCoordinatorMock struct {
Validators map[uint32][]sharding.Validator
ShardConsensusSize uint32
MetaConsensusSize uint32
ShardId uint32
NbShards uint32
GetSelectedPublicKeysCalled func(selection []byte, shardId uint32, epoch uint32) (publicKeys []string, err error)
GetValidatorsPublicKeysCalled func(randomness []byte, round uint64, shardId uint32, epoch uint32) ([]string, error)
GetValidatorsRewardsAddressesCalled func(randomness []byte, round uint64, shardId uint32, epoch uint32) ([]string, error)
SetNodesPerShardsCalled func(nodes map[uint32][]sharding.Validator, epoch uint32) error
ComputeValidatorsGroupCalled func(randomness []byte, round uint64, shardId uint32, epoch uint32) (validatorsGroup []sharding.Validator, err error)
GetValidatorWithPublicKeyCalled func(publicKey []byte, epoch uint32) (validator sharding.Validator, shardId uint32, err error)
GetAllEligibleValidatorsPublicKeysCalled func() (map[uint32][][]byte, error)
GetAllWaitingValidatorsPublicKeysCalled func() (map[uint32][][]byte, error)
ConsensusGroupSizeCalled func(uint32) int
}
NodesCoordinatorMock defines the behaviour of a struct able to do validator group selection
func NewNodesCoordinatorMock ¶
func NewNodesCoordinatorMock() *NodesCoordinatorMock
NewNodesCoordinatorMock -
func (*NodesCoordinatorMock) ComputeConsensusGroup ¶
func (ncm *NodesCoordinatorMock) ComputeConsensusGroup( randomess []byte, round uint64, shardId uint32, epoch uint32, ) ([]sharding.Validator, error)
ComputeConsensusGroup -
func (*NodesCoordinatorMock) ComputeLeaving ¶
func (ncm *NodesCoordinatorMock) ComputeLeaving([]sharding.Validator) []sharding.Validator
ComputeLeaving -
func (*NodesCoordinatorMock) ConsensusGroupSize ¶
func (ncm *NodesCoordinatorMock) ConsensusGroupSize(shardId uint32) int
ConsensusGroupSize -
func (*NodesCoordinatorMock) GetAllEligibleValidatorsPublicKeys ¶
func (ncm *NodesCoordinatorMock) GetAllEligibleValidatorsPublicKeys(_ uint32) (map[uint32][][]byte, error)
GetAllEligibleValidatorsPublicKeys -
func (*NodesCoordinatorMock) GetAllWaitingValidatorsPublicKeys ¶
func (ncm *NodesCoordinatorMock) GetAllWaitingValidatorsPublicKeys(_ uint32) (map[uint32][][]byte, error)
GetAllWaitingValidatorsPublicKeys -
func (*NodesCoordinatorMock) GetConsensusValidatorsPublicKeys ¶
func (ncm *NodesCoordinatorMock) GetConsensusValidatorsPublicKeys( randomness []byte, round uint64, shardId uint32, epoch uint32, ) ([]string, error)
GetConsensusValidatorsPublicKeys -
func (*NodesCoordinatorMock) GetConsensusValidatorsRewardsAddresses ¶
func (ncm *NodesCoordinatorMock) GetConsensusValidatorsRewardsAddresses( randomness []byte, round uint64, shardId uint32, epoch uint32, ) ([]string, error)
GetConsensusValidatorsRewardsAddresses -
func (*NodesCoordinatorMock) GetConsensusWhitelistedNodes ¶
func (ncm *NodesCoordinatorMock) GetConsensusWhitelistedNodes( _ uint32, ) (map[string]struct{}, error)
GetConsensusWhitelistedNodes return the whitelisted nodes allowed to send consensus messages, for each of the shards
func (*NodesCoordinatorMock) GetNumTotalEligible ¶
func (ncm *NodesCoordinatorMock) GetNumTotalEligible() uint64
GetNumTotalEligible -
func (*NodesCoordinatorMock) GetOwnPublicKey ¶
func (ncm *NodesCoordinatorMock) GetOwnPublicKey() []byte
GetOwnPublicKey -
func (*NodesCoordinatorMock) GetSavedStateKey ¶
func (ncm *NodesCoordinatorMock) GetSavedStateKey() []byte
GetSavedStateKey -
func (*NodesCoordinatorMock) GetSelectedPublicKeys ¶
func (ncm *NodesCoordinatorMock) GetSelectedPublicKeys(selection []byte, shardId uint32, epoch uint32) (publicKeys []string, err error)
GetSelectedPublicKeys -
func (*NodesCoordinatorMock) GetValidatorWithPublicKey ¶
func (ncm *NodesCoordinatorMock) GetValidatorWithPublicKey(publicKey []byte, epoch uint32) (sharding.Validator, uint32, error)
GetValidatorWithPublicKey -
func (*NodesCoordinatorMock) GetValidatorsIndexes ¶
func (ncm *NodesCoordinatorMock) GetValidatorsIndexes(_ []string, _ uint32) ([]uint64, error)
GetValidatorsIndexes -
func (*NodesCoordinatorMock) IsInterfaceNil ¶
func (ncm *NodesCoordinatorMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*NodesCoordinatorMock) LoadState ¶
func (ncm *NodesCoordinatorMock) LoadState(_ []byte) error
LoadState -
func (*NodesCoordinatorMock) SetNodesPerShards ¶
func (ncm *NodesCoordinatorMock) SetNodesPerShards( eligible map[uint32][]sharding.Validator, _ map[uint32][]sharding.Validator, epoch uint32, ) error
SetNodesPerShards -
func (*NodesCoordinatorMock) ShardIdForEpoch ¶
func (ncm *NodesCoordinatorMock) ShardIdForEpoch(_ uint32) (uint32, error)
ShardIdForEpoch returns the nodesCoordinator configured ShardId for specified epoch if epoch configuration exists, otherwise error
type ObjectsContainerStub ¶
type ObjectsContainerStub struct {
GetCalled func(key string) (interface{}, error)
AddCalled func(key string, val interface{}) error
ReplaceCalled func(key string, val interface{}) error
RemoveCalled func(key string)
LenCalled func() int
}
ObjectsContainerStub -
func (*ObjectsContainerStub) Add ¶
func (ocs *ObjectsContainerStub) Add(key string, val interface{}) error
Add -
func (*ObjectsContainerStub) Get ¶
func (ocs *ObjectsContainerStub) Get(key string) (interface{}, error)
Get -
func (*ObjectsContainerStub) Replace ¶
func (ocs *ObjectsContainerStub) Replace(key string, val interface{}) error
Replace -
type P2PAntifloodHandlerStub ¶
type P2PAntifloodHandlerStub struct {
CanProcessMessageCalled func(message p2p.MessageP2P, fromConnectedPeer p2p.PeerID) error
CanProcessMessageOnTopicCalled func(peer p2p.PeerID, topic string) error
}
P2PAntifloodHandlerStub -
func (*P2PAntifloodHandlerStub) CanProcessMessage ¶
func (p2pahs *P2PAntifloodHandlerStub) CanProcessMessage(message p2p.MessageP2P, fromConnectedPeer p2p.PeerID) error
CanProcessMessage -
func (*P2PAntifloodHandlerStub) CanProcessMessageOnTopic ¶
func (p2pahs *P2PAntifloodHandlerStub) CanProcessMessageOnTopic(peer p2p.PeerID, topic string) error
CanProcessMessageOnTopic -
func (*P2PAntifloodHandlerStub) IsInterfaceNil ¶
func (p2pahs *P2PAntifloodHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
type P2PMessageMock ¶
type P2PMessageMock struct {
FromField []byte
DataField []byte
SeqNoField []byte
TopicsField []string
SignatureField []byte
KeyField []byte
PeerField p2p.PeerID
}
P2PMessageMock -
func (*P2PMessageMock) IsInterfaceNil ¶
func (msg *P2PMessageMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type PeerAccountHandlerMock ¶
type PeerAccountHandlerMock struct {
MockValue int
SetNonceWithJournalCalled func(nonce uint64) error
SetCodeHashWithJournalCalled func(codeHash []byte) error
SetRootHashWithJournalCalled func([]byte) error
RatingCalled func() uint32
SetCodeWithJournalCalled func(codeHash []byte) error
SetRatingWithJournalCalled func(rating uint32) error
GetTempRatingCalled func() uint32
SetTempRatingWithJournalCalled func(rating uint32) error
IncreaseLeaderSuccessRateWithJournalCalled func(value uint32) error
DecreaseLeaderSuccessRateWithJournalCalled func(value uint32) error
IncreaseValidatorSuccessRateWithJournalCalled func(value uint32) error
DecreaseValidatorSuccessRateWithJournalCalled func(value uint32) error
AddToAccumulatedFeesCalled func(value *big.Int) error
IncreaseNumSelectedInSuccessBlocksCalled func() error
ResetAtNewEpochCalled func() error
SetRewardAddressWithJournalCalled func(address []byte) error
SetSchnorrPublicKeyWithJournalCalled func(address []byte) error
SetBLSPublicKeyWithJournalCalled func(address []byte) error
SetStakeWithJournalCalled func(stake *big.Int) error
// contains filtered or unexported fields
}
PeerAccountHandlerMock -
func (*PeerAccountHandlerMock) AddToAccumulatedFees ¶ added in v1.0.89
func (pahm *PeerAccountHandlerMock) AddToAccumulatedFees(value *big.Int) error
AddToAccumulatedFees -
func (*PeerAccountHandlerMock) AddressContainer ¶
func (pahm *PeerAccountHandlerMock) AddressContainer() state.AddressContainer
AddressContainer -
func (*PeerAccountHandlerMock) DataTrie ¶
func (pahm *PeerAccountHandlerMock) DataTrie() data.Trie
DataTrie -
func (*PeerAccountHandlerMock) DataTrieTracker ¶
func (pahm *PeerAccountHandlerMock) DataTrieTracker() state.DataTrieTracker
DataTrieTracker -
func (*PeerAccountHandlerMock) DecreaseLeaderSuccessRateWithJournal ¶ added in v1.0.39
func (pahm *PeerAccountHandlerMock) DecreaseLeaderSuccessRateWithJournal(value uint32) error
DecreaseLeaderSuccessRateWithJournal -
func (*PeerAccountHandlerMock) DecreaseValidatorSuccessRateWithJournal ¶ added in v1.0.39
func (pahm *PeerAccountHandlerMock) DecreaseValidatorSuccessRateWithJournal(value uint32) error
DecreaseValidatorSuccessRateWithJournal -
func (*PeerAccountHandlerMock) GetCode ¶
func (pahm *PeerAccountHandlerMock) GetCode() []byte
GetCode -
func (*PeerAccountHandlerMock) GetCodeHash ¶
func (pahm *PeerAccountHandlerMock) GetCodeHash() []byte
GetCodeHash -
func (*PeerAccountHandlerMock) GetNonce ¶
func (pahm *PeerAccountHandlerMock) GetNonce() uint64
GetNonce -
func (*PeerAccountHandlerMock) GetRating ¶
func (pahm *PeerAccountHandlerMock) GetRating() uint32
GetRating -
func (*PeerAccountHandlerMock) GetRootHash ¶
func (pahm *PeerAccountHandlerMock) GetRootHash() []byte
GetRootHash -
func (*PeerAccountHandlerMock) GetTempRating ¶
func (pahm *PeerAccountHandlerMock) GetTempRating() uint32
GetTempRating -
func (*PeerAccountHandlerMock) IncreaseLeaderSuccessRateWithJournal ¶ added in v1.0.39
func (pahm *PeerAccountHandlerMock) IncreaseLeaderSuccessRateWithJournal(value uint32) error
IncreaseLeaderSuccessRateWithJournal -
func (*PeerAccountHandlerMock) IncreaseNumSelectedInSuccessBlocks ¶
func (pahm *PeerAccountHandlerMock) IncreaseNumSelectedInSuccessBlocks() error
IncreaseNumSelectedInSuccessBlocks -
func (*PeerAccountHandlerMock) IncreaseValidatorSuccessRateWithJournal ¶ added in v1.0.39
func (pahm *PeerAccountHandlerMock) IncreaseValidatorSuccessRateWithJournal(value uint32) error
IncreaseValidatorSuccessRateWithJournal -
func (*PeerAccountHandlerMock) IsInterfaceNil ¶
func (pahm *PeerAccountHandlerMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*PeerAccountHandlerMock) ResetAtNewEpoch ¶
func (pahm *PeerAccountHandlerMock) ResetAtNewEpoch() error
ResetAtNewEpoch -
func (*PeerAccountHandlerMock) SetBLSPublicKeyWithJournal ¶ added in v1.0.89
func (pahm *PeerAccountHandlerMock) SetBLSPublicKeyWithJournal(address []byte) error
SetBLSPublicKeyWithJournal -
func (*PeerAccountHandlerMock) SetCode ¶
func (pahm *PeerAccountHandlerMock) SetCode(code []byte)
SetCode -
func (*PeerAccountHandlerMock) SetCodeHash ¶
func (pahm *PeerAccountHandlerMock) SetCodeHash(codeHash []byte)
SetCodeHash -
func (*PeerAccountHandlerMock) SetCodeHashWithJournal ¶ added in v1.0.39
func (pahm *PeerAccountHandlerMock) SetCodeHashWithJournal(codeHash []byte) error
SetCodeHashWithJournal -
func (*PeerAccountHandlerMock) SetDataTrie ¶
func (pahm *PeerAccountHandlerMock) SetDataTrie(trie data.Trie)
SetDataTrie -
func (*PeerAccountHandlerMock) SetDataTrieTracker ¶ added in v1.0.39
func (pahm *PeerAccountHandlerMock) SetDataTrieTracker(tracker state.DataTrieTracker)
SetDataTrieTracker -
func (*PeerAccountHandlerMock) SetNonce ¶ added in v1.0.39
func (pahm *PeerAccountHandlerMock) SetNonce(nonce uint64)
SetNonce -
func (*PeerAccountHandlerMock) SetNonceWithJournal ¶ added in v1.0.39
func (pahm *PeerAccountHandlerMock) SetNonceWithJournal(nonce uint64) error
SetNonceWithJournal -
func (*PeerAccountHandlerMock) SetRatingWithJournal ¶ added in v1.0.67
func (pahm *PeerAccountHandlerMock) SetRatingWithJournal(rating uint32) error
SetRatingWithJournal -
func (*PeerAccountHandlerMock) SetRewardAddressWithJournal ¶ added in v1.0.89
func (pahm *PeerAccountHandlerMock) SetRewardAddressWithJournal(address []byte) error
SetRewardAddressWithJournal -
func (*PeerAccountHandlerMock) SetRootHash ¶
func (pahm *PeerAccountHandlerMock) SetRootHash(rootHash []byte)
SetRootHash -
func (*PeerAccountHandlerMock) SetSchnorrPublicKeyWithJournal ¶ added in v1.0.89
func (pahm *PeerAccountHandlerMock) SetSchnorrPublicKeyWithJournal(address []byte) error
SetSchnorrPublicKeyWithJournal -
func (*PeerAccountHandlerMock) SetStakeWithJournal ¶ added in v1.0.89
func (pahm *PeerAccountHandlerMock) SetStakeWithJournal(stake *big.Int) error
SetStakeWithJournal -
func (*PeerAccountHandlerMock) SetTempRatingWithJournal ¶ added in v1.0.67
func (pahm *PeerAccountHandlerMock) SetTempRatingWithJournal(rating uint32) error
SetTempRatingWithJournal -
type PeerChangesHandler ¶
type PeerChangesHandler struct {
PeerChangesCalled func() []block.PeerData
VerifyPeerChangesCalled func(peerChanges []block.PeerData) error
}
PeerChangesHandler -
func (*PeerChangesHandler) IsInterfaceNil ¶
func (p *PeerChangesHandler) IsInterfaceNil() bool
IsInterfaceNil -
func (*PeerChangesHandler) PeerChanges ¶
func (p *PeerChangesHandler) PeerChanges() []block.PeerData
PeerChanges -
func (*PeerChangesHandler) VerifyPeerChanges ¶
func (p *PeerChangesHandler) VerifyPeerChanges(peerChanges []block.PeerData) error
VerifyPeerChanges -
type PendingMiniBlocksHandlerStub ¶
type PendingMiniBlocksHandlerStub struct {
AddProcessedHeaderCalled func(handler data.HeaderHandler) error
RevertHeaderCalled func(handler data.HeaderHandler) error
GetPendingMiniBlocksCalled func(shardID uint32) [][]byte
SetPendingMiniBlocksCalled func(shardID uint32, mbHashes [][]byte)
}
PendingMiniBlocksHandlerStub -
func (*PendingMiniBlocksHandlerStub) AddProcessedHeader ¶
func (p *PendingMiniBlocksHandlerStub) AddProcessedHeader(handler data.HeaderHandler) error
AddProcessedHeader -
func (*PendingMiniBlocksHandlerStub) GetPendingMiniBlocks ¶
func (p *PendingMiniBlocksHandlerStub) GetPendingMiniBlocks(shardID uint32) [][]byte
GetPendingMiniBlocks -
func (*PendingMiniBlocksHandlerStub) IsInterfaceNil ¶
func (p *PendingMiniBlocksHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*PendingMiniBlocksHandlerStub) RevertHeader ¶
func (p *PendingMiniBlocksHandlerStub) RevertHeader(handler data.HeaderHandler) error
RevertHeader -
func (*PendingMiniBlocksHandlerStub) SetPendingMiniBlocks ¶
func (p *PendingMiniBlocksHandlerStub) SetPendingMiniBlocks(shardID uint32, mbHashes [][]byte)
SetPendingMiniBlocks -
type PoolsHolderMock ¶
type PoolsHolderMock struct {
// contains filtered or unexported fields
}
PoolsHolderMock -
func (*PoolsHolderMock) CurrentBlockTxs ¶
func (phm *PoolsHolderMock) CurrentBlockTxs() dataRetriever.TransactionCacher
CurrentBlockTxs -
func (*PoolsHolderMock) Headers ¶
func (phm *PoolsHolderMock) Headers() dataRetriever.HeadersPool
Headers -
func (*PoolsHolderMock) IsInterfaceNil ¶
func (phm *PoolsHolderMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*PoolsHolderMock) MiniBlocks ¶
func (phm *PoolsHolderMock) MiniBlocks() storage.Cacher
MiniBlocks -
func (*PoolsHolderMock) PeerChangesBlocks ¶
func (phm *PoolsHolderMock) PeerChangesBlocks() storage.Cacher
PeerChangesBlocks -
func (*PoolsHolderMock) RewardTransactions ¶
func (phm *PoolsHolderMock) RewardTransactions() dataRetriever.ShardedDataCacherNotifier
RewardTransactions -
func (*PoolsHolderMock) SetTransactions ¶
func (phm *PoolsHolderMock) SetTransactions(transactions dataRetriever.ShardedDataCacherNotifier)
SetTransactions -
func (*PoolsHolderMock) SetUnsignedTransactions ¶
func (phm *PoolsHolderMock) SetUnsignedTransactions(scrs dataRetriever.ShardedDataCacherNotifier)
SetUnsignedTransactions -
func (*PoolsHolderMock) Transactions ¶
func (phm *PoolsHolderMock) Transactions() dataRetriever.ShardedDataCacherNotifier
Transactions -
func (*PoolsHolderMock) TrieNodes ¶
func (phm *PoolsHolderMock) TrieNodes() storage.Cacher
TrieNodes -
func (*PoolsHolderMock) UnsignedTransactions ¶
func (phm *PoolsHolderMock) UnsignedTransactions() dataRetriever.ShardedDataCacherNotifier
UnsignedTransactions -
type PoolsHolderStub ¶
type PoolsHolderStub struct {
HeadersCalled func() dataRetriever.HeadersPool
PeerChangesBlocksCalled func() storage.Cacher
TransactionsCalled func() dataRetriever.ShardedDataCacherNotifier
UnsignedTransactionsCalled func() dataRetriever.ShardedDataCacherNotifier
RewardTransactionsCalled func() dataRetriever.ShardedDataCacherNotifier
MiniBlocksCalled func() storage.Cacher
MetaBlocksCalled func() storage.Cacher
TrieNodesCalled func() storage.Cacher
CurrBlockTxsCalled func() dataRetriever.TransactionCacher
}
PoolsHolderStub -
func (*PoolsHolderStub) CurrentBlockTxs ¶
func (phs *PoolsHolderStub) CurrentBlockTxs() dataRetriever.TransactionCacher
CurrentBlockTxs -
func (*PoolsHolderStub) Headers ¶
func (phs *PoolsHolderStub) Headers() dataRetriever.HeadersPool
Headers -
func (*PoolsHolderStub) IsInterfaceNil ¶
func (phs *PoolsHolderStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*PoolsHolderStub) MetaBlocks ¶
func (phs *PoolsHolderStub) MetaBlocks() storage.Cacher
MetaBlocks -
func (*PoolsHolderStub) MiniBlocks ¶
func (phs *PoolsHolderStub) MiniBlocks() storage.Cacher
MiniBlocks -
func (*PoolsHolderStub) PeerChangesBlocks ¶
func (phs *PoolsHolderStub) PeerChangesBlocks() storage.Cacher
PeerChangesBlocks -
func (*PoolsHolderStub) RewardTransactions ¶
func (phs *PoolsHolderStub) RewardTransactions() dataRetriever.ShardedDataCacherNotifier
RewardTransactions -
func (*PoolsHolderStub) Transactions ¶
func (phs *PoolsHolderStub) Transactions() dataRetriever.ShardedDataCacherNotifier
Transactions -
func (*PoolsHolderStub) TrieNodes ¶
func (phs *PoolsHolderStub) TrieNodes() storage.Cacher
TrieNodes -
func (*PoolsHolderStub) UnsignedTransactions ¶
func (phs *PoolsHolderStub) UnsignedTransactions() dataRetriever.ShardedDataCacherNotifier
UnsignedTransactions -
type PreProcessorContainerMock ¶
type PreProcessorContainerMock struct {
GetCalled func(key block.Type) (process.PreProcessor, error)
KeysCalled func() []block.Type
}
PreProcessorContainerMock -
func (*PreProcessorContainerMock) Add ¶
func (ppcm *PreProcessorContainerMock) Add(_ block.Type, _ process.PreProcessor) error
Add -
func (*PreProcessorContainerMock) AddMultiple ¶
func (ppcm *PreProcessorContainerMock) AddMultiple(_ []block.Type, _ []process.PreProcessor) error
AddMultiple -
func (*PreProcessorContainerMock) Get ¶
func (ppcm *PreProcessorContainerMock) Get(key block.Type) (process.PreProcessor, error)
Get -
func (*PreProcessorContainerMock) IsInterfaceNil ¶
func (ppcm *PreProcessorContainerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*PreProcessorContainerMock) Keys ¶
func (ppcm *PreProcessorContainerMock) Keys() []block.Type
Keys -
func (*PreProcessorContainerMock) Remove ¶
func (ppcm *PreProcessorContainerMock) Remove(_ block.Type)
Remove -
func (*PreProcessorContainerMock) Replace ¶
func (ppcm *PreProcessorContainerMock) Replace(_ block.Type, _ process.PreProcessor) error
Replace -
type PreProcessorMock ¶
type PreProcessorMock struct {
CreateBlockStartedCalled func()
IsDataPreparedCalled func(requestedTxs int, haveTime func() time.Duration) error
RemoveTxBlockFromPoolsCalled func(body *block.Body, miniBlockPool storage.Cacher) error
RestoreTxBlockIntoPoolsCalled func(body *block.Body, miniBlockPool storage.Cacher) (int, error)
SaveTxBlockToStorageCalled func(body *block.Body) error
ProcessBlockTransactionsCalled func(body *block.Body, haveTime func() bool) error
RequestBlockTransactionsCalled func(body *block.Body) int
CreateMarshalizedDataCalled func(txHashes [][]byte) ([][]byte, error)
RequestTransactionsForMiniBlockCalled func(miniBlock *block.MiniBlock) int
ProcessMiniBlockCalled func(miniBlock *block.MiniBlock, haveTime func() bool) ([][]byte, error)
CreateAndProcessMiniBlocksCalled func(haveTime func() bool) (block.MiniBlockSlice, error)
GetAllCurrentUsedTxsCalled func() map[string]data.TransactionHandler
}
PreProcessorMock -
func (*PreProcessorMock) CreateAndProcessMiniBlocks ¶
func (ppm *PreProcessorMock) CreateAndProcessMiniBlocks(haveTime func() bool) (block.MiniBlockSlice, error)
CreateAndProcessMiniBlocks creates miniblocks from storage and processes the reward transactions added into the miniblocks as long as it has time
func (*PreProcessorMock) CreateBlockStarted ¶
func (ppm *PreProcessorMock) CreateBlockStarted()
CreateBlockStarted -
func (*PreProcessorMock) CreateMarshalizedData ¶
func (ppm *PreProcessorMock) CreateMarshalizedData(txHashes [][]byte) ([][]byte, error)
CreateMarshalizedData -
func (*PreProcessorMock) GetAllCurrentUsedTxs ¶
func (ppm *PreProcessorMock) GetAllCurrentUsedTxs() map[string]data.TransactionHandler
GetAllCurrentUsedTxs -
func (*PreProcessorMock) IsDataPrepared ¶
func (ppm *PreProcessorMock) IsDataPrepared(requestedTxs int, haveTime func() time.Duration) error
IsDataPrepared -
func (*PreProcessorMock) IsInterfaceNil ¶
func (ppm *PreProcessorMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*PreProcessorMock) ProcessBlockTransactions ¶
func (ppm *PreProcessorMock) ProcessBlockTransactions(body *block.Body, haveTime func() bool) error
ProcessBlockTransactions -
func (*PreProcessorMock) ProcessMiniBlock ¶
func (ppm *PreProcessorMock) ProcessMiniBlock(miniBlock *block.MiniBlock, haveTime func() bool) ([][]byte, error)
ProcessMiniBlock -
func (*PreProcessorMock) RemoveTxBlockFromPools ¶
func (ppm *PreProcessorMock) RemoveTxBlockFromPools(body *block.Body, miniBlockPool storage.Cacher) error
RemoveTxBlockFromPools -
func (*PreProcessorMock) RequestBlockTransactions ¶
func (ppm *PreProcessorMock) RequestBlockTransactions(body *block.Body) int
RequestBlockTransactions -
func (*PreProcessorMock) RequestTransactionsForMiniBlock ¶
func (ppm *PreProcessorMock) RequestTransactionsForMiniBlock(miniBlock *block.MiniBlock) int
RequestTransactionsForMiniBlock -
func (*PreProcessorMock) RestoreTxBlockIntoPools ¶
func (ppm *PreProcessorMock) RestoreTxBlockIntoPools(body *block.Body, miniBlockPool storage.Cacher) (int, error)
RestoreTxBlockIntoPools -
func (*PreProcessorMock) SaveTxBlockToStorage ¶
func (ppm *PreProcessorMock) SaveTxBlockToStorage(body *block.Body) error
SaveTxBlockToStorage -
type ProtobufMarshalizerMock ¶
type ProtobufMarshalizerMock struct {
}
ProtobufMarshalizerMock implements marshaling with protobuf
func (*ProtobufMarshalizerMock) IsInterfaceNil ¶
func (x *ProtobufMarshalizerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ProtobufMarshalizerMock) Marshal ¶
func (x *ProtobufMarshalizerMock) Marshal(obj interface{}) ([]byte, error)
Marshal does the actual serialization of an object through protobuf
func (*ProtobufMarshalizerMock) Unmarshal ¶
func (x *ProtobufMarshalizerMock) Unmarshal(obj interface{}, buff []byte) error
Unmarshal does the actual deserialization of an object through protobuf
type QuotaStatusHandlerStub ¶
type QuotaStatusHandlerStub struct {
ResetStatisticsCalled func()
AddQuotaCalled func(identifier string, numReceivedMessages uint32, sizeReceivedMessages uint64,
numProcessedMessages uint32, sizeProcessedMessages uint64)
SetGlobalQuotaCalled func(numReceived uint32, sizeReceived uint64, numProcessed uint32, sizeProcessed uint64)
}
QuotaStatusHandlerStub -
func (*QuotaStatusHandlerStub) AddQuota ¶
func (qshs *QuotaStatusHandlerStub) AddQuota( identifier string, numReceived uint32, sizeReceived uint64, numProcessed uint32, sizeProcessed uint64, )
AddQuota -
func (*QuotaStatusHandlerStub) IsInterfaceNil ¶
func (qshs *QuotaStatusHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*QuotaStatusHandlerStub) ResetStatistics ¶
func (qshs *QuotaStatusHandlerStub) ResetStatistics()
ResetStatistics -
func (*QuotaStatusHandlerStub) SetGlobalQuota ¶
func (qshs *QuotaStatusHandlerStub) SetGlobalQuota( numReceived uint32, sizeReceived uint64, numProcessed uint32, sizeProcessed uint64, )
SetGlobalQuota -
type RaterMock ¶
type RaterMock struct {
StartRating uint32
MinRating uint32
MaxRating uint32
Chance uint32
IncreaseProposer uint32
DecreaseProposer uint32
IncreaseValidator uint32
DecreaseValidator uint32
GetRatingCalled func(string) uint32
UpdateRatingFromTempRatingCalled func([]string) error
GetStartRatingCalled func() uint32
ComputeIncreaseProposerCalled func(val uint32) uint32
ComputeDecreaseProposerCalled func(val uint32) uint32
ComputeIncreaseValidatorCalled func(val uint32) uint32
ComputeDecreaseValidatorCalled func(val uint32) uint32
GetChancesCalled func(val uint32) uint32
RatingReader sharding.RatingReader
}
RaterMock -
func (*RaterMock) ComputeDecreaseProposer ¶
ComputeDecreaseProposer -
func (*RaterMock) ComputeDecreaseValidator ¶
ComputeDecreaseValidator -
func (*RaterMock) ComputeIncreaseProposer ¶
ComputeIncreaseProposer -
func (*RaterMock) ComputeIncreaseValidator ¶
ComputeIncreaseValidator -
func (*RaterMock) SetRatingReader ¶
func (rm *RaterMock) SetRatingReader(reader sharding.RatingReader)
SetRatingReader -
func (*RaterMock) UpdateRatingFromTempRating ¶
UpdateRatingFromTempRating -
type RatingReaderMock ¶
type RatingReaderMock struct {
GetRatingCalled func(string) uint32
UpdateRatingFromTempRatingCalled func([]string) error
RatingsMap map[string]uint32
}
RatingReaderMock -
func (*RatingReaderMock) GetRating ¶
func (rrm *RatingReaderMock) GetRating(pk string) uint32
GetRating -
func (*RatingReaderMock) IsInterfaceNil ¶
func (rrm *RatingReaderMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*RatingReaderMock) UpdateRatingFromTempRating ¶
func (rrm *RatingReaderMock) UpdateRatingFromTempRating(pks []string) error
type RatingsInfoMock ¶
type RatingsInfoMock struct {
StartRatingVal uint32
MaxRatingVal uint32
MinRatingVal uint32
ProposerIncreaseRatingStepVal uint32
ProposerDecreaseRatingStepVal uint32
ValidatorIncreaseRatingStepVal uint32
ValidatorDecreaseRatingStepVal uint32
SelectionChancesVal []process.SelectionChance
}
func (*RatingsInfoMock) MaxRating ¶
func (rd *RatingsInfoMock) MaxRating() uint32
MaxRating will return the max rating
func (*RatingsInfoMock) MinRating ¶
func (rd *RatingsInfoMock) MinRating() uint32
MinRating will return the min rating
func (*RatingsInfoMock) ProposerDecreaseRatingStep ¶
func (rd *RatingsInfoMock) ProposerDecreaseRatingStep() uint32
ProposerDecreaseRatingStep will return the rating step decrease for proposer
func (*RatingsInfoMock) ProposerIncreaseRatingStep ¶
func (rd *RatingsInfoMock) ProposerIncreaseRatingStep() uint32
ProposerIncreaseRatingStep will return the rating step increase for validator
func (*RatingsInfoMock) SelectionChances ¶
func (rd *RatingsInfoMock) SelectionChances() []process.SelectionChance
SelectionChances will return the array of selectionChances and thresholds
func (*RatingsInfoMock) StartRating ¶
func (rd *RatingsInfoMock) StartRating() uint32
StartRating will return the start rating
func (*RatingsInfoMock) ValidatorDecreaseRatingStep ¶
func (rd *RatingsInfoMock) ValidatorDecreaseRatingStep() uint32
ValidatorDecreaseRatingStep will return the rating step decrease for validator
func (*RatingsInfoMock) ValidatorIncreaseRatingStep ¶
func (rd *RatingsInfoMock) ValidatorIncreaseRatingStep() uint32
ValidatorIncreaseRatingStep will return the rating step increase for validator
type RequestHandlerStub ¶
type RequestHandlerStub struct {
RequestShardHeaderCalled func(shardID uint32, hash []byte)
RequestMetaHeaderCalled func(hash []byte)
RequestMetaHeaderByNonceCalled func(nonce uint64)
RequestShardHeaderByNonceCalled func(shardID uint32, nonce uint64)
RequestTransactionHandlerCalled func(destShardID uint32, txHashes [][]byte)
RequestScrHandlerCalled func(destShardID uint32, txHashes [][]byte)
RequestRewardTxHandlerCalled func(destShardID uint32, txHashes [][]byte)
RequestMiniBlockHandlerCalled func(destShardID uint32, miniblockHash []byte)
RequestMiniBlocksHandlerCalled func(destShardID uint32, miniblocksHashes [][]byte)
RequestTrieNodesCalled func(destShardID uint32, hash []byte, topic string)
RequestStartOfEpochMetaBlockCalled func(epoch uint32)
}
RequestHandlerStub -
func (*RequestHandlerStub) IsInterfaceNil ¶
func (rhs *RequestHandlerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*RequestHandlerStub) RequestMetaHeader ¶
func (rhs *RequestHandlerStub) RequestMetaHeader(hash []byte)
RequestMetaHeader -
func (*RequestHandlerStub) RequestMetaHeaderByNonce ¶
func (rhs *RequestHandlerStub) RequestMetaHeaderByNonce(nonce uint64)
RequestMetaHeaderByNonce -
func (*RequestHandlerStub) RequestMiniBlock ¶
func (rhs *RequestHandlerStub) RequestMiniBlock(destShardID uint32, miniblockHash []byte)
RequestMiniBlock -
func (*RequestHandlerStub) RequestMiniBlocks ¶
func (rhs *RequestHandlerStub) RequestMiniBlocks(destShardID uint32, miniblocksHashes [][]byte)
RequestMiniBlocks -
func (*RequestHandlerStub) RequestRewardTransactions ¶
func (rhs *RequestHandlerStub) RequestRewardTransactions(destShardID uint32, txHashes [][]byte)
RequestRewardTransactions -
func (*RequestHandlerStub) RequestShardHeader ¶
func (rhs *RequestHandlerStub) RequestShardHeader(shardID uint32, hash []byte)
RequestShardHeader -
func (*RequestHandlerStub) RequestShardHeaderByNonce ¶
func (rhs *RequestHandlerStub) RequestShardHeaderByNonce(shardID uint32, nonce uint64)
RequestShardHeaderByNonce -
func (*RequestHandlerStub) RequestStartOfEpochMetaBlock ¶
func (rhs *RequestHandlerStub) RequestStartOfEpochMetaBlock(epoch uint32)
RequestStartOfEpochMetaBlock -
func (*RequestHandlerStub) RequestTransaction ¶
func (rhs *RequestHandlerStub) RequestTransaction(destShardID uint32, txHashes [][]byte)
RequestTransaction -
func (*RequestHandlerStub) RequestTrieNodes ¶
func (rhs *RequestHandlerStub) RequestTrieNodes(destShardID uint32, miniblockHash []byte, topic string)
RequestTrieNodes -
func (*RequestHandlerStub) RequestUnsignedTransactions ¶
func (rhs *RequestHandlerStub) RequestUnsignedTransactions(destShardID uint32, txHashes [][]byte)
RequestUnsignedTransactions -
type RequestedItemsHandlerStub ¶
type RequestedItemsHandlerStub struct {
AddCalled func(key string) error
HasCalled func(key string) bool
SweepCalled func()
}
RequestedItemsHandlerStub -
func (*RequestedItemsHandlerStub) Add ¶
func (rihs *RequestedItemsHandlerStub) Add(key string) error
Add -
func (*RequestedItemsHandlerStub) Has ¶
func (rihs *RequestedItemsHandlerStub) Has(key string) bool
Has -
func (*RequestedItemsHandlerStub) IsInterfaceNil ¶
func (rihs *RequestedItemsHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
type ResolverStub ¶
type ResolverStub struct {
RequestDataFromHashCalled func(hash []byte, epoch uint32) error
ProcessReceivedMessageCalled func(message p2p.MessageP2P) error
}
ResolverStub -
func (*ResolverStub) IsInterfaceNil ¶
func (rs *ResolverStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ResolverStub) ProcessReceivedMessage ¶
func (rs *ResolverStub) ProcessReceivedMessage(message p2p.MessageP2P, _ p2p.PeerID) error
ProcessReceivedMessage -
func (*ResolverStub) RequestDataFromHash ¶
func (rs *ResolverStub) RequestDataFromHash(hash []byte, epoch uint32) error
RequestDataFromHash -
type ResolversContainerStub ¶
type ResolversContainerStub struct {
GetCalled func(key string) (dataRetriever.Resolver, error)
AddCalled func(key string, val dataRetriever.Resolver) error
ReplaceCalled func(key string, val dataRetriever.Resolver) error
RemoveCalled func(key string)
LenCalled func() int
}
ResolversContainerStub -
func (*ResolversContainerStub) Add ¶
func (rcs *ResolversContainerStub) Add(key string, val dataRetriever.Resolver) error
Add -
func (*ResolversContainerStub) AddMultiple ¶
func (rcs *ResolversContainerStub) AddMultiple(_ []string, _ []dataRetriever.Resolver) error
AddMultiple -
func (*ResolversContainerStub) Get ¶
func (rcs *ResolversContainerStub) Get(key string) (dataRetriever.Resolver, error)
Get -
func (*ResolversContainerStub) IsInterfaceNil ¶
func (rcs *ResolversContainerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ResolversContainerStub) Remove ¶
func (rcs *ResolversContainerStub) Remove(key string)
Remove -
func (*ResolversContainerStub) Replace ¶
func (rcs *ResolversContainerStub) Replace(key string, val dataRetriever.Resolver) error
Replace -
type ResolversFinderStub ¶
type ResolversFinderStub struct {
ResolversContainerStub
IntraShardResolverCalled func(baseTopic string) (dataRetriever.Resolver, error)
MetaChainResolverCalled func(baseTopic string) (dataRetriever.Resolver, error)
CrossShardResolverCalled func(baseTopic string, crossShard uint32) (dataRetriever.Resolver, error)
}
ResolversFinderStub -
func (*ResolversFinderStub) CrossShardResolver ¶
func (rfs *ResolversFinderStub) CrossShardResolver(baseTopic string, crossShard uint32) (dataRetriever.Resolver, error)
CrossShardResolver -
func (*ResolversFinderStub) IntraShardResolver ¶
func (rfs *ResolversFinderStub) IntraShardResolver(baseTopic string) (dataRetriever.Resolver, error)
IntraShardResolver -
func (*ResolversFinderStub) MetaChainResolver ¶
func (rfs *ResolversFinderStub) MetaChainResolver(baseTopic string) (dataRetriever.Resolver, error)
MetaChainResolver -
type RewardTxProcessorMock ¶
type RewardTxProcessorMock struct {
ProcessRewardTransactionCalled func(rTx *rewardTx.RewardTx) error
}
RewardTxProcessorMock -
func (*RewardTxProcessorMock) IsInterfaceNil ¶
func (scrp *RewardTxProcessorMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*RewardTxProcessorMock) ProcessRewardTransaction ¶
func (scrp *RewardTxProcessorMock) ProcessRewardTransaction(rTx *rewardTx.RewardTx) error
ProcessRewardTransaction -
type RewardsHandlerMock ¶
type RewardsHandlerMock struct {
MaxInflationRateCalled func() float64
MinInflationRateCalled func() float64
LeaderPercentageCalled func() float64
}
RewardsHandlerMock -
func (*RewardsHandlerMock) IsInterfaceNil ¶
func (rhm *RewardsHandlerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*RewardsHandlerMock) LeaderPercentage ¶
func (rhm *RewardsHandlerMock) LeaderPercentage() float64
LeaderPercentage -
func (*RewardsHandlerMock) MaxInflationRate ¶
func (rhm *RewardsHandlerMock) MaxInflationRate() float64
MaxInflationRate -
func (*RewardsHandlerMock) MinInflationRate ¶
func (rhm *RewardsHandlerMock) MinInflationRate() float64
MinInflationRate -
type RoundStub ¶
type RoundStub struct {
IndexCalled func() int32
TimeDurationCalled func() time.Duration
TimeStampCalled func() time.Time
UpdateRoundCalled func(time.Time, time.Time)
RemainingTimeCalled func(time.Time, time.Duration) time.Duration
}
RoundStub -
func (*RoundStub) RemainingTime ¶
RemainingTime -
type RounderMock ¶
type RounderMock struct {
RoundIndex int64
RoundTimeStamp time.Time
RoundTimeDuration time.Duration
}
RounderMock -
func (*RounderMock) IsInterfaceNil ¶
func (rndm *RounderMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*RounderMock) RemainingTime ¶
RemainingTime -
func (*RounderMock) TimeDuration ¶
func (rndm *RounderMock) TimeDuration() time.Duration
TimeDuration -
func (*RounderMock) UpdateRound ¶
func (rndm *RounderMock) UpdateRound(genesisRoundTimeStamp time.Time, timeStamp time.Time)
UpdateRound -
type SCProcessorMock ¶
type SCProcessorMock struct {
ComputeTransactionTypeCalled func(tx data.TransactionHandler) (process.TransactionType, error)
ExecuteSmartContractTransactionCalled func(tx data.TransactionHandler, acntSrc, acntDst state.UserAccountHandler) error
DeploySmartContractCalled func(tx data.TransactionHandler, acntSrc state.UserAccountHandler) error
ProcessSmartContractResultCalled func(scr *smartContractResult.SmartContractResult) error
}
SCProcessorMock -
func (*SCProcessorMock) ComputeTransactionType ¶
func (sc *SCProcessorMock) ComputeTransactionType( tx data.TransactionHandler, ) (process.TransactionType, error)
ComputeTransactionType -
func (*SCProcessorMock) DeploySmartContract ¶
func (sc *SCProcessorMock) DeploySmartContract( tx data.TransactionHandler, acntSrc state.UserAccountHandler, ) error
DeploySmartContract -
func (*SCProcessorMock) ExecuteSmartContractTransaction ¶
func (sc *SCProcessorMock) ExecuteSmartContractTransaction( tx data.TransactionHandler, acntSrc, acntDst state.UserAccountHandler, ) error
ExecuteSmartContractTransaction -
func (*SCProcessorMock) IsInterfaceNil ¶
func (sc *SCProcessorMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*SCProcessorMock) ProcessSmartContractResult ¶
func (sc *SCProcessorMock) ProcessSmartContractResult(scr *smartContractResult.SmartContractResult) error
ProcessSmartContractResult -
type SCToProtocolStub ¶
SCToProtocolStub -
func (*SCToProtocolStub) IsInterfaceNil ¶
func (s *SCToProtocolStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*SCToProtocolStub) UpdateProtocol ¶
func (s *SCToProtocolStub) UpdateProtocol(body *block.Body, nonce uint64) error
UpdateProtocol -
type ScQueryStub ¶
type ScQueryStub struct {
ExecuteQueryCalled func(query *process.SCQuery) (*vmcommon.VMOutput, error)
ComputeScCallGasLimitHandler func(tx *transaction.Transaction) (uint64, error)
}
ScQueryStub -
func (*ScQueryStub) ComputeScCallGasLimit ¶
func (s *ScQueryStub) ComputeScCallGasLimit(tx *transaction.Transaction) (uint64, error)
ComputeScCallGasLimit --
func (*ScQueryStub) ExecuteQuery ¶
ExecuteQuery -
type ServiceContainerMock ¶
type ServiceContainerMock struct {
IndexerCalled func() indexer.Indexer
TPSBenchmarkCalled func() statistics.TPSBenchmark
}
ServiceContainerMock is a mock implementation of the Core interface
func (*ServiceContainerMock) Indexer ¶
func (scm *ServiceContainerMock) Indexer() indexer.Indexer
Indexer returns a mock implementation for core.Indexer
func (*ServiceContainerMock) IsInterfaceNil ¶
func (scm *ServiceContainerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ServiceContainerMock) TPSBenchmark ¶
func (scm *ServiceContainerMock) TPSBenchmark() statistics.TPSBenchmark
TPSBenchmark returns a mock implementation for core.TPSBenchmark
type ShardIdHasMapMock ¶
type ShardIdHasMapMock 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)
}
ShardIdHasMapMock -
func (*ShardIdHasMapMock) IsInterfaceNil ¶
func (sihsm *ShardIdHasMapMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ShardIdHasMapMock) Load ¶
func (sihsm *ShardIdHasMapMock) Load(shardId uint32) ([]byte, bool)
Load -
func (*ShardIdHasMapMock) Range ¶
func (sihsm *ShardIdHasMapMock) Range(f func(shardId uint32, hash []byte) bool)
Range -
func (*ShardIdHasMapMock) Store ¶
func (sihsm *ShardIdHasMapMock) Store(shardId uint32, hash []byte)
Store -
type ShardedDataStub ¶
type ShardedDataStub struct {
RegisterHandlerCalled func(func(key []byte))
ShardDataStoreCalled func(cacheId string) (c storage.Cacher)
AddDataCalled func(key []byte, data interface{}, cacheId string)
SearchFirstDataCalled func(key []byte) (value interface{}, ok bool)
RemoveDataCalled func(key []byte, cacheId string)
RemoveDataFromAllShardsCalled func(key []byte)
MergeShardStoresCalled func(sourceCacheId, destCacheId string)
MoveDataCalled func(sourceCacheId, destCacheId string, key [][]byte)
ClearCalled func()
ClearShardStoreCalled func(cacheId string)
RemoveSetOfDataFromPoolCalled func(keys [][]byte, destCacheId string)
CreateShardStoreCalled func(destCacheId string)
}
ShardedDataStub -
func (*ShardedDataStub) AddData ¶
func (sd *ShardedDataStub) AddData(key []byte, data interface{}, cacheId string)
AddData -
func (*ShardedDataStub) ClearShardStore ¶
func (sd *ShardedDataStub) ClearShardStore(cacheId string)
ClearShardStore -
func (*ShardedDataStub) CreateShardStore ¶
func (sd *ShardedDataStub) CreateShardStore(cacheId string)
CreateShardStore -
func (*ShardedDataStub) IsInterfaceNil ¶
func (sd *ShardedDataStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ShardedDataStub) MergeShardStores ¶
func (sd *ShardedDataStub) MergeShardStores(sourceCacheId, destCacheId string)
MergeShardStores -
func (*ShardedDataStub) RegisterHandler ¶
func (sd *ShardedDataStub) RegisterHandler(handler func(key []byte))
RegisterHandler -
func (*ShardedDataStub) RemoveData ¶
func (sd *ShardedDataStub) RemoveData(key []byte, cacheId string)
RemoveData -
func (*ShardedDataStub) RemoveDataFromAllShards ¶
func (sd *ShardedDataStub) RemoveDataFromAllShards(key []byte)
RemoveDataFromAllShards -
func (*ShardedDataStub) RemoveSetOfDataFromPool ¶
func (sd *ShardedDataStub) RemoveSetOfDataFromPool(keys [][]byte, cacheId string)
RemoveSetOfDataFromPool -
func (*ShardedDataStub) SearchFirstData ¶
func (sd *ShardedDataStub) SearchFirstData(key []byte) (value interface{}, ok bool)
SearchFirstData -
func (*ShardedDataStub) ShardDataStore ¶
func (sd *ShardedDataStub) ShardDataStore(cacheId string) (c storage.Cacher)
ShardDataStore -
type SignerMock ¶
type SignerMock struct {
SignStub func(private crypto.PrivateKey, msg []byte) ([]byte, error)
VerifyStub func(public crypto.PublicKey, msg []byte, sig []byte) error
}
SignerMock -
func (*SignerMock) IsInterfaceNil ¶
func (s *SignerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*SignerMock) Sign ¶
func (s *SignerMock) Sign(private crypto.PrivateKey, msg []byte) ([]byte, error)
Sign -
type SingleSignKeyGenMock ¶
type SingleSignKeyGenMock struct {
PublicKeyFromByteArrayCalled func(b []byte) (crypto.PublicKey, error)
SuiteCalled func() crypto.Suite
}
SingleSignKeyGenMock -
func (*SingleSignKeyGenMock) GeneratePair ¶
func (sskgm *SingleSignKeyGenMock) GeneratePair() (crypto.PrivateKey, crypto.PublicKey)
GeneratePair -
func (*SingleSignKeyGenMock) IsInterfaceNil ¶
func (sskgm *SingleSignKeyGenMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*SingleSignKeyGenMock) PrivateKeyFromByteArray ¶
func (sskgm *SingleSignKeyGenMock) PrivateKeyFromByteArray(_ []byte) (crypto.PrivateKey, error)
PrivateKeyFromByteArray -
func (*SingleSignKeyGenMock) PublicKeyFromByteArray ¶
func (sskgm *SingleSignKeyGenMock) PublicKeyFromByteArray(b []byte) (crypto.PublicKey, error)
PublicKeyFromByteArray -
func (*SingleSignKeyGenMock) Suite ¶
func (sskgm *SingleSignKeyGenMock) Suite() crypto.Suite
Suite -
type SingleSignPublicKey ¶
SingleSignPublicKey -
func (*SingleSignPublicKey) IsInterfaceNil ¶
func (sspk *SingleSignPublicKey) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*SingleSignPublicKey) ToByteArray ¶
func (sspk *SingleSignPublicKey) ToByteArray() ([]byte, error)
ToByteArray -
type SmartContractResultsProcessorMock ¶
type SmartContractResultsProcessorMock struct {
ProcessSmartContractResultCalled func(scr *smartContractResult.SmartContractResult) error
}
SmartContractResultsProcessorMock -
func (*SmartContractResultsProcessorMock) IsInterfaceNil ¶
func (scrp *SmartContractResultsProcessorMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*SmartContractResultsProcessorMock) ProcessSmartContractResult ¶
func (scrp *SmartContractResultsProcessorMock) ProcessSmartContractResult(scr *smartContractResult.SmartContractResult) error
ProcessSmartContractResult -
type StorageBootstrapperMock ¶
type StorageBootstrapperMock struct {
LoadFromStorageCalled func() error
}
StorageBootstrapperMock -
func (*StorageBootstrapperMock) GetHighestBlockNonce ¶
func (sbm *StorageBootstrapperMock) GetHighestBlockNonce() uint64
GetHighestBlockNonce -
func (*StorageBootstrapperMock) IsInterfaceNil ¶
func (sbm *StorageBootstrapperMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*StorageBootstrapperMock) LoadFromStorage ¶
func (sbm *StorageBootstrapperMock) LoadFromStorage() error
LoadFromStorage -
type StorerMock ¶
type StorerMock struct {
// contains filtered or unexported fields
}
StorerMock -
func (*StorerMock) GetFromEpoch ¶
func (sm *StorerMock) GetFromEpoch(key []byte, _ uint32) ([]byte, error)
GetFromEpoch -
func (*StorerMock) HasInEpoch ¶
func (sm *StorerMock) HasInEpoch(_ []byte, _ uint32) error
HasInEpoch -
func (*StorerMock) IsInterfaceNil ¶
func (sm *StorerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*StorerMock) SearchFirst ¶
func (sm *StorerMock) SearchFirst(_ []byte) ([]byte, error)
SearchFirst -
type StorerStub ¶
type StorerStub struct {
PutCalled func(key, data []byte) error
GetCalled func(key []byte) ([]byte, error)
GetFromEpochCalled func(key []byte, epoch uint32) ([]byte, error)
HasCalled func(key []byte) error
HasInEpochCalled func(key []byte, epoch uint32) error
SearchFirstCalled func(key []byte) ([]byte, error)
RemoveCalled func(key []byte) error
ClearCacheCalled func()
DestroyUnitCalled func() error
}
StorerStub -
func (*StorerStub) GetFromEpoch ¶
func (ss *StorerStub) GetFromEpoch(key []byte, epoch uint32) ([]byte, error)
GetFromEpoch -
func (*StorerStub) HasInEpoch ¶
func (ss *StorerStub) HasInEpoch(key []byte, epoch uint32) error
HasInEpoch -
func (*StorerStub) IsInterfaceNil ¶
func (ss *StorerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*StorerStub) SearchFirst ¶
func (ss *StorerStub) SearchFirst(key []byte) ([]byte, error)
SearchFirst -
type SyncStarterStub ¶
type SyncStarterStub struct {
SyncBlockCalled func() error
}
SyncStarterStub -
type SyncTimerMock ¶
type SyncTimerMock struct {
ClockOffsetCalled func() time.Duration
CurrentTimeCalled func() time.Time
}
SyncTimerMock mocks the implementation for a SyncTimer
func (SyncTimerMock) ClockOffset ¶
func (stm SyncTimerMock) ClockOffset() time.Duration
ClockOffset method gets the current time offset
func (SyncTimerMock) CurrentTime ¶
func (stm SyncTimerMock) CurrentTime() time.Time
CurrentTime method gets the current time on which is added the current offset
func (SyncTimerMock) FormattedCurrentTime ¶
func (stm SyncTimerMock) FormattedCurrentTime() string
FormattedCurrentTime method gets the formatted current time on which is added a given offset
func (*SyncTimerMock) IsInterfaceNil ¶
func (stm *SyncTimerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (SyncTimerMock) StartSync ¶
func (stm SyncTimerMock) StartSync()
StartSync method does the time synchronization at every syncPeriod time elapsed. This should be started as a go routine
type TemporaryAccountsHandlerMock ¶
type TemporaryAccountsHandlerMock struct {
AddTempAccountCalled func(address []byte, balance *big.Int, nonce uint64)
CleanTempAccountsCalled func()
TempAccountCalled func(address []byte) state.AccountHandler
}
TemporaryAccountsHandlerMock -
func (*TemporaryAccountsHandlerMock) AddTempAccount ¶
func (tahm *TemporaryAccountsHandlerMock) AddTempAccount(address []byte, balance *big.Int, nonce uint64)
AddTempAccount -
func (*TemporaryAccountsHandlerMock) CleanTempAccounts ¶
func (tahm *TemporaryAccountsHandlerMock) CleanTempAccounts()
CleanTempAccounts -
func (*TemporaryAccountsHandlerMock) IsInterfaceNil ¶
func (tahm *TemporaryAccountsHandlerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*TemporaryAccountsHandlerMock) TempAccount ¶
func (tahm *TemporaryAccountsHandlerMock) TempAccount(address []byte) state.AccountHandler
TempAccount -
type TopicAntiFloodStub ¶
TopicAntiFloodStub -
func (*TopicAntiFloodStub) Accumulate ¶
func (t *TopicAntiFloodStub) Accumulate(identifier string, topic string) bool
Accumulate -
func (*TopicAntiFloodStub) IsInterfaceNil ¶
func (t *TopicAntiFloodStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*TopicAntiFloodStub) ResetForTopic ¶
func (t *TopicAntiFloodStub) ResetForTopic(_ string)
ResetForTopic -
func (*TopicAntiFloodStub) SetMaxMessagesForTopic ¶
func (t *TopicAntiFloodStub) SetMaxMessagesForTopic(_ string, _ uint32)
SetMaxMessagesForTopic -
type TopicHandlerStub ¶
type TopicHandlerStub struct {
HasTopicCalled func(name string) bool
CreateTopicCalled func(name string, createChannelForTopic bool) error
RegisterMessageProcessorCalled func(topic string, handler p2p.MessageProcessor) error
}
TopicHandlerStub -
func (*TopicHandlerStub) CreateTopic ¶
func (ths *TopicHandlerStub) CreateTopic(name string, createChannelForTopic bool) error
CreateTopic -
func (*TopicHandlerStub) HasTopic ¶
func (ths *TopicHandlerStub) HasTopic(name string) bool
HasTopic -
func (*TopicHandlerStub) IsInterfaceNil ¶
func (ths *TopicHandlerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*TopicHandlerStub) RegisterMessageProcessor ¶
func (ths *TopicHandlerStub) RegisterMessageProcessor(topic string, handler p2p.MessageProcessor) error
RegisterMessageProcessor -
type TransactionCoordinatorMock ¶
type TransactionCoordinatorMock struct {
ComputeTransactionTypeCalled func(tx data.TransactionHandler) (process.TransactionType, error)
RequestMiniBlocksCalled func(header data.HeaderHandler)
RequestBlockTransactionsCalled func(body *block.Body)
IsDataPreparedForProcessingCalled func(haveTime func() time.Duration) error
SaveBlockDataToStorageCalled func(body *block.Body) error
RestoreBlockDataFromStorageCalled func(body *block.Body) (int, error)
RemoveBlockDataFromPoolCalled func(body *block.Body) error
ProcessBlockTransactionCalled func(body *block.Body, haveTime func() time.Duration) error
CreateBlockStartedCalled func()
CreateMbsAndProcessCrossShardTransactionsDstMeCalled func(
header data.HeaderHandler,
processedMiniBlocksHashes map[string]struct{},
haveTime func() bool) (block.MiniBlockSlice, uint32, bool, error)
CreateMbsAndProcessTransactionsFromMeCalled func(haveTime func() bool) block.MiniBlockSlice
CreateMarshalizedDataCalled func(body *block.Body) map[string][][]byte
GetAllCurrentUsedTxsCalled func(blockType block.Type) map[string]data.TransactionHandler
VerifyCreatedBlockTransactionsCalled func(hdr data.HeaderHandler, body *block.Body) error
}
TransactionCoordinatorMock -
func (*TransactionCoordinatorMock) ComputeTransactionType ¶
func (tcm *TransactionCoordinatorMock) ComputeTransactionType(tx data.TransactionHandler) (process.TransactionType, error)
ComputeTransactionType -
func (*TransactionCoordinatorMock) CreateBlockStarted ¶
func (tcm *TransactionCoordinatorMock) CreateBlockStarted()
CreateBlockStarted -
func (*TransactionCoordinatorMock) CreateMarshalizedData ¶
func (tcm *TransactionCoordinatorMock) CreateMarshalizedData(body *block.Body) map[string][][]byte
CreateMarshalizedData -
func (*TransactionCoordinatorMock) CreateMbsAndProcessCrossShardTransactionsDstMe ¶
func (tcm *TransactionCoordinatorMock) CreateMbsAndProcessCrossShardTransactionsDstMe( header data.HeaderHandler, processedMiniBlocksHashes map[string]struct{}, haveTime func() bool, ) (block.MiniBlockSlice, uint32, bool, error)
CreateMbsAndProcessCrossShardTransactionsDstMe -
func (*TransactionCoordinatorMock) CreateMbsAndProcessTransactionsFromMe ¶
func (tcm *TransactionCoordinatorMock) CreateMbsAndProcessTransactionsFromMe(haveTime func() bool) block.MiniBlockSlice
CreateMbsAndProcessTransactionsFromMe -
func (*TransactionCoordinatorMock) CreateReceiptsHash ¶
func (tcm *TransactionCoordinatorMock) CreateReceiptsHash() ([]byte, error)
CreateReceiptsHash -
func (*TransactionCoordinatorMock) GetAllCurrentUsedTxs ¶
func (tcm *TransactionCoordinatorMock) GetAllCurrentUsedTxs(blockType block.Type) map[string]data.TransactionHandler
GetAllCurrentUsedTxs -
func (*TransactionCoordinatorMock) IsDataPreparedForProcessing ¶
func (tcm *TransactionCoordinatorMock) IsDataPreparedForProcessing(haveTime func() time.Duration) error
IsDataPreparedForProcessing -
func (*TransactionCoordinatorMock) IsInterfaceNil ¶
func (tcm *TransactionCoordinatorMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*TransactionCoordinatorMock) ProcessBlockTransaction ¶
func (tcm *TransactionCoordinatorMock) ProcessBlockTransaction(body *block.Body, haveTime func() time.Duration) error
ProcessBlockTransaction -
func (*TransactionCoordinatorMock) RemoveBlockDataFromPool ¶
func (tcm *TransactionCoordinatorMock) RemoveBlockDataFromPool(body *block.Body) error
RemoveBlockDataFromPool -
func (*TransactionCoordinatorMock) RequestBlockTransactions ¶
func (tcm *TransactionCoordinatorMock) RequestBlockTransactions(body *block.Body)
RequestBlockTransactions -
func (*TransactionCoordinatorMock) RequestMiniBlocks ¶
func (tcm *TransactionCoordinatorMock) RequestMiniBlocks(header data.HeaderHandler)
RequestMiniBlocks -
func (*TransactionCoordinatorMock) RestoreBlockDataFromStorage ¶
func (tcm *TransactionCoordinatorMock) RestoreBlockDataFromStorage(body *block.Body) (int, error)
RestoreBlockDataFromStorage -
func (*TransactionCoordinatorMock) SaveBlockDataToStorage ¶
func (tcm *TransactionCoordinatorMock) SaveBlockDataToStorage(body *block.Body) error
SaveBlockDataToStorage -
func (*TransactionCoordinatorMock) VerifyCreatedBlockTransactions ¶
func (tcm *TransactionCoordinatorMock) VerifyCreatedBlockTransactions(hdr data.HeaderHandler, body *block.Body) error
VerifyCreatedBlockTransactions -
type TransactionInterceptorMock ¶
type TransactionInterceptorMock struct {
IsChecked bool
IsVerified bool
RcvShardVal uint32
SndShardVal uint32
IsAddressedToOtherShardsVal bool
AddrConverter state.AddressConverter
Tx *transaction.Transaction
// contains filtered or unexported fields
}
TransactionInterceptorMock -
func (*TransactionInterceptorMock) AddressConverter ¶
func (tim *TransactionInterceptorMock) AddressConverter() state.AddressConverter
AddressConverter -
func (*TransactionInterceptorMock) Check ¶
func (tim *TransactionInterceptorMock) Check() bool
Check -
func (*TransactionInterceptorMock) GetTransaction ¶
func (tim *TransactionInterceptorMock) GetTransaction() *transaction.Transaction
GetTransaction -
func (*TransactionInterceptorMock) Hash ¶
func (tim *TransactionInterceptorMock) Hash() []byte
Hash -
func (*TransactionInterceptorMock) IsAddressedToOtherShards ¶
func (tim *TransactionInterceptorMock) IsAddressedToOtherShards() bool
IsAddressedToOtherShards -
func (*TransactionInterceptorMock) IsInterfaceNil ¶
func (tim *TransactionInterceptorMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*TransactionInterceptorMock) RcvShard ¶
func (tim *TransactionInterceptorMock) RcvShard() uint32
RcvShard -
func (*TransactionInterceptorMock) SetAddressConverter ¶
func (tim *TransactionInterceptorMock) SetAddressConverter(converter state.AddressConverter)
SetAddressConverter -
func (*TransactionInterceptorMock) SetHash ¶
func (tim *TransactionInterceptorMock) SetHash(hash []byte)
SetHash -
func (*TransactionInterceptorMock) SndShard ¶
func (tim *TransactionInterceptorMock) SndShard() uint32
SndShard -
func (*TransactionInterceptorMock) VerifySig ¶
func (tim *TransactionInterceptorMock) VerifySig() bool
VerifySig -
type TransactionPoolMock ¶
type TransactionPoolMock struct {
RegisterTransactionHandlerCalled func(transactionHandler func(txHash []byte))
RemoveTransactionsFromPoolCalled func(txHashes [][]byte, destShardID uint32)
MiniPoolTxStoreCalled func(shardID uint32) (c storage.Cacher)
}
TransactionPoolMock -
func (*TransactionPoolMock) MiniPoolTxStore ¶
func (tpm *TransactionPoolMock) MiniPoolTxStore(shardID uint32) (c storage.Cacher)
MiniPoolTxStore -
func (*TransactionPoolMock) RegisterTransactionHandler ¶
func (tpm *TransactionPoolMock) RegisterTransactionHandler(transactionHandler func(txHash []byte))
RegisterTransactionHandler -
func (*TransactionPoolMock) RemoveTransactionsFromPool ¶
func (tpm *TransactionPoolMock) RemoveTransactionsFromPool(txHashes [][]byte, destShardID uint32)
RemoveTransactionsFromPool -
type TrieStub ¶
type TrieStub struct {
GetCalled func(key []byte) ([]byte, error)
UpdateCalled func(key, value []byte) error
DeleteCalled func(key []byte) error
RootCalled func() ([]byte, error)
ProveCalled func(key []byte) ([][]byte, error)
VerifyProofCalled func(proofs [][]byte, key []byte) (bool, error)
CommitCalled func() error
RecreateCalled func(root []byte) (data.Trie, error)
DeepCloneCalled func() (data.Trie, error)
CancelPruneCalled func(rootHash []byte, identifier data.TriePruningIdentifier)
PruneCalled func(rootHash []byte, identifier data.TriePruningIdentifier) error
ResetOldHashesCalled func() [][]byte
AppendToOldHashesCalled func([][]byte)
SnapshotCalled func() error
GetSerializedNodesCalled func([]byte, uint64) ([][]byte, error)
DatabaseCalled func() data.DBWriteCacher
}
TrieStub -
func (*TrieStub) AppendToOldHashes ¶
AppendToOldHashes appends the given hashes to the trie's oldHashes variable
func (*TrieStub) CancelPrune ¶
func (ts *TrieStub) CancelPrune(rootHash []byte, identifier data.TriePruningIdentifier)
CancelPrune invalidates the hashes that correspond to the given root hash from the eviction waiting list
func (*TrieStub) GetAllLeaves ¶
GetAllLeaves -
func (*TrieStub) GetSerializedNodes ¶
GetSerializedNodes -
func (*TrieStub) IsInterfaceNil ¶
IsInterfaceNil returns true if there is no value under the interface
func (*TrieStub) Prune ¶
func (ts *TrieStub) Prune(rootHash []byte, identifier data.TriePruningIdentifier) error
Prune removes from the database all the old hashes that correspond to the given root hash
func (*TrieStub) ResetOldHashes ¶
ResetOldHashes resets the oldHashes and oldRoot variables and returns the old hashes
type TxForCurrentBlockStub ¶
type TxForCurrentBlockStub struct {
CleanCalled func()
GetTxCalled func(txHash []byte) (data.TransactionHandler, error)
AddTxCalled func(txHash []byte, tx data.TransactionHandler)
}
TxForCurrentBlockStub -
func (*TxForCurrentBlockStub) AddTx ¶
func (t *TxForCurrentBlockStub) AddTx(txHash []byte, tx data.TransactionHandler)
AddTx -
func (*TxForCurrentBlockStub) GetTx ¶
func (t *TxForCurrentBlockStub) GetTx(txHash []byte) (data.TransactionHandler, error)
GetTx -
func (*TxForCurrentBlockStub) IsInterfaceNil ¶
func (t *TxForCurrentBlockStub) IsInterfaceNil() bool
IsInterfaceNil -
type TxPoolsCleanerMock ¶
type TxPoolsCleanerMock struct {
CleanCalled func(duration time.Duration) (bool, error)
NumRemovedTxsCalled func() uint64
}
TxPoolsCleanerMock -
func (*TxPoolsCleanerMock) Clean ¶
func (tpc *TxPoolsCleanerMock) Clean(_ time.Duration) (bool, error)
Clean will check if in pools exits transactions with nonce low that transaction sender account nonce and if tx have low nonce will be removed from pools
func (*TxPoolsCleanerMock) IsInterfaceNil ¶
func (tpc *TxPoolsCleanerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*TxPoolsCleanerMock) NumRemovedTxs ¶
func (tpc *TxPoolsCleanerMock) NumRemovedTxs() uint64
NumRemovedTxs will return the number of removed txs from pools
type TxProcessorMock ¶
type TxProcessorMock struct {
ProcessTransactionCalled func(transaction *transaction.Transaction) error
SetBalancesToTrieCalled func(accBalance map[string]*big.Int) (rootHash []byte, err error)
ProcessSmartContractResultCalled func(scr *smartContractResult.SmartContractResult) error
}
TxProcessorMock -
func (*TxProcessorMock) IsInterfaceNil ¶
func (tp *TxProcessorMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*TxProcessorMock) ProcessSmartContractResult ¶
func (tp *TxProcessorMock) ProcessSmartContractResult(scr *smartContractResult.SmartContractResult) error
ProcessSmartContractResult -
func (*TxProcessorMock) ProcessTransaction ¶
func (tp *TxProcessorMock) ProcessTransaction(transaction *transaction.Transaction) error
ProcessTransaction -
func (*TxProcessorMock) SetBalancesToTrie ¶
func (tp *TxProcessorMock) SetBalancesToTrie(accBalance map[string]*big.Int) (rootHash []byte, err error)
SetBalancesToTrie -
type TxTypeHandlerMock ¶
type TxTypeHandlerMock struct {
ComputeTransactionTypeCalled func(tx data.TransactionHandler) (process.TransactionType, error)
}
TxTypeHandlerMock -
func (*TxTypeHandlerMock) ComputeTransactionType ¶
func (th *TxTypeHandlerMock) ComputeTransactionType(tx data.TransactionHandler) (process.TransactionType, error)
ComputeTransactionType -
func (*TxTypeHandlerMock) IsInterfaceNil ¶
func (th *TxTypeHandlerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type TxValidatorHandlerStub ¶
type TxValidatorHandlerStub struct {
SenderShardIdCalled func() uint32
ReceiverShardIdCalled func() uint32
NonceCalled func() uint64
SenderAddressCalled func() state.AddressContainer
FeeCalled func() *big.Int
}
TxValidatorHandlerStub -
func (*TxValidatorHandlerStub) ReceiverShardId ¶
func (tvhs *TxValidatorHandlerStub) ReceiverShardId() uint32
ReceiverShardId -
func (*TxValidatorHandlerStub) SenderAddress ¶
func (tvhs *TxValidatorHandlerStub) SenderAddress() state.AddressContainer
SenderAddress -
func (*TxValidatorHandlerStub) SenderShardId ¶
func (tvhs *TxValidatorHandlerStub) SenderShardId() uint32
SenderShardId -
type TxValidatorStub ¶
type TxValidatorStub struct {
CheckTxValidityCalled func(txValidatorHandler process.TxValidatorHandler) error
RejectedTxsCalled func() uint64
}
TxValidatorStub -
func (*TxValidatorStub) CheckTxValidity ¶
func (t *TxValidatorStub) CheckTxValidity(txValidatorHandler process.TxValidatorHandler) error
CheckTxValidity -
func (*TxValidatorStub) IsInterfaceNil ¶
func (t *TxValidatorStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
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 UnsignedTxHandlerMock ¶
type UnsignedTxHandlerMock struct {
CleanProcessedUtxsCalled func()
ProcessTransactionFeeCalled func(cost *big.Int, hash []byte)
CreateAllUTxsCalled func() []data.TransactionHandler
VerifyCreatedUTxsCalled func() error
AddTxFeeFromBlockCalled func(tx data.TransactionHandler)
}
UnsignedTxHandlerMock -
func (*UnsignedTxHandlerMock) AddRewardTxFromBlock ¶
func (ut *UnsignedTxHandlerMock) AddRewardTxFromBlock(tx data.TransactionHandler)
AddRewardTxFromBlock -
func (*UnsignedTxHandlerMock) CleanProcessedUTxs ¶
func (ut *UnsignedTxHandlerMock) CleanProcessedUTxs()
CleanProcessedUTxs -
func (*UnsignedTxHandlerMock) CreateAllUTxs ¶
func (ut *UnsignedTxHandlerMock) CreateAllUTxs() []data.TransactionHandler
CreateAllUTxs -
func (*UnsignedTxHandlerMock) IsInterfaceNil ¶
func (ut *UnsignedTxHandlerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*UnsignedTxHandlerMock) ProcessTransactionFee ¶
func (ut *UnsignedTxHandlerMock) ProcessTransactionFee(cost *big.Int, hash []byte)
ProcessTransactionFee -
func (*UnsignedTxHandlerMock) VerifyCreatedUTxs ¶
func (ut *UnsignedTxHandlerMock) VerifyCreatedUTxs() error
VerifyCreatedUTxs -
type UserAccountStub ¶
type UserAccountStub struct {
AddressContainerCalled func() state.AddressContainer
GetCodeHashCalled func() []byte
SetCodeHashCalled func([]byte)
SetCodeHashWithJournalCalled func([]byte) error
GetCodeCalled func() []byte
SetCodeCalled func(code []byte)
SetNonceCalled func(nonce uint64)
GetNonceCalled func() uint64
SetNonceWithJournalCalled func(nonce uint64) error
GetRootHashCalled func() []byte
DataTrieCalled func() data.Trie
DataTrieTrackerCalled func() state.DataTrieTracker
ClaimDeveloperRewardsCalled func(sndAddress []byte) (*big.Int, error)
ChangeOwnerAddressCalled func(sndAddress []byte, newAddress []byte) error
AddToDeveloperRewardCalled func(value *big.Int) error
AddToBalanceCalled func(value *big.Int) error
SubFromBalanceCalled func(value *big.Int) error
GetBalanceCalled func() *big.Int
SetOwnerAddressWithJournalCalled func(ownerAddress []byte) error
GetOwnerAddressCalled func() []byte
SetRootHashCalled func([]byte)
SetDataTrieCalled func(trie data.Trie)
}
UserAccountStub -
func (*UserAccountStub) AddToBalance ¶
func (u *UserAccountStub) AddToBalance(value *big.Int) error
AddToBalance -
func (*UserAccountStub) AddToDeveloperReward ¶
func (u *UserAccountStub) AddToDeveloperReward(value *big.Int) error
AddToDeveloperReward -
func (*UserAccountStub) AddressContainer ¶
func (u *UserAccountStub) AddressContainer() state.AddressContainer
AddressContainer -
func (*UserAccountStub) ChangeOwnerAddress ¶
func (u *UserAccountStub) ChangeOwnerAddress(sndAddress []byte, newAddress []byte) error
ChangeOwnerAddress -
func (*UserAccountStub) ClaimDeveloperRewards ¶
func (u *UserAccountStub) ClaimDeveloperRewards(sndAddress []byte) (*big.Int, error)
ClaimDeveloperRewards -
func (*UserAccountStub) DataTrieTracker ¶
func (u *UserAccountStub) DataTrieTracker() state.DataTrieTracker
DataTrieTracker -
func (*UserAccountStub) GetOwnerAddress ¶
func (u *UserAccountStub) GetOwnerAddress() []byte
GetOwnerAddress -
func (*UserAccountStub) IsInterfaceNil ¶
func (u *UserAccountStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*UserAccountStub) SetCodeHash ¶
func (u *UserAccountStub) SetCodeHash(code []byte)
SetCodeHash -
func (*UserAccountStub) SetCodeHashWithJournal ¶ added in v1.0.89
func (u *UserAccountStub) SetCodeHashWithJournal(codeHash []byte) error
SetCodeHashWithJournal -
func (*UserAccountStub) SetDataTrie ¶
func (u *UserAccountStub) SetDataTrie(trie data.Trie)
SetDataTrie -
func (*UserAccountStub) SetNonce ¶ added in v1.0.89
func (u *UserAccountStub) SetNonce(nonce uint64)
SetNonce -
func (*UserAccountStub) SetNonceWithJournal ¶ added in v1.0.89
func (u *UserAccountStub) SetNonceWithJournal(nonce uint64) error
SetNonceWithJournal -
func (*UserAccountStub) SetOwnerAddressWithJournal ¶ added in v1.0.89
func (u *UserAccountStub) SetOwnerAddressWithJournal(ownerAddress []byte) error
SetOwnerAddressWithJournal -
func (*UserAccountStub) SetRootHash ¶
func (u *UserAccountStub) SetRootHash(hash []byte)
SetRootHash -
func (*UserAccountStub) SubFromBalance ¶
func (u *UserAccountStub) SubFromBalance(value *big.Int) error
SubFromBalance -
type VMContainerMock ¶
type VMContainerMock struct {
GetCalled func(key []byte) (vmcommon.VMExecutionHandler, error)
AddCalled func(key []byte, val vmcommon.VMExecutionHandler) error
AddMultipleCalled func(keys [][]byte, preprocessors []vmcommon.VMExecutionHandler) error
ReplaceCalled func(key []byte, val vmcommon.VMExecutionHandler) error
RemoveCalled func(key []byte)
LenCalled func() int
KeysCalled func() [][]byte
}
VMContainerMock -
func (*VMContainerMock) Add ¶
func (v *VMContainerMock) Add(key []byte, val vmcommon.VMExecutionHandler) error
Add -
func (*VMContainerMock) AddMultiple ¶
func (v *VMContainerMock) AddMultiple(keys [][]byte, vms []vmcommon.VMExecutionHandler) error
AddMultiple -
func (*VMContainerMock) Get ¶
func (v *VMContainerMock) Get(key []byte) (vmcommon.VMExecutionHandler, error)
Get -
func (*VMContainerMock) IsInterfaceNil ¶
func (v *VMContainerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*VMContainerMock) Replace ¶
func (v *VMContainerMock) Replace(key []byte, val vmcommon.VMExecutionHandler) error
Replace -
type VMExecutionHandlerStub ¶
type VMExecutionHandlerStub struct {
RunSmartContractCreateCalled func(input *vmcommon.ContractCreateInput) (*vmcommon.VMOutput, error)
RunSmartContractCallCalled func(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error)
}
VMExecutionHandlerStub -
func (*VMExecutionHandlerStub) RunSmartContractCall ¶
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 ¶
func (vm *VMExecutionHandlerStub) RunSmartContractCreate(input *vmcommon.ContractCreateInput) (*vmcommon.VMOutput, error)
RunSmartContractCreate computes how a smart contract creation should be performed
type ValidatorMock ¶
type ValidatorMock struct {
PubKeyCalled func() []byte
AddressCalled func() []byte
// contains filtered or unexported fields
}
ValidatorMock -
func NewValidatorMock ¶
func NewValidatorMock(pubkey []byte, address []byte) *ValidatorMock
NewValidatorMock -
type ValidatorSettingsStub ¶
type ValidatorSettingsStub struct {
}
ValidatorSettingsStub -
func (*ValidatorSettingsStub) GenesisNodePrice ¶
func (v *ValidatorSettingsStub) GenesisNodePrice() *big.Int
GenesisNodePrice -
func (*ValidatorSettingsStub) IsInterfaceNil ¶
func (v *ValidatorSettingsStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*ValidatorSettingsStub) UnBondPeriod ¶
func (v *ValidatorSettingsStub) UnBondPeriod() uint64
UnBondPeriod -
type ValidatorStatisticsProcessorStub ¶
type ValidatorStatisticsProcessorStub struct {
UpdatePeerStateCalled func(header data.HeaderHandler) ([]byte, error)
RevertPeerStateCalled func(header data.HeaderHandler) error
GetPeerAccountCalled func(address []byte) (state.PeerAccountHandler, error)
RootHashCalled func() ([]byte, error)
ResetValidatorStatisticsAtNewEpochCalled func(vInfos map[uint32][]*state.ValidatorInfo) error
GetValidatorInfoForRootHashCalled func(rootHash []byte) (map[uint32][]*state.ValidatorInfo, error)
ProcessCalled func(vid data.ValidatorInfoHandler) error
}
ValidatorStatisticsProcessorStub -
func (*ValidatorStatisticsProcessorStub) GetPeerAccount ¶
func (vsp *ValidatorStatisticsProcessorStub) GetPeerAccount(address []byte) (state.PeerAccountHandler, error)
GetPeerAccount -
func (*ValidatorStatisticsProcessorStub) GetValidatorInfoForRootHash ¶
func (vsp *ValidatorStatisticsProcessorStub) GetValidatorInfoForRootHash(rootHash []byte) (map[uint32][]*state.ValidatorInfo, error)
GetValidatorInfoForRootHash -
func (*ValidatorStatisticsProcessorStub) IsInterfaceNil ¶
func (vsp *ValidatorStatisticsProcessorStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*ValidatorStatisticsProcessorStub) Process ¶
func (vsp *ValidatorStatisticsProcessorStub) Process(vid data.ValidatorInfoHandler) error
Process -
func (*ValidatorStatisticsProcessorStub) ResetValidatorStatisticsAtNewEpoch ¶
func (vsp *ValidatorStatisticsProcessorStub) ResetValidatorStatisticsAtNewEpoch(vInfos map[uint32][]*state.ValidatorInfo) error
ResetValidatorStatisticsAtNewEpoch -
func (*ValidatorStatisticsProcessorStub) RevertPeerState ¶
func (vsp *ValidatorStatisticsProcessorStub) RevertPeerState(header data.HeaderHandler) error
RevertPeerState -
func (*ValidatorStatisticsProcessorStub) RootHash ¶
func (vsp *ValidatorStatisticsProcessorStub) RootHash() ([]byte, error)
RootHash -
func (*ValidatorStatisticsProcessorStub) UpdatePeerState ¶
func (vsp *ValidatorStatisticsProcessorStub) UpdatePeerState(header data.HeaderHandler, _ map[string]data.HeaderHandler) ([]byte, error)
UpdatePeerState -
type ValidityAttesterStub ¶
type ValidityAttesterStub struct {
CheckBlockAgainstRounderCalled func(headerHandler data.HeaderHandler) error
CheckBlockAgainstFinalCalled func(headerHandler data.HeaderHandler) error
}
ValidityAttesterStub -
func (*ValidityAttesterStub) CheckBlockAgainstFinal ¶
func (vas *ValidityAttesterStub) CheckBlockAgainstFinal(headerHandler data.HeaderHandler) error
CheckBlockAgainstFinal -
func (*ValidityAttesterStub) CheckBlockAgainstRounder ¶
func (vas *ValidityAttesterStub) CheckBlockAgainstRounder(headerHandler data.HeaderHandler) error
CheckBlockAgainstRounder -
func (*ValidityAttesterStub) IsInterfaceNil ¶
func (vas *ValidityAttesterStub) IsInterfaceNil() bool
IsInterfaceNil -
Source Files
¶
- accountTrackerStub.go
- accountWrapperFake.go
- accountsStub.go
- addressConverterFake.go
- addressConverterMock.go
- addressConverterStub.go
- addressMock.go
- appStatusHandlerStub.go
- argumentsParserMock.go
- blackListHandlerStub.go
- blockChainHookHandlerMock.go
- blockChainMock.go
- blockNotarizerHandlerMock.go
- blockNotifierHandlerMock.go
- blockProcessorMock.go
- blockSizeComputationStub.go
- blockSizeThrottlerStub.go
- blockTrackerHandlerMock.go
- blockTrackerMock.go
- bootstrapStorerMock.go
- cacherMock.go
- cacherStub.go
- chainStorerMock.go
- coordinatorStub.go
- dataTrieTrackerStub.go
- endOfEpochTriggerStub.go
- epochEconomicsStub.go
- epochRewardsCreatorStub.go
- epochStartDataCreatorStub.go
- epochValidatorInfoCreatorStub.go
- feeAccumulatorStub.go
- feeHandlerStub.go
- finalityAttesterStub.go
- floodPreventerStub.go
- forkDetectorMock.go
- gasHandlerMock.go
- getHdrHandlerStub.go
- hasherMock.go
- hasherStub.go
- headerHandlerStub.go
- headerResolverMock.go
- headerSigVerifierStub.go
- headerValidatorStub.go
- headersCacherStub.go
- indexerMock.go
- interceptedDataFactoryStub.go
- interceptedDataStub.go
- interceptedTxHandlerStub.go
- interceptorProcessorStub.go
- interceptorStub.go
- interceptorThrottlerStub.go
- interimProcessorContainerMock.go
- intermediateTransactionHandlerMock.go
- marshalizerMock.go
- marshalizerStub.go
- messageHandlerStub.go
- messageSignVerifierMock.go
- messengerStub.go
- miniBlocksResolverMock.go
- multiSigMock.go
- multipleShardsCoordinatorMock.go
- networkConnectionWatcherStub.go
- nilTxValidator.go
- nodesCoordinatorMock.go
- nonceHashConverterMock.go
- objectsContainerStub.go
- oneShardCoordinatorMock.go
- p2pAntifloodHandlerStub.go
- p2pMessageMock.go
- peerAccountHandlerMock.go
- peerChangesHandler.go
- pendingMiniBlocksHandlerStub.go
- poolsHolderMock.go
- poolsHolderStub.go
- poolscleanerMock.go
- preProcessorContainerMock.go
- preprocessorMock.go
- protobufMock.go
- quotaStatusHandlerStub.go
- raterMock.go
- ratingReaderMock.go
- ratingsInfoMock.go
- requestHandlerStub.go
- requestedItemsHandlerStub.go
- resolverStub.go
- resolversContainerStub.go
- resolversFinderStub.go
- rewardTxProcessorMock.go
- rewardsHandlerMock.go
- roundStub.go
- rounderMock.go
- scProcessorMock.go
- scQueryStub.go
- scToProtocolHandlerMock.go
- serviceContainerMock.go
- shardIdHashMapMock.go
- shardedDataStub.go
- signerMock.go
- singleSignMock.go
- smartContractResultProcessorMock.go
- storageBootstrapperMock.go
- storerMock.go
- storerStub.go
- syncStarterStub.go
- syncTimerMock.go
- temporaryAccountsHandlerMock.go
- topicFloodPreventerStub.go
- topicHandlerStub.go
- transactionCoordinatorMock.go
- transactionInterceptorMock.go
- transactionPoolMock.go
- trieStub.go
- txForCurrentBlockMock.go
- txProcessorMock.go
- txTypeHandlerMock.go
- txValidatorHandlerStub.go
- txValidatorStub.go
- uint64ByteSliceConverterMock.go
- uint64SyncMapCacherStub.go
- unsignedTxHandlerMock.go
- userAccountStub.go
- validatorMock.go
- validatorSettingsStub.go
- validatorStatisticsProcessorStub.go
- vmContainerMock.go
- vmExecutionHandlerStub.go