Documentation ¶
Index ¶
- func NewCountingDB() *countingDB
- func NewMultiShardsCoordinatorMock(nrShard uint32) *multipleShardsCoordinatorMock
- func NewNetworkShardingCollectorMock() *networkShardingCollectorMock
- type AccountsFactoryStub
- type AccountsStub
- func (as *AccountsStub) CancelPrune(rootHash []byte, identifier data.TriePruningIdentifier)
- func (as *AccountsStub) Commit() ([]byte, error)
- func (as *AccountsStub) GetAllLeaves(rootHash []byte) (map[string][]byte, error)
- func (as *AccountsStub) GetExistingAccount(addressContainer state.AddressContainer) (state.AccountHandler, error)
- func (as *AccountsStub) IsInterfaceNil() bool
- func (as *AccountsStub) IsPruningEnabled() bool
- func (as *AccountsStub) JournalLen() int
- func (as *AccountsStub) LoadAccount(address state.AddressContainer) (state.AccountHandler, error)
- func (as *AccountsStub) PruneTrie(rootHash []byte, identifier data.TriePruningIdentifier)
- func (as *AccountsStub) RecreateTrie(rootHash []byte) error
- func (as *AccountsStub) RemoveAccount(addressContainer state.AddressContainer) error
- func (as *AccountsStub) RevertToSnapshot(snapshot int) error
- func (as *AccountsStub) RootHash() ([]byte, error)
- func (as *AccountsStub) SaveAccount(account state.AccountHandler) error
- func (as *AccountsStub) SetStateCheckpoint(rootHash []byte)
- func (as *AccountsStub) SnapshotState(rootHash []byte)
- 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) 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) IsInterfaceNil() bool
- 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)
- 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) 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 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 BlockTrackerStub
- func (bts *BlockTrackerStub) AddCrossNotarizedHeader(shardID uint32, crossNotarizedHeader data.HeaderHandler, ...)
- func (bts *BlockTrackerStub) AddSelfNotarizedHeader(shardID uint32, selfNotarizedHeader data.HeaderHandler, ...)
- func (bts *BlockTrackerStub) AddTrackedHeader(header data.HeaderHandler, hash []byte)
- func (bts *BlockTrackerStub) CheckBlockAgainstFinal(headerHandler data.HeaderHandler) error
- func (bts *BlockTrackerStub) CheckBlockAgainstRounder(headerHandler data.HeaderHandler) error
- func (bts *BlockTrackerStub) CleanupHeadersBehindNonce(shardID uint32, selfNotarizedNonce uint64, crossNotarizedNonce uint64)
- func (bts *BlockTrackerStub) CleanupInvalidCrossHeaders(_ uint32, _ uint64)
- func (bts *BlockTrackerStub) ComputeLongestChain(shardID uint32, header data.HeaderHandler) ([]data.HeaderHandler, [][]byte)
- func (bts *BlockTrackerStub) ComputeLongestMetaChainFromLastNotarized() ([]data.HeaderHandler, [][]byte, error)
- func (bts *BlockTrackerStub) ComputeLongestShardsChainsFromLastNotarized() ([]data.HeaderHandler, [][]byte, map[uint32][]data.HeaderHandler, error)
- func (bts *BlockTrackerStub) DisplayTrackedHeaders()
- func (bts *BlockTrackerStub) GetCrossNotarizedHeader(shardID uint32, offset uint64) (data.HeaderHandler, []byte, error)
- func (bts *BlockTrackerStub) GetFinalHeader(shardID uint32) (data.HeaderHandler, []byte, error)
- func (bts *BlockTrackerStub) GetLastCrossNotarizedHeader(shardID uint32) (data.HeaderHandler, []byte, error)
- func (bts *BlockTrackerStub) GetLastCrossNotarizedHeadersForAllShards() (map[uint32]data.HeaderHandler, error)
- func (bts *BlockTrackerStub) GetLastSelfNotarizedHeader(shardID uint32) (data.HeaderHandler, []byte, error)
- func (bts *BlockTrackerStub) GetTrackedHeaders(shardID uint32) ([]data.HeaderHandler, [][]byte)
- func (bts *BlockTrackerStub) GetTrackedHeadersForAllShards() map[uint32][]data.HeaderHandler
- func (bts *BlockTrackerStub) GetTrackedHeadersWithNonce(shardID uint32, nonce uint64) ([]data.HeaderHandler, [][]byte)
- func (bts *BlockTrackerStub) IsInterfaceNil() bool
- func (bts *BlockTrackerStub) IsShardStuck(shardId uint32) bool
- func (bts *BlockTrackerStub) RegisterCrossNotarizedHeadersHandler(...)
- func (bts *BlockTrackerStub) RegisterSelfNotarizedHeadersHandler(...)
- func (bts *BlockTrackerStub) RemoveLastNotarizedHeaders()
- func (bts *BlockTrackerStub) RestoreToGenesis()
- func (bts *BlockTrackerStub) 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 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 (bc *ChainStorerMock) AddStorer(key dataRetriever.UnitType, s storage.Storer)
- func (bc *ChainStorerMock) CloseAll() error
- func (bc *ChainStorerMock) Destroy() error
- func (bc *ChainStorerMock) Get(unitType dataRetriever.UnitType, key []byte) ([]byte, error)
- func (bc *ChainStorerMock) GetAll(unitType dataRetriever.UnitType, keys [][]byte) (map[string][]byte, error)
- func (bc *ChainStorerMock) GetStorer(unitType dataRetriever.UnitType) storage.Storer
- func (bc *ChainStorerMock) Has(unitType dataRetriever.UnitType, key []byte) error
- func (bc *ChainStorerMock) IsInterfaceNil() bool
- func (bc *ChainStorerMock) Put(unitType dataRetriever.UnitType, key []byte, value []byte) error
- 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 EpochStartNotifierStub
- func (esnm *EpochStartNotifierStub) IsInterfaceNil() bool
- func (esnm *EpochStartNotifierStub) NotifyAll(hdr data.HeaderHandler)
- func (esnm *EpochStartNotifierStub) NotifyAllPrepare(metaHeader data.HeaderHandler)
- func (esnm *EpochStartNotifierStub) RegisterHandler(handler epochStart.EpochStartHandler)
- func (esnm *EpochStartNotifierStub) UnregisterHandler(handler epochStart.EpochStartHandler)
- 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) GetRoundsPerEpoch() uint64
- func (e *EpochStartTriggerStub) GetSavedStateKey() []byte
- func (e *EpochStartTriggerStub) IsEpochStart() bool
- func (e *EpochStartTriggerStub) IsInterfaceNil() bool
- func (e *EpochStartTriggerStub) LoadState(_ []byte) error
- func (e *EpochStartTriggerStub) 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) SetRoundsPerEpoch(_ uint64)
- func (e *EpochStartTriggerStub) SetTrigger(_ epochStart.TriggerHandler)
- 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 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 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 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
- func (hsvm *HeaderSigVerifierStub) IsInterfaceNil() bool
- func (hsvm *HeaderSigVerifierStub) VerifyRandSeed(header data.HeaderHandler) error
- func (hsvm *HeaderSigVerifierStub) VerifyRandSeedAndLeaderSignature(header data.HeaderHandler) error
- func (hsvm *HeaderSigVerifierStub) VerifySignature(header data.HeaderHandler) error
- type 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) Keys(shardId uint32) []uint64
- func (hcs *HeadersCacherStub) Len() int
- func (hcs *HeadersCacherStub) MaxSize() int
- func (hcs *HeadersCacherStub) RegisterHandler(handler func(shardHeaderHash []byte))
- func (hcs *HeadersCacherStub) RemoveHeaderByHash(headerHash []byte)
- func (hcs *HeadersCacherStub) RemoveHeaderByNonceAndShardId(hdrNonce uint64, shardId uint32)
- type InterimProcessorContainerMock
- func (ipcm *InterimProcessorContainerMock) Add(key block.Type, val process.IntermediateTransactionHandler) error
- func (ipcm *InterimProcessorContainerMock) AddMultiple(keys []block.Type, preprocessors []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(key block.Type)
- func (ipcm *InterimProcessorContainerMock) Replace(key block.Type, val 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 KeyGenMock
- func (keyGen *KeyGenMock) GeneratePair() (crypto.PrivateKey, crypto.PublicKey)
- func (keyGen *KeyGenMock) IsInterfaceNil() bool
- func (keyGen *KeyGenMock) PrivateKeyFromByteArray(_ []byte) (crypto.PrivateKey, error)
- func (keyGen *KeyGenMock) PublicKeyFromByteArray(_ []byte) (crypto.PublicKey, error)
- func (keyGen *KeyGenMock) Suite() crypto.Suite
- 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 MockDB
- func (MockDB) Close() error
- func (MockDB) Destroy() error
- func (MockDB) DestroyClosed() error
- func (MockDB) Get(_ []byte) ([]byte, error)
- func (MockDB) Has(_ []byte) error
- func (MockDB) Init() error
- func (s MockDB) IsInterfaceNil() bool
- func (MockDB) Put(_, _ []byte) error
- func (MockDB) Remove(_ []byte) error
- type NilAntifloodHandler
- func (nah *NilAntifloodHandler) CanProcessMessage(_ p2p.MessageP2P, _ p2p.PeerID) error
- func (nah *NilAntifloodHandler) CanProcessMessageOnTopic(_ p2p.PeerID, _ string) error
- func (nah *NilAntifloodHandler) IsInterfaceNil() bool
- func (nah *NilAntifloodHandler) ResetForTopic(_ string)
- func (nah *NilAntifloodHandler) SetMaxMessagesForTopic(_ string, _ uint32)
- type NodeShufflerMock
- type NodesCoordinatorCacheStub
- type NodesCoordinatorMock
- func (ncm *NodesCoordinatorMock) ComputeConsensusGroup(randomness []byte, round uint64, shardId uint32, epoch uint32) (validatorsGroup []sharding.Validator, err error)
- func (ncm *NodesCoordinatorMock) ComputeLeaving([]sharding.Validator) []sharding.Validator
- func (ncm *NodesCoordinatorMock) ConsensusGroupSize(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(_ []byte, _ uint32, _ uint32) ([]string, error)
- func (ncm *NodesCoordinatorMock) GetValidatorWithPublicKey(address []byte, _ 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(_ map[uint32][]sharding.Validator, _ map[uint32][]sharding.Validator, _ uint32) error
- func (ncm *NodesCoordinatorMock) ShardIdForEpoch(_ uint32) (uint32, error)
- type OneSCExecutorMockVM
- type P2PAntifloodHandlerStub
- 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 PoolsHolderStub
- func (phs *PoolsHolderStub) Headers() dataRetriever.HeadersPool
- func (phs *PoolsHolderStub) IsInterfaceNil() bool
- func (phs *PoolsHolderStub) MiniBlocks() storage.Cacher
- func (phs *PoolsHolderStub) PeerChangesBlocks() storage.Cacher
- func (phs *PoolsHolderStub) Transactions() dataRetriever.ShardedDataCacherNotifier
- func (phs *PoolsHolderStub) UnsignedTransactions() dataRetriever.ShardedDataCacherNotifier
- type PrivateKeyMock
- type PublicKeyMock
- type RaterMock
- func (rm *RaterMock) ComputeDecreaseProposer(rating uint32) uint32
- func (rm *RaterMock) ComputeDecreaseValidator(rating uint32) uint32
- func (rm *RaterMock) ComputeIncreaseProposer(rating uint32) uint32
- func (rm *RaterMock) ComputeIncreaseValidator(rating 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 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(epoch uint32)
- type RequestedItemsHandlerStub
- 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
- func (rcs *ResolversContainerStub) ResolverKeys() string
- 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 RounderMock
- func (rm *RounderMock) Index() int64
- func (rm *RounderMock) IsInterfaceNil() bool
- func (rm *RounderMock) RemainingTime(_ time.Time, _ time.Duration) time.Duration
- func (rm *RounderMock) TimeDuration() time.Duration
- func (rm *RounderMock) TimeStamp() time.Time
- func (rm *RounderMock) UpdateRound(time.Time, 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) ProcessIfError(acntSnd state.UserAccountHandler, txHash []byte, tx data.TransactionHandler, ...) error
- func (sc *SCProcessorMock) ProcessSmartContractResult(scr *smartContractResult.SmartContractResult) error
- type SCToProtocolStub
- type ScQueryStub
- type ServiceContainerMock
- 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 SmartContractResultsProcessorMock
- type StorageBootstrapperMock
- type SyncTimerMock
- type TopicAntiFloodStub
- 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 TxPoolsCleanerMock
- type TxProcessorMock
- func (etm *TxProcessorMock) IsInterfaceNil() bool
- func (etm *TxProcessorMock) ProcessSmartContractResult(scr *smartContractResult.SmartContractResult) error
- func (etm *TxProcessorMock) ProcessTransaction(transaction *transaction.Transaction) error
- func (etm *TxProcessorMock) SetBalancesToTrie(accBalance map[string]*big.Int) (rootHash []byte, err error)
- type TxTypeHandlerMock
- type Uint64ByteSliceConverterMock
- type UnsignedTxHandlerMock
- func (ut *UnsignedTxHandlerMock) AddRewardTxFromBlock(tx data.TransactionHandler)
- func (ut *UnsignedTxHandlerMock) CleanProcessedUTxs()
- func (ut *UnsignedTxHandlerMock) CreateAllUTxs() []data.TransactionHandler
- func (ut *UnsignedTxHandlerMock) CreateBlockStarted()
- func (ut *UnsignedTxHandlerMock) GetAccumulatedFees() *big.Int
- func (ut *UnsignedTxHandlerMock) IsInterfaceNil() bool
- func (ut *UnsignedTxHandlerMock) ProcessTransactionFee(cost *big.Int, txHash []byte)
- func (ut *UnsignedTxHandlerMock) RevertFees(txHashes [][]byte)
- func (ut *UnsignedTxHandlerMock) VerifyCreatedUTxs() error
- type VMContainerMock
- func (vmc *VMContainerMock) Add(key []byte, val vmcommon.VMExecutionHandler) error
- func (vmc *VMContainerMock) AddMultiple(keys [][]byte, vms []vmcommon.VMExecutionHandler) error
- func (vmc *VMContainerMock) Get(key []byte) (vmcommon.VMExecutionHandler, error)
- func (vmc *VMContainerMock) IsInterfaceNil() bool
- func (vmc *VMContainerMock) Keys() [][]byte
- func (vmc *VMContainerMock) Len() int
- func (vmc *VMContainerMock) Remove(key []byte)
- func (vmc *VMContainerMock) Replace(key []byte, val vmcommon.VMExecutionHandler) error
- type VMExecutionHandlerStub
- func (vm *VMExecutionHandlerStub) G0Call(input *vmcommon.ContractCallInput) (*big.Int, error)
- func (vm *VMExecutionHandlerStub) G0Create(input *vmcommon.ContractCreateInput) (*big.Int, error)
- func (vm *VMExecutionHandlerStub) RunSmartContractCall(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error)
- func (vm *VMExecutionHandlerStub) RunSmartContractCreate(input *vmcommon.ContractCreateInput) (*vmcommon.VMOutput, error)
- type ValidatorInfoProcessorStub
- type ValidatorMock
- 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)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCountingDB ¶
func NewCountingDB() *countingDB
NewCountingDB returns a new instance of countingDB
func NewMultiShardsCoordinatorMock ¶
func NewMultiShardsCoordinatorMock(nrShard uint32) *multipleShardsCoordinatorMock
NewMultiShardsCoordinatorMock -
func NewNetworkShardingCollectorMock ¶
func NewNetworkShardingCollectorMock() *networkShardingCollectorMock
NewNetworkShardingCollectorMock -
Types ¶
type AccountsFactoryStub ¶
type AccountsFactoryStub struct {
CreateAccountCalled func(address state.AddressContainer) (state.AccountHandler, error)
}
AccountsFactoryStub -
func (*AccountsFactoryStub) CreateAccount ¶
func (afs *AccountsFactoryStub) CreateAccount(address state.AddressContainer) (state.AccountHandler, error)
CreateAccount -
func (*AccountsFactoryStub) IsInterfaceNil ¶
func (afs *AccountsFactoryStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type AccountsStub ¶
type AccountsStub struct { GetExistingAccountCalled func(addressContainer state.AddressContainer) (state.AccountHandler, error) LoadAccountCalled func(container state.AddressContainer) (state.AccountHandler, error) SaveAccountCalled func(account state.AccountHandler) error RemoveAccountCalled func(addressContainer state.AddressContainer) error CommitCalled func() ([]byte, error) JournalLenCalled func() int RevertToSnapshotCalled func(snapshot int) error RootHashCalled func() ([]byte, error) RecreateTrieCalled func(rootHash []byte) error PruneTrieCalled func(rootHash []byte, identifier data.TriePruningIdentifier) CancelPruneCalled func(rootHash []byte, identifier data.TriePruningIdentifier) SnapshotStateCalled func(rootHash []byte) SetStateCheckpointCalled func(rootHash []byte) IsPruningEnabledCalled func() bool GetAllLeavesCalled func(rootHash []byte) (map[string][]byte, error) }
AccountsStub -
func (*AccountsStub) CancelPrune ¶
func (as *AccountsStub) CancelPrune(rootHash []byte, identifier data.TriePruningIdentifier)
CancelPrune -
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) 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) LoadAccount ¶
func (as *AccountsStub) LoadAccount(address state.AddressContainer) (state.AccountHandler, error)
func (*AccountsStub) PruneTrie ¶
func (as *AccountsStub) PruneTrie(rootHash []byte, identifier data.TriePruningIdentifier)
PruneTrie -
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) RevertToSnapshot ¶
func (as *AccountsStub) RevertToSnapshot(snapshot int) error
RevertToSnapshot -
func (*AccountsStub) SaveAccount ¶
func (as *AccountsStub) SaveAccount(account state.AccountHandler) error
func (*AccountsStub) SetStateCheckpoint ¶
func (as *AccountsStub) SetStateCheckpoint(rootHash []byte)
SetStateCheckpoint -
func (*AccountsStub) SnapshotState ¶
func (as *AccountsStub) SnapshotState(rootHash []byte)
SnapshotState -
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) CreateCalled func(pubKeys []string, index uint16) (crypto.MultiSigner, error) ResetCalled func(pubKeys []string, index uint16) 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 creates a multiSigner using receiver as template 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) 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) IsInterfaceNil ¶
func (bc *BlockChainMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
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
type BlockProcessorMock ¶
type BlockProcessorMock struct { NrCommitBlockCalled uint32 Marshalizer marshal.Marshalizer 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) CreateBlockCalled func(initialHdrData data.HeaderHandler, haveTime func() bool) (data.HeaderHandler, data.BodyHandler, error) RestoreBlockIntoPoolsCalled func(header data.HeaderHandler, body data.BodyHandler) error 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) RestoreLastNotarizedHrdsToGenesisCalled func() RevertStateToBlockCalled func(header data.HeaderHandler) error }
BlockProcessorMock mocks the implementation for a blockProcessor
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 mocks the commit of a block
func (*BlockProcessorMock) CreateBlock ¶
func (bpm *BlockProcessorMock) CreateBlock(initialHdrData data.HeaderHandler, haveTime func() bool) (data.HeaderHandler, data.BodyHandler, error)
CreateBlock -
func (*BlockProcessorMock) CreateNewHeader ¶
func (bpm *BlockProcessorMock) CreateNewHeader(round uint64) data.HeaderHandler
CreateNewHeader -
func (*BlockProcessorMock) DecodeBlockBody ¶
func (bpm *BlockProcessorMock) DecodeBlockBody(dta []byte) data.BodyHandler
DecodeBlockBody method decodes block body from a given byte array
func (*BlockProcessorMock) DecodeBlockHeader ¶
func (bpm *BlockProcessorMock) DecodeBlockHeader(dta []byte) data.HeaderHandler
DecodeBlockHeader method decodes block header from a given byte array
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 mocks pocessing a block
func (*BlockProcessorMock) PruneStateOnRollback ¶
func (bpm *BlockProcessorMock) PruneStateOnRollback(currHeader data.HeaderHandler, prevHeader data.HeaderHandler)
PruneStateOnRollback recreates the 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 mocks revert of the accounts state
func (*BlockProcessorMock) RevertStateToBlock ¶
func (bpm *BlockProcessorMock) RevertStateToBlock(header data.HeaderHandler) error
RevertStateToBlock recreates the state tries to the root hashes indicated by the provided header
func (*BlockProcessorMock) SetNumProcessedObj ¶
func (bpm *BlockProcessorMock) SetNumProcessedObj(_ uint64)
SetNumProcessedObj -
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 BlockTrackerStub ¶
type BlockTrackerStub struct { AddTrackedHeaderCalled func(header data.HeaderHandler, hash []byte) AddCrossNotarizedHeaderCalled func(shardID uint32, crossNotarizedHeader data.HeaderHandler, crossNotarizedHeaderHash []byte) AddSelfNotarizedHeaderCalled func(shardID uint32, selfNotarizedHeader data.HeaderHandler, selfNotarizedHeaderHash []byte) 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 }
BlockTrackerStub -
func (*BlockTrackerStub) AddCrossNotarizedHeader ¶
func (bts *BlockTrackerStub) AddCrossNotarizedHeader(shardID uint32, crossNotarizedHeader data.HeaderHandler, crossNotarizedHeaderHash []byte)
AddCrossNotarizedHeader -
func (*BlockTrackerStub) AddSelfNotarizedHeader ¶
func (bts *BlockTrackerStub) AddSelfNotarizedHeader(shardID uint32, selfNotarizedHeader data.HeaderHandler, selfNotarizedHeaderHash []byte)
AddSelfNotarizedHeader -
func (*BlockTrackerStub) AddTrackedHeader ¶
func (bts *BlockTrackerStub) AddTrackedHeader(header data.HeaderHandler, hash []byte)
AddTrackedHeader -
func (*BlockTrackerStub) CheckBlockAgainstFinal ¶
func (bts *BlockTrackerStub) CheckBlockAgainstFinal(headerHandler data.HeaderHandler) error
CheckBlockAgainstFinal -
func (*BlockTrackerStub) CheckBlockAgainstRounder ¶
func (bts *BlockTrackerStub) CheckBlockAgainstRounder(headerHandler data.HeaderHandler) error
CheckBlockAgainstRounder -
func (*BlockTrackerStub) CleanupHeadersBehindNonce ¶
func (bts *BlockTrackerStub) CleanupHeadersBehindNonce(shardID uint32, selfNotarizedNonce uint64, crossNotarizedNonce uint64)
CleanupHeadersBehindNonce -
func (*BlockTrackerStub) CleanupInvalidCrossHeaders ¶
func (bts *BlockTrackerStub) CleanupInvalidCrossHeaders(_ uint32, _ uint64)
CleanupInvalidCrossHeaders -
func (*BlockTrackerStub) ComputeLongestChain ¶
func (bts *BlockTrackerStub) ComputeLongestChain(shardID uint32, header data.HeaderHandler) ([]data.HeaderHandler, [][]byte)
ComputeLongestChain -
func (*BlockTrackerStub) ComputeLongestMetaChainFromLastNotarized ¶
func (bts *BlockTrackerStub) ComputeLongestMetaChainFromLastNotarized() ([]data.HeaderHandler, [][]byte, error)
ComputeLongestMetaChainFromLastNotarized -
func (*BlockTrackerStub) ComputeLongestShardsChainsFromLastNotarized ¶
func (bts *BlockTrackerStub) ComputeLongestShardsChainsFromLastNotarized() ([]data.HeaderHandler, [][]byte, map[uint32][]data.HeaderHandler, error)
ComputeLongestShardsChainsFromLastNotarized -
func (*BlockTrackerStub) DisplayTrackedHeaders ¶
func (bts *BlockTrackerStub) DisplayTrackedHeaders()
DisplayTrackedHeaders -
func (*BlockTrackerStub) GetCrossNotarizedHeader ¶
func (bts *BlockTrackerStub) GetCrossNotarizedHeader(shardID uint32, offset uint64) (data.HeaderHandler, []byte, error)
GetCrossNotarizedHeader -
func (*BlockTrackerStub) GetFinalHeader ¶
func (bts *BlockTrackerStub) GetFinalHeader(shardID uint32) (data.HeaderHandler, []byte, error)
GetFinalHeader -
func (*BlockTrackerStub) GetLastCrossNotarizedHeader ¶
func (bts *BlockTrackerStub) GetLastCrossNotarizedHeader(shardID uint32) (data.HeaderHandler, []byte, error)
GetLastCrossNotarizedHeader -
func (*BlockTrackerStub) GetLastCrossNotarizedHeadersForAllShards ¶
func (bts *BlockTrackerStub) GetLastCrossNotarizedHeadersForAllShards() (map[uint32]data.HeaderHandler, error)
GetLastCrossNotarizedHeadersForAllShards -
func (*BlockTrackerStub) GetLastSelfNotarizedHeader ¶
func (bts *BlockTrackerStub) GetLastSelfNotarizedHeader(shardID uint32) (data.HeaderHandler, []byte, error)
GetLastSelfNotarizedHeader -
func (*BlockTrackerStub) GetTrackedHeaders ¶
func (bts *BlockTrackerStub) GetTrackedHeaders(shardID uint32) ([]data.HeaderHandler, [][]byte)
GetTrackedHeaders -
func (*BlockTrackerStub) GetTrackedHeadersForAllShards ¶
func (bts *BlockTrackerStub) GetTrackedHeadersForAllShards() map[uint32][]data.HeaderHandler
GetTrackedHeadersForAllShards -
func (*BlockTrackerStub) GetTrackedHeadersWithNonce ¶
func (bts *BlockTrackerStub) GetTrackedHeadersWithNonce(shardID uint32, nonce uint64) ([]data.HeaderHandler, [][]byte)
GetTrackedHeadersWithNonce -
func (*BlockTrackerStub) IsInterfaceNil ¶
func (bts *BlockTrackerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*BlockTrackerStub) IsShardStuck ¶
func (bts *BlockTrackerStub) IsShardStuck(shardId uint32) bool
IsShardStuck -
func (*BlockTrackerStub) RegisterCrossNotarizedHeadersHandler ¶
func (bts *BlockTrackerStub) RegisterCrossNotarizedHeadersHandler(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte))
RegisterCrossNotarizedHeadersHandler -
func (*BlockTrackerStub) RegisterSelfNotarizedHeadersHandler ¶
func (bts *BlockTrackerStub) RegisterSelfNotarizedHeadersHandler(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte))
RegisterSelfNotarizedHeadersHandler -
func (*BlockTrackerStub) RemoveLastNotarizedHeaders ¶
func (bts *BlockTrackerStub) RemoveLastNotarizedHeaders()
RemoveLastNotarizedHeaders -
func (*BlockTrackerStub) RestoreToGenesis ¶
func (bts *BlockTrackerStub) RestoreToGenesis()
RestoreToGenesis -
func (*BlockTrackerStub) ShouldAddHeader ¶
func (bts *BlockTrackerStub) 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 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 (bc *ChainStorerMock) AddStorer(key dataRetriever.UnitType, s storage.Storer)
AddStorer will add a new storer to the chain map
func (*ChainStorerMock) Destroy ¶
func (bc *ChainStorerMock) Destroy() error
Destroy removes the underlying files/resources used by the storage service
func (*ChainStorerMock) Get ¶
func (bc *ChainStorerMock) Get(unitType dataRetriever.UnitType, key []byte) ([]byte, error)
Get returns the value for the given key if found in the selected storage unit, nil otherwise. It can return an error if the provided unit type is not supported or if the storage unit underlying implementation reports an error
func (*ChainStorerMock) GetAll ¶
func (bc *ChainStorerMock) GetAll(unitType dataRetriever.UnitType, keys [][]byte) (map[string][]byte, error)
GetAll gets all the elements with keys in the keys array, from the selected storage unit It can report an error if the provided unit type is not supported, if there is a missing key in the unit, or if the underlying implementation of the storage unit reports an error.
func (*ChainStorerMock) GetStorer ¶
func (bc *ChainStorerMock) GetStorer(unitType dataRetriever.UnitType) storage.Storer
GetStorer returns the storer from the chain map or nil if the storer was not found
func (*ChainStorerMock) Has ¶
func (bc *ChainStorerMock) Has(unitType dataRetriever.UnitType, key []byte) error
Has returns true if the key is found in the selected Unit or false otherwise It can return an error if the provided unit type is not supported or if the underlying implementation of the storage unit reports an error.
func (*ChainStorerMock) IsInterfaceNil ¶
func (bc *ChainStorerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ChainStorerMock) Put ¶
func (bc *ChainStorerMock) Put(unitType dataRetriever.UnitType, key []byte, value []byte) error
Put stores the key, value pair in the selected storage unit It can return an error if the provided unit type is not supported or if the storage unit underlying implementation reports an error
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 EpochStartNotifierStub ¶
type EpochStartNotifierStub struct { RegisterHandlerCalled func(handler epochStart.EpochStartHandler) UnregisterHandlerCalled func(handler epochStart.EpochStartHandler) NotifyAllCalled func(hdr data.HeaderHandler) NotifyAllPrepareCalled func(hdr data.HeaderHandler) // contains filtered or unexported fields }
EpochStartNotifierStub -
func (*EpochStartNotifierStub) IsInterfaceNil ¶
func (esnm *EpochStartNotifierStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*EpochStartNotifierStub) NotifyAll ¶
func (esnm *EpochStartNotifierStub) NotifyAll(hdr data.HeaderHandler)
NotifyAll -
func (*EpochStartNotifierStub) NotifyAllPrepare ¶
func (esnm *EpochStartNotifierStub) NotifyAllPrepare(metaHeader data.HeaderHandler)
NotifyAllPrepare -
func (*EpochStartNotifierStub) RegisterHandler ¶
func (esnm *EpochStartNotifierStub) RegisterHandler(handler epochStart.EpochStartHandler)
RegisterHandler -
func (*EpochStartNotifierStub) UnregisterHandler ¶
func (esnm *EpochStartNotifierStub) UnregisterHandler(handler epochStart.EpochStartHandler)
UnregisterHandler -
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 }
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) GetRoundsPerEpoch ¶
func (e *EpochStartTriggerStub) GetRoundsPerEpoch() uint64
GetRoundsPerEpoch -
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) SetRoundsPerEpoch ¶
func (e *EpochStartTriggerStub) SetRoundsPerEpoch(_ uint64)
SetRoundsPerEpoch -
func (*EpochStartTriggerStub) SetTrigger ¶
func (e *EpochStartTriggerStub) SetTrigger(_ epochStart.TriggerHandler)
SetTrigger -
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 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 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 RestoreToGenesisCalled func() SetRollBackNonceCalled func(nonce uint64) ResetProbableHighestNonceCalled func() }
ForkDetectorMock is a mock implementation for the ForkDetector interface
func (*ForkDetectorMock) AddHeader ¶
func (fdm *ForkDetectorMock) AddHeader(header data.HeaderHandler, hash []byte, state process.BlockHeaderState, selfNotarizedHeaders []data.HeaderHandler, selfNotarizedHeadersHashes [][]byte) error
AddHeader is a mock implementation for AddHeader
func (*ForkDetectorMock) CheckFork ¶
func (fdm *ForkDetectorMock) CheckFork() *process.ForkInfo
CheckFork is a mock implementation for CheckFork
func (*ForkDetectorMock) GetHighestFinalBlockHash ¶
func (fdm *ForkDetectorMock) GetHighestFinalBlockHash() []byte
GetHighestFinalBlockHash -
func (*ForkDetectorMock) GetHighestFinalBlockNonce ¶
func (fdm *ForkDetectorMock) GetHighestFinalBlockNonce() uint64
GetHighestFinalBlockNonce is a mock implementation for 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 is a mock implementation for ProbableHighestNonce
func (*ForkDetectorMock) RemoveHeader ¶
func (fdm *ForkDetectorMock) RemoveHeader(nonce uint64, hash []byte)
RemoveHeader is a mock implementation for 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 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 VerifyRandSeedCalled func(header data.HeaderHandler) error }
HeaderSigVerifierStub -
func (*HeaderSigVerifierStub) IsInterfaceNil ¶
func (hsvm *HeaderSigVerifierStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*HeaderSigVerifierStub) VerifyRandSeed ¶
func (hsvm *HeaderSigVerifierStub) VerifyRandSeed(header data.HeaderHandler) error
VerifyRandSeed -
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 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(shardHeaderHash []byte)) KeysCalled 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) RegisterHandler ¶
func (hcs *HeadersCacherStub) RegisterHandler(handler func(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 InterimProcessorContainerMock ¶
type InterimProcessorContainerMock struct { GetCalled func(key block.Type) (process.IntermediateTransactionHandler, error) KeysCalled func() []block.Type }
InterimProcessorContainerMock -
func (*InterimProcessorContainerMock) Add ¶
func (ipcm *InterimProcessorContainerMock) Add(key block.Type, val process.IntermediateTransactionHandler) error
Add -
func (*InterimProcessorContainerMock) AddMultiple ¶
func (ipcm *InterimProcessorContainerMock) AddMultiple(keys []block.Type, preprocessors []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(key block.Type)
Remove -
func (*InterimProcessorContainerMock) Replace ¶
func (ipcm *InterimProcessorContainerMock) Replace(key block.Type, val 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 KeyGenMock ¶
type KeyGenMock struct { }
KeyGenMock -
func (*KeyGenMock) GeneratePair ¶
func (keyGen *KeyGenMock) GeneratePair() (crypto.PrivateKey, crypto.PublicKey)
GeneratePair -
func (*KeyGenMock) IsInterfaceNil ¶
func (keyGen *KeyGenMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*KeyGenMock) PrivateKeyFromByteArray ¶
func (keyGen *KeyGenMock) PrivateKeyFromByteArray(_ []byte) (crypto.PrivateKey, error)
PrivateKeyFromByteArray -
func (*KeyGenMock) PublicKeyFromByteArray ¶
func (keyGen *KeyGenMock) PublicKeyFromByteArray(_ []byte) (crypto.PublicKey, error)
PublicKeyFromByteArray -
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 MockDB ¶
type MockDB struct { }
MockDB -
func (MockDB) IsInterfaceNil ¶
IsInterfaceNil returns true if there is no value under the interface
type NilAntifloodHandler ¶
type NilAntifloodHandler struct { }
NilAntifloodHandler is an empty implementation of P2PAntifloodHandler it does nothing
func (*NilAntifloodHandler) CanProcessMessage ¶
func (nah *NilAntifloodHandler) CanProcessMessage(_ p2p.MessageP2P, _ p2p.PeerID) error
CanProcessMessage will always return nil, allowing messages to go to interceptors
func (*NilAntifloodHandler) CanProcessMessageOnTopic ¶
func (nah *NilAntifloodHandler) CanProcessMessageOnTopic(_ p2p.PeerID, _ string) error
CanProcessMessageOnTopic will always return nil, allowing messages to go to interceptors
func (*NilAntifloodHandler) IsInterfaceNil ¶
func (nah *NilAntifloodHandler) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*NilAntifloodHandler) ResetForTopic ¶
func (nah *NilAntifloodHandler) ResetForTopic(_ string)
ResetForTopic won't do anything
func (*NilAntifloodHandler) SetMaxMessagesForTopic ¶
func (nah *NilAntifloodHandler) SetMaxMessagesForTopic(_ string, _ uint32)
SetMaxMessagesForTopic won't do anything
type NodeShufflerMock ¶
type NodeShufflerMock struct { }
NodeShufflerMock -
func (*NodeShufflerMock) IsInterfaceNil ¶
func (nsm *NodeShufflerMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*NodeShufflerMock) UpdateNodeLists ¶
func (nsm *NodeShufflerMock) UpdateNodeLists( args sharding.ArgsUpdateNodes, ) (map[uint32][]sharding.Validator, map[uint32][]sharding.Validator, []sharding.Validator)
UpdateNodeLists -
func (*NodeShufflerMock) UpdateParams ¶
func (nsm *NodeShufflerMock) UpdateParams( _ uint32, _ uint32, _ float32, _ bool, )
UpdateParams -
type NodesCoordinatorCacheStub ¶
type NodesCoordinatorCacheStub struct { PutCalled func(key []byte, value interface{}) (evicted bool) GetCalled func(key []byte) (value interface{}, ok bool) }
NodesCoordinatorCacheStub -
func (*NodesCoordinatorCacheStub) Get ¶
func (rm *NodesCoordinatorCacheStub) Get(key []byte) (value interface{}, ok bool)
Get -
func (*NodesCoordinatorCacheStub) Put ¶
func (rm *NodesCoordinatorCacheStub) Put(key []byte, value interface{}) (evicted bool)
Put -
type NodesCoordinatorMock ¶
type NodesCoordinatorMock struct { ComputeValidatorsGroupCalled func(randomness []byte, round uint64, shardId uint32, epoch uint32) ([]sharding.Validator, error) GetValidatorsPublicKeysCalled func(randomness []byte, round uint64, shardId uint32, epoch uint32) ([]string, error) GetValidatorsRewardsAddressesCalled func(randomness []byte, round uint64, shardId uint32, epoch uint32) ([]string, error) GetValidatorWithPublicKeyCalled func(publicKey []byte) (validator sharding.Validator, shardId uint32, err error) GetAllValidatorsPublicKeysCalled func() (map[uint32][][]byte, error) }
NodesCoordinatorMock -
func (*NodesCoordinatorMock) ComputeConsensusGroup ¶
func (ncm *NodesCoordinatorMock) ComputeConsensusGroup( randomness []byte, round uint64, shardId uint32, epoch uint32, ) (validatorsGroup []sharding.Validator, err error)
ComputeConsensusGroup -
func (*NodesCoordinatorMock) ComputeLeaving ¶
func (ncm *NodesCoordinatorMock) ComputeLeaving([]sharding.Validator) []sharding.Validator
ComputeLeaving -
func (*NodesCoordinatorMock) ConsensusGroupSize ¶
func (ncm *NodesCoordinatorMock) ConsensusGroupSize(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(_ []byte, _ uint32, _ uint32) ([]string, error)
GetSelectedPublicKeys -
func (*NodesCoordinatorMock) GetValidatorWithPublicKey ¶
func (ncm *NodesCoordinatorMock) GetValidatorWithPublicKey(address []byte, _ 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 returns true if there is no value under the interface
func (*NodesCoordinatorMock) LoadState ¶
func (ncm *NodesCoordinatorMock) LoadState(_ []byte) error
LoadState -
func (*NodesCoordinatorMock) SetNodesPerShards ¶
func (ncm *NodesCoordinatorMock) SetNodesPerShards(_ map[uint32][]sharding.Validator, _ map[uint32][]sharding.Validator, _ 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 OneSCExecutorMockVM ¶
type OneSCExecutorMockVM struct { GasForOperation uint64 // contains filtered or unexported fields }
OneSCExecutorMockVM contains one hardcoded SC with the following behaviour (written in golang): ------------------------------------- var a int
func init(initial int){ a = initial }
func Add(value int){ a += value }
func Get() int{ return a }
-------------------------------------
func NewOneSCExecutorMockVM ¶
func NewOneSCExecutorMockVM(blockchainHook vmcommon.BlockchainHook, hasher hashing.Hasher) (*OneSCExecutorMockVM, error)
NewOneSCExecutorMockVM -
func (*OneSCExecutorMockVM) RunSmartContractCall ¶
func (vm *OneSCExecutorMockVM) RunSmartContractCall(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error)
RunSmartContractCall -
func (*OneSCExecutorMockVM) RunSmartContractCreate ¶
func (vm *OneSCExecutorMockVM) RunSmartContractCreate(input *vmcommon.ContractCreateInput) (*vmcommon.VMOutput, error)
RunSmartContractCreate -
type P2PAntifloodHandlerStub ¶
type P2PAntifloodHandlerStub struct {
CanProcessMessageCalled func(message p2p.MessageP2P, fromConnectedPeer p2p.PeerID) error
}
P2PAntifloodHandlerStub -
func (*P2PAntifloodHandlerStub) CanProcessMessage ¶
func (p2pahs *P2PAntifloodHandlerStub) CanProcessMessage(message p2p.MessageP2P, fromConnectedPeer p2p.PeerID) error
CanProcessMessage -
func (*P2PAntifloodHandlerStub) IsInterfaceNil ¶
func (p2pahs *P2PAntifloodHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
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 PoolsHolderStub ¶
type PoolsHolderStub struct { HeadersCalled func() dataRetriever.HeadersPool PeerChangesBlocksCalled func() storage.Cacher TransactionsCalled func() dataRetriever.ShardedDataCacherNotifier UnsignedTransactionsCalled func() dataRetriever.ShardedDataCacherNotifier MiniBlocksCalled func() storage.Cacher }
PoolsHolderStub -
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) MiniBlocks ¶
func (phs *PoolsHolderStub) MiniBlocks() storage.Cacher
MiniBlocks -
func (*PoolsHolderStub) PeerChangesBlocks ¶
func (phs *PoolsHolderStub) PeerChangesBlocks() storage.Cacher
PeerChangesBlocks -
func (*PoolsHolderStub) Transactions ¶
func (phs *PoolsHolderStub) Transactions() dataRetriever.ShardedDataCacherNotifier
Transactions -
func (*PoolsHolderStub) UnsignedTransactions ¶
func (phs *PoolsHolderStub) UnsignedTransactions() dataRetriever.ShardedDataCacherNotifier
UnsignedTransactions -
type PrivateKeyMock ¶
type PrivateKeyMock struct { }
PrivateKeyMock -
func (*PrivateKeyMock) GeneratePublic ¶
func (sk *PrivateKeyMock) GeneratePublic() crypto.PublicKey
GeneratePublic -
func (*PrivateKeyMock) IsInterfaceNil ¶
func (sk *PrivateKeyMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*PrivateKeyMock) ToByteArray ¶
func (sk *PrivateKeyMock) ToByteArray() ([]byte, error)
ToByteArray -
type PublicKeyMock ¶
type PublicKeyMock struct { }
PublicKeyMock -
func (*PublicKeyMock) IsInterfaceNil ¶
func (sspk *PublicKeyMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*PublicKeyMock) ToByteArray ¶
func (sspk *PublicKeyMock) ToByteArray() ([]byte, error)
ToByteArray -
type 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 GetChanceCalled 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 GetRatingsCalled func([]string) map[string]uint32 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
UpdateRatingFromTempRating -
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 -
func (*RequestHandlerStub) SetEpoch ¶
func (rhs *RequestHandlerStub) SetEpoch(epoch uint32)
SetEpoch -
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 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 ResolverKeysCalled func() string }
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 -
func (*ResolversContainerStub) ResolverKeys ¶
func (rcs *ResolversContainerStub) ResolverKeys() string
ResolverKeys -
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 RounderMock ¶
type RounderMock struct { IndexField int64 TimeStampField time.Time TimeDurationField time.Duration RemainingTimeField time.Duration }
RounderMock -
func (*RounderMock) RemainingTime ¶
RemainingTime -
func (*RounderMock) TimeDuration ¶
func (rm *RounderMock) TimeDuration() time.Duration
TimeDuration -
func (*RounderMock) UpdateRound ¶
func (rm *RounderMock) UpdateRound(time.Time, 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 ProcessIfErrorCalled func(acntSnd state.UserAccountHandler, txHash []byte, tx data.TransactionHandler, returnCode string) 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) ProcessIfError ¶
func (sc *SCProcessorMock) ProcessIfError(acntSnd state.UserAccountHandler, txHash []byte, tx data.TransactionHandler, returnCode string) error
ProcessIfError -
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) ComputeScCallGasLimitCalled 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 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 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 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 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 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 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 (etm *TxProcessorMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*TxProcessorMock) ProcessSmartContractResult ¶
func (etm *TxProcessorMock) ProcessSmartContractResult(scr *smartContractResult.SmartContractResult) error
ProcessSmartContractResult -
func (*TxProcessorMock) ProcessTransaction ¶
func (etm *TxProcessorMock) ProcessTransaction(transaction *transaction.Transaction) error
ProcessTransaction -
func (*TxProcessorMock) SetBalancesToTrie ¶
func (etm *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 -
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 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) GetAccumulatedFeesCalled func() *big.Int RevertFeesCalled func(txHashes [][]byte) }
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) CreateBlockStarted ¶
func (ut *UnsignedTxHandlerMock) CreateBlockStarted()
CreateBlockStarted -
func (*UnsignedTxHandlerMock) GetAccumulatedFees ¶
func (ut *UnsignedTxHandlerMock) GetAccumulatedFees() *big.Int
GetAccumulatedFees -
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, txHash []byte)
ProcessTransactionFee -
func (*UnsignedTxHandlerMock) RevertFees ¶
func (ut *UnsignedTxHandlerMock) RevertFees(txHashes [][]byte)
RevertFees -
func (*UnsignedTxHandlerMock) VerifyCreatedUTxs ¶
func (ut *UnsignedTxHandlerMock) VerifyCreatedUTxs() error
VerifyCreatedUTxs -
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 (vmc *VMContainerMock) Add(key []byte, val vmcommon.VMExecutionHandler) error
Add -
func (*VMContainerMock) AddMultiple ¶
func (vmc *VMContainerMock) AddMultiple(keys [][]byte, vms []vmcommon.VMExecutionHandler) error
AddMultiple -
func (*VMContainerMock) Get ¶
func (vmc *VMContainerMock) Get(key []byte) (vmcommon.VMExecutionHandler, error)
Get -
func (*VMContainerMock) IsInterfaceNil ¶
func (vmc *VMContainerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*VMContainerMock) Replace ¶
func (vmc *VMContainerMock) Replace(key []byte, val vmcommon.VMExecutionHandler) error
Replace -
type VMExecutionHandlerStub ¶
type VMExecutionHandlerStub struct { G0CreateCalled func(input *vmcommon.ContractCreateInput) (*big.Int, error) G0CallCalled func(input *vmcommon.ContractCallInput) (*big.Int, error) RunSmartContractCreateCalled func(input *vmcommon.ContractCreateInput) (*vmcommon.VMOutput, error) RunSmartContractCallCalled func(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error) }
VMExecutionHandlerStub -
func (*VMExecutionHandlerStub) G0Call ¶
func (vm *VMExecutionHandlerStub) G0Call(input *vmcommon.ContractCallInput) (*big.Int, error)
G0Call yields the initial gas cost of calling an existing smart contract
func (*VMExecutionHandlerStub) G0Create ¶
func (vm *VMExecutionHandlerStub) G0Create(input *vmcommon.ContractCreateInput) (*big.Int, error)
G0Create yields the initial gas cost of creating a new smart contract
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 --
type ValidatorInfoProcessorStub ¶
type ValidatorInfoProcessorStub struct { }
ValidatorInfoProcessorStub -
func (*ValidatorInfoProcessorStub) IsInterfaceNil ¶
func (vip *ValidatorInfoProcessorStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*ValidatorInfoProcessorStub) ProcessMetaBlock ¶
func (vip *ValidatorInfoProcessorStub) ProcessMetaBlock(*block.MetaBlock, []byte) error
ProcessMetaBlock -
type ValidatorMock ¶
type ValidatorMock struct {
// contains filtered or unexported fields
}
ValidatorMock -
func NewValidatorMock ¶
func NewValidatorMock(pubKey []byte, address []byte) *ValidatorMock
NewValidatorMock -
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 -
Source Files ¶
- accountFactoryStub.go
- accountsStub.go
- blackListHandleStub.go
- blockChainHookHandlerMock.go
- blockChainMock.go
- blockProcessorMock.go
- blockSizeThrottlerStub.go
- blockTrackerStub.go
- bootstrapStorerMock.go
- cacherStub.go
- chainStorerMock.go
- countingDB.go
- dbMock.go
- endOfEpochTriggerStub.go
- epochEconomicsStub.go
- epochRewardsCreatorStub.go
- epochStartDataCreatorStub.go
- epochStartNotifierStub.go
- epochValidatorInfoCreatorStub.go
- feeHandlerStub.go
- forkDetectorMock.go
- gasHandlerMock.go
- headerResolverMock.go
- headerSigVerifierStub.go
- headersCacherStub.go
- interimProcessorContainerMock.go
- intermediateTransactionHandlerMock.go
- keyMock.go
- miniBlocksResolverMock.go
- multiSigMock.go
- multipleShardsCoordinatorMock.go
- networkShardingCollectorMock.go
- nilAntifloodHandler.go
- nodesCoordinatorCacheMock.go
- nodesCoordinatorMock.go
- oneSCExecutorMockVM.go
- p2pAntifloodHandlerStub.go
- peerChangesHandler.go
- pendingMiniBlocksHandlerStub.go
- poolsHolderStub.go
- poolscleanerMock.go
- raterMock.go
- ratingReaderMock.go
- requestHandlerStub.go
- requestedItemsHandlerStub.go
- resolversContainerStub.go
- resolversFinderStub.go
- rounderMock.go
- scProcessorMock.go
- scQueryStub.go
- scToProtocolHandlerMock.go
- serviceContainerMock.go
- shardedDataStub.go
- shufflerMock.go
- signerMock.go
- smartContractResultProcessorMock.go
- storageBootstrapperMock.go
- syncTimerMock.go
- topicAntifloodStub.go
- transactionCoordinatorMock.go
- txProcessorMock.go
- txTypeHandlerMock.go
- uint64ByteSliceConverterMock.go
- unsignedTxHandlerMock.go
- validatorInfoProcessorStub.go
- validatorMock.go
- validatorStatisticsProcessorStub.go
- vmContainerMock.go
- vmExecutionHandlerStub.go