Documentation
¶
Index ¶
- func NewAccumulatorMock() *accumulatorMock
- func NewApplicationRunningTrigger() *applicationRunningTrigger
- func NewMultiShardsCoordinatorMock(nrShard uint32) *multipleShardsCoordinatorMock
- func NewNonceHashConverterMock() *nonceHashConverterMock
- func NewOneShardCoordinatorMock() *oneShardCoordinatorMock
- type BlockAPIHandlerStub
- func (bah *BlockAPIHandlerStub) GetAlteredAccountsForBlock(options api.GetAlteredAccountsForBlockOptions) ([]*alteredAccount.AlteredAccount, error)
- func (bah *BlockAPIHandlerStub) GetBlockByHash(hash []byte, options api.BlockQueryOptions) (*api.Block, error)
- func (bah *BlockAPIHandlerStub) GetBlockByNonce(nonce uint64, options api.BlockQueryOptions) (*api.Block, error)
- func (bah *BlockAPIHandlerStub) GetBlockByRound(round uint64, options api.BlockQueryOptions) (*api.Block, error)
- func (bah *BlockAPIHandlerStub) IsInterfaceNil() bool
- 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) CheckBlockAgainstRoundHandler(headerHandler data.HeaderHandler) error
- func (bts *BlockTrackerStub) CheckBlockAgainstWhitelist(interceptedData process.InterceptedData) bool
- 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) 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) GetSelfNotarizedHeader(shardID uint32, offset uint64) (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) RegisterFinalMetachainHeadersHandler(...)
- func (bts *BlockTrackerStub) RegisterSelfNotarizedFromCrossHeadersHandler(...)
- func (bts *BlockTrackerStub) RegisterSelfNotarizedHeadersHandler(...)
- func (bts *BlockTrackerStub) RemoveLastNotarizedHeaders()
- func (bts *BlockTrackerStub) RestoreToGenesis()
- func (bts *BlockTrackerStub) ShouldAddHeader(headerHandler data.HeaderHandler) bool
- func (bts *BlockTrackerStub) ShouldSkipMiniBlocksCreationFromSelf() bool
- type BootstrapStorerMock
- func (bsm *BootstrapStorerMock) Get(round int64) (bootstrapStorage.BootstrapData, error)
- func (bsm *BootstrapStorerMock) GetHighestRound() int64
- func (bsm *BootstrapStorerMock) IsInterfaceNil() bool
- func (bsm *BootstrapStorerMock) Put(round int64, bootData bootstrapStorage.BootstrapData) error
- func (bsm *BootstrapStorerMock) SaveLastRound(_ int64) error
- type CloserStub
- type DelegatedListProcessorStub
- type DirectStakedListProcessorStub
- type EpochStartNotifierStub
- func (esnm *EpochStartNotifierStub) IsInterfaceNil() bool
- func (esnm *EpochStartNotifierStub) NotifyAll(hdr data.HeaderHandler)
- func (esnm *EpochStartNotifierStub) NotifyAllPrepare(metaHdr data.HeaderHandler, body data.BodyHandler)
- func (esnm *EpochStartNotifierStub) NotifyEpochChangeConfirmed(epoch uint32)
- func (esnm *EpochStartNotifierStub) RegisterHandler(handler epochStart.ActionHandler)
- func (esnm *EpochStartNotifierStub) UnregisterHandler(handler epochStart.ActionHandler)
- type EpochStartTriggerStub
- func (e *EpochStartTriggerStub) Close() error
- func (e *EpochStartTriggerStub) Epoch() uint32
- func (e *EpochStartTriggerStub) EpochFinalityAttestingRound() uint64
- func (e *EpochStartTriggerStub) EpochStartMetaHdrHash() []byte
- func (e *EpochStartTriggerStub) EpochStartRound() uint64
- func (e *EpochStartTriggerStub) ForceEpochStart(round uint64)
- func (e *EpochStartTriggerStub) GetSavedStateKey() []byte
- func (e *EpochStartTriggerStub) IsEpochStart() bool
- func (e *EpochStartTriggerStub) IsInterfaceNil() bool
- func (e *EpochStartTriggerStub) LoadState(_ []byte) error
- func (e *EpochStartTriggerStub) MetaEpoch() uint32
- func (e *EpochStartTriggerStub) NotifyAll(_ data.HeaderHandler)
- func (e *EpochStartTriggerStub) RequestEpochStartIfNeeded(_ data.HeaderHandler)
- func (e *EpochStartTriggerStub) Revert(_ data.HeaderHandler)
- func (e *EpochStartTriggerStub) RevertStateToBlock(_ data.HeaderHandler) error
- func (e *EpochStartTriggerStub) SetAppStatusHandler(_ core.AppStatusHandler) error
- func (e *EpochStartTriggerStub) SetCurrentEpochStartRound(_ uint64)
- func (e *EpochStartTriggerStub) SetFinalityAttestingRound(_ uint64)
- func (e *EpochStartTriggerStub) SetProcessed(header data.HeaderHandler, _ data.BodyHandler)
- func (e *EpochStartTriggerStub) Update(round uint64, nonce uint64)
- type 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) SetFinalToLastCheckpoint()
- func (fdm *ForkDetectorMock) SetRollBackNonce(nonce uint64)
- type GeneratorSuite
- type HasherMock
- type HeaderIntegrityVerifierStub
- type HeaderSigVerifierStub
- func (hsvm *HeaderSigVerifierStub) IsInterfaceNil() bool
- func (hsvm *HeaderSigVerifierStub) VerifyLeaderSignature(header data.HeaderHandler) error
- 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 HeaderValidatorStub
- type HeadersCacherStub
- func (hcs *HeadersCacherStub) AddHeader(headerHash []byte, header data.HeaderHandler)
- func (hcs *HeadersCacherStub) Clear()
- func (hcs *HeadersCacherStub) GetHeaderByHash(hash []byte) (data.HeaderHandler, error)
- func (hcs *HeadersCacherStub) GetHeadersByNonceAndShardId(hdrNonce uint64, shardId uint32) ([]data.HeaderHandler, [][]byte, error)
- func (hcs *HeadersCacherStub) GetNumHeaders(shardId uint32) int
- func (hcs *HeadersCacherStub) IsInterfaceNil() bool
- func (hcs *HeadersCacherStub) Len() int
- func (hcs *HeadersCacherStub) MaxSize() int
- func (hcs *HeadersCacherStub) Nonces(shardId uint32) []uint64
- func (hcs *HeadersCacherStub) RegisterHandler(handler func(header data.HeaderHandler, shardHeaderHash []byte))
- func (hcs *HeadersCacherStub) RemoveHeaderByHash(headerHash []byte)
- func (hcs *HeadersCacherStub) RemoveHeaderByNonceAndShardId(hdrNonce uint64, shardId uint32)
- type InternalBlockApiHandlerStub
- func (ibah *InternalBlockApiHandlerStub) GetInternalMetaBlockByHash(format common.ApiOutputFormat, hash []byte) (interface{}, error)
- func (ibah *InternalBlockApiHandlerStub) GetInternalMetaBlockByNonce(format common.ApiOutputFormat, nonce uint64) (interface{}, error)
- func (ibah *InternalBlockApiHandlerStub) GetInternalMetaBlockByRound(format common.ApiOutputFormat, round uint64) (interface{}, error)
- func (ibah *InternalBlockApiHandlerStub) GetInternalMiniBlock(format common.ApiOutputFormat, hash []byte, epoch uint32) (interface{}, error)
- func (ibah *InternalBlockApiHandlerStub) GetInternalShardBlockByHash(format common.ApiOutputFormat, hash []byte) (interface{}, error)
- func (ibah *InternalBlockApiHandlerStub) GetInternalShardBlockByNonce(format common.ApiOutputFormat, nonce uint64) (interface{}, error)
- func (ibah *InternalBlockApiHandlerStub) GetInternalShardBlockByRound(format common.ApiOutputFormat, round uint64) (interface{}, error)
- func (ibah *InternalBlockApiHandlerStub) GetInternalStartOfEpochMetaBlock(format common.ApiOutputFormat, epoch uint32) (interface{}, error)
- func (ibah *InternalBlockApiHandlerStub) GetInternalStartOfEpochValidatorsInfo(epoch uint32) ([]*state.ShardValidatorInfo, error)
- func (ibah *InternalBlockApiHandlerStub) IsInterfaceNil() bool
- type KeyGenMock
- func (keyGen *KeyGenMock) CheckPublicKeyValid(_ []byte) error
- func (keyGen *KeyGenMock) GeneratePair() (crypto.PrivateKey, crypto.PublicKey)
- func (keyGen *KeyGenMock) IsInterfaceNil() bool
- func (keyGen *KeyGenMock) PrivateKeyFromByteArray(b []byte) (crypto.PrivateKey, error)
- func (keyGen *KeyGenMock) PublicKeyFromByteArray(b []byte) (crypto.PublicKey, error)
- func (keyGen *KeyGenMock) Suite() crypto.Suite
- type MarshalizerFake
- type MarshalizerMock
- type MiniBlocksProviderStub
- func (mbps *MiniBlocksProviderStub) GetMiniBlocks(hashes [][]byte) ([]*block.MiniblockAndHash, [][]byte)
- func (mbps *MiniBlocksProviderStub) GetMiniBlocksFromPool(hashes [][]byte) ([]*block.MiniblockAndHash, [][]byte)
- func (mbps *MiniBlocksProviderStub) GetMiniBlocksFromStorer(hashes [][]byte) ([]*block.MiniblockAndHash, [][]byte)
- func (mbps *MiniBlocksProviderStub) IsInterfaceNil() bool
- type NodeRedundancyHandlerStub
- func (nrhs *NodeRedundancyHandlerStub) AdjustInactivityIfNeeded(selfPubKey string, consensusPubKeys []string, roundIndex int64)
- func (nrhs *NodeRedundancyHandlerStub) IsInterfaceNil() bool
- func (nrhs *NodeRedundancyHandlerStub) IsMainMachineActive() bool
- func (nrhs *NodeRedundancyHandlerStub) IsRedundancyNode() bool
- func (nrhs *NodeRedundancyHandlerStub) ObserverPrivateKey() crypto.PrivateKey
- func (nrhs *NodeRedundancyHandlerStub) ResetInactivityIfNeeded(selfPubKey string, consensusMsgPubKey string, consensusMsgPeerID core.PeerID)
- type NodeWrapperStub
- type P2PAntifloodHandlerStub
- func (p2pahs *P2PAntifloodHandlerStub) ApplyConsensusSize(size int)
- func (p2pahs *P2PAntifloodHandlerStub) BlacklistPeer(peer core.PeerID, reason string, duration time.Duration)
- func (p2pahs *P2PAntifloodHandlerStub) CanProcessMessage(message p2p.MessageP2P, fromConnectedPeer core.PeerID) error
- func (p2pahs *P2PAntifloodHandlerStub) CanProcessMessagesOnTopic(peer core.PeerID, topic string, numMessages uint32, totalSize uint64, ...) error
- func (p2pahs *P2PAntifloodHandlerStub) Close() error
- func (p2pahs *P2PAntifloodHandlerStub) IsInterfaceNil() bool
- func (p2pahs *P2PAntifloodHandlerStub) IsOriginatorEligibleForTopic(pid core.PeerID, topic string) error
- func (p2pahs *P2PAntifloodHandlerStub) ResetForTopic(_ string)
- func (p2pahs *P2PAntifloodHandlerStub) SetDebugger(debugger process.AntifloodDebugger) error
- func (p2pahs *P2PAntifloodHandlerStub) SetMaxMessagesForTopic(_ string, _ uint32)
- func (p2pahs *P2PAntifloodHandlerStub) SetPeerValidatorMapper(_ process.PeerValidatorMapper) error
- func (p2pahs *P2PAntifloodHandlerStub) SetTopicsForAll(_ ...string)
- type P2PMessageStub
- func (msg *P2PMessageStub) Data() []byte
- func (msg *P2PMessageStub) From() []byte
- func (msg *P2PMessageStub) IsInterfaceNil() bool
- func (msg *P2PMessageStub) Key() []byte
- func (msg *P2PMessageStub) Peer() core.PeerID
- func (msg *P2PMessageStub) SeqNo() []byte
- func (msg *P2PMessageStub) Signature() []byte
- func (msg *P2PMessageStub) Topics() []string
- type PeerBlackListHandlerStub
- type PeerDenialEvaluatorStub
- type PeerSignatureHandler
- 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 PrivateKeyStub
- type PublicKeyMock
- type QueryHandlerStub
- type RoundHandlerMock
- func (rndm *RoundHandlerMock) BeforeGenesis() bool
- func (rndm *RoundHandlerMock) Index() int64
- func (rndm *RoundHandlerMock) IsInterfaceNil() bool
- func (rndm *RoundHandlerMock) RemainingTime(startTime time.Time, maxTime time.Duration) time.Duration
- func (rndm *RoundHandlerMock) TimeDuration() time.Duration
- func (rndm *RoundHandlerMock) TimeStamp() time.Time
- func (rndm *RoundHandlerMock) UpdateRound(genesisRoundTimeStamp time.Time, timeStamp time.Time)
- type SCQueryServiceStub
- func (serviceStub *SCQueryServiceStub) Close() error
- func (serviceStub *SCQueryServiceStub) ComputeScCallGasLimit(tx *transaction.Transaction) (uint64, error)
- func (serviceStub *SCQueryServiceStub) ExecuteQuery(query *process.SCQuery) (*vmcommon.VMOutput, common.BlockInfo, error)
- func (serviceStub *SCQueryServiceStub) IsInterfaceNil() bool
- type ShardCoordinatorMock
- func (scm *ShardCoordinatorMock) CommunicationIdentifier(destShardID uint32) string
- func (scm *ShardCoordinatorMock) ComputeId(addr []byte) uint32
- func (scm *ShardCoordinatorMock) IsInterfaceNil() bool
- func (scm *ShardCoordinatorMock) NumberOfShards() uint32
- func (scm *ShardCoordinatorMock) SameShard(_, _ []byte) bool
- func (scm *ShardCoordinatorMock) SelfId() uint32
- func (scm *ShardCoordinatorMock) SetSelfShardId(shardId uint32) error
- type SingleSignerMock
- type SinglesignFailMock
- type SinglesignMock
- type SinglesignStub
- type StakeValuesProcessorStub
- type StatusComputerStub
- func (scs *StatusComputerStub) ComputeStatusWhenInStorageKnowingMiniblock(_ block.Type, _ *transaction.ApiTransactionResult) (transaction.TxStatus, error)
- func (scs *StatusComputerStub) ComputeStatusWhenInStorageNotKnowingMiniblock(_ uint32, _ *transaction.ApiTransactionResult) (transaction.TxStatus, error)
- func (scs *StatusComputerStub) SetStatusIfIsRewardReverted(_ *transaction.ApiTransactionResult, _ block.Type, _ uint64, _ []byte) (bool, error)
- type Streamer
- type SuiteMock
- func (s *SuiteMock) CreatePoint() crypto.Point
- func (s *SuiteMock) CreateScalar() crypto.Scalar
- func (s *SuiteMock) GetUnderlyingSuite() interface{}
- func (s *SuiteMock) IsInterfaceNil() bool
- func (s *SuiteMock) PointLen() int
- func (s *SuiteMock) RandomStream() cipher.Stream
- func (s *SuiteMock) ScalarLen() int
- func (s *SuiteMock) String() string
- type SyncTimerStub
- type ThrottlerStub
- type TransactionAPIHandlerStub
- func (tas *TransactionAPIHandlerStub) GetLastPoolNonceForSender(sender string) (uint64, error)
- func (tas *TransactionAPIHandlerStub) GetTransaction(hash string, withResults bool) (*transaction.ApiTransactionResult, error)
- func (tas *TransactionAPIHandlerStub) GetTransactionsPool(fields string) (*common.TransactionsPoolAPIResponse, error)
- func (tas *TransactionAPIHandlerStub) GetTransactionsPoolForSender(sender, fields string) (*common.TransactionsPoolForSenderApiResponse, error)
- func (tas *TransactionAPIHandlerStub) GetTransactionsPoolNonceGapsForSender(sender string, senderAccountNonce uint64) (*common.TransactionsPoolNonceGapsForSenderApiResponse, error)
- func (tas *TransactionAPIHandlerStub) IsInterfaceNil() bool
- func (tas *TransactionAPIHandlerStub) PopulateComputedFields(tx *transaction.ApiTransactionResult)
- func (tas *TransactionAPIHandlerStub) UnmarshalReceipt(receiptBytes []byte) (*transaction.ApiReceipt, error)
- func (tas *TransactionAPIHandlerStub) UnmarshalTransaction(txBytes []byte, txType transaction.TxType) (*transaction.ApiTransactionResult, error)
- type TransactionCostEstimatorMock
- func (tcem *TransactionCostEstimatorMock) ComputeTransactionGasLimit(tx *transaction.Transaction) (*transaction.CostResponse, error)
- func (tcem *TransactionCostEstimatorMock) IsInterfaceNil() bool
- func (tcem *TransactionCostEstimatorMock) SimulateTransactionExecution(tx *transaction.Transaction) (*txSimData.SimulationResultsWithVMOutput, error)
- type TxLogProcessorMock
- type VMContainerMock
- func (v *VMContainerMock) Add(key []byte, val vmcommon.VMExecutionHandler) error
- func (v *VMContainerMock) AddMultiple(keys [][]byte, vms []vmcommon.VMExecutionHandler) error
- func (v *VMContainerMock) Close() error
- func (v *VMContainerMock) Get(key []byte) (vmcommon.VMExecutionHandler, error)
- func (v *VMContainerMock) IsInterfaceNil() bool
- func (v *VMContainerMock) Keys() [][]byte
- func (v *VMContainerMock) Len() int
- func (v *VMContainerMock) Remove(key []byte)
- func (v *VMContainerMock) Replace(key []byte, val vmcommon.VMExecutionHandler) error
- type VMExecutionHandlerStub
- func (vm *VMExecutionHandlerStub) Close() error
- func (vm *VMExecutionHandlerStub) GasScheduleChange(newGasSchedule map[string]map[string]uint64)
- func (vm *VMExecutionHandlerStub) GetVersion() string
- func (vm *VMExecutionHandlerStub) IsInterfaceNil() bool
- func (vm *VMExecutionHandlerStub) RunSmartContractCall(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error)
- func (vm *VMExecutionHandlerStub) RunSmartContractCreate(input *vmcommon.ContractCreateInput) (*vmcommon.VMOutput, error)
- type VmMachinesContainerFactoryMock
- func (v *VmMachinesContainerFactoryMock) BlockChainHookImpl() process.BlockChainHookWithAccountsAdapter
- func (v *VmMachinesContainerFactoryMock) Close() error
- func (v *VmMachinesContainerFactoryMock) Create() (process.VirtualMachinesContainer, error)
- func (v *VmMachinesContainerFactoryMock) IsInterfaceNil() bool
- type WatchdogMock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAccumulatorMock ¶
func NewAccumulatorMock() *accumulatorMock
NewAccumulatorMock returns a mock implementation of the accumulator interface
func NewApplicationRunningTrigger ¶ added in v1.5.0
func NewApplicationRunningTrigger() *applicationRunningTrigger
NewApplicationRunningTrigger -
func NewMultiShardsCoordinatorMock ¶
func NewMultiShardsCoordinatorMock(nrShard uint32) *multipleShardsCoordinatorMock
NewMultiShardsCoordinatorMock -
func NewNonceHashConverterMock ¶
func NewNonceHashConverterMock() *nonceHashConverterMock
NewNonceHashConverterMock -
func NewOneShardCoordinatorMock ¶
func NewOneShardCoordinatorMock() *oneShardCoordinatorMock
NewOneShardCoordinatorMock -
Types ¶
type BlockAPIHandlerStub ¶
type BlockAPIHandlerStub struct {
GetBlockByNonceCalled func(nonce uint64, options api.BlockQueryOptions) (*api.Block, error)
GetBlockByHashCalled func(hash []byte, options api.BlockQueryOptions) (*api.Block, error)
GetBlockByRoundCalled func(round uint64, options api.BlockQueryOptions) (*api.Block, error)
GetAlteredAccountsForBlockCalled func(options api.GetAlteredAccountsForBlockOptions) ([]*alteredAccount.AlteredAccount, error)
}
BlockAPIHandlerStub -
func (*BlockAPIHandlerStub) GetAlteredAccountsForBlock ¶
func (bah *BlockAPIHandlerStub) GetAlteredAccountsForBlock(options api.GetAlteredAccountsForBlockOptions) ([]*alteredAccount.AlteredAccount, error)
GetAlteredAccountsForBlock -
func (*BlockAPIHandlerStub) GetBlockByHash ¶
func (bah *BlockAPIHandlerStub) GetBlockByHash(hash []byte, options api.BlockQueryOptions) (*api.Block, error)
GetBlockByHash -
func (*BlockAPIHandlerStub) GetBlockByNonce ¶
func (bah *BlockAPIHandlerStub) GetBlockByNonce(nonce uint64, options api.BlockQueryOptions) (*api.Block, error)
GetBlockByNonce -
func (*BlockAPIHandlerStub) GetBlockByRound ¶
func (bah *BlockAPIHandlerStub) GetBlockByRound(round uint64, options api.BlockQueryOptions) (*api.Block, error)
GetBlockByRound -
func (*BlockAPIHandlerStub) IsInterfaceNil ¶
func (bah *BlockAPIHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
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)
CheckBlockAgainstRoundHandlerCalled func(headerHandler data.HeaderHandler) error
CheckBlockAgainstFinalCalled func(headerHandler data.HeaderHandler) error
CheckBlockAgainstWhitelistCalled func(interceptedData process.InterceptedData) bool
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)
GetLastCrossNotarizedHeaderCalled func(shardID uint32) (data.HeaderHandler, []byte, error)
GetLastCrossNotarizedHeadersForAllShardsCalled func() (map[uint32]data.HeaderHandler, error)
GetLastSelfNotarizedHeaderCalled func(shardID uint32) (data.HeaderHandler, []byte, error)
GetSelfNotarizedHeaderCalled func(shardID uint32, offset uint64) (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
ShouldSkipMiniBlocksCreationFromSelfCalled func() bool
RegisterCrossNotarizedHeadersHandlerCalled func(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte))
RegisterSelfNotarizedFromCrossHeadersHandlerCalled func(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte))
RegisterSelfNotarizedHeadersHandlerCalled func(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte))
RegisterFinalMetachainHeadersHandlerCalled 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) CheckBlockAgainstRoundHandler ¶
func (bts *BlockTrackerStub) CheckBlockAgainstRoundHandler(headerHandler data.HeaderHandler) error
CheckBlockAgainstRoundHandler -
func (*BlockTrackerStub) CheckBlockAgainstWhitelist ¶
func (bts *BlockTrackerStub) CheckBlockAgainstWhitelist(interceptedData process.InterceptedData) bool
CheckBlockAgainstWhitelist -
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) 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) GetSelfNotarizedHeader ¶
func (bts *BlockTrackerStub) GetSelfNotarizedHeader(shardID uint32, offset uint64) (data.HeaderHandler, []byte, error)
GetSelfNotarizedHeader -
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) RegisterFinalMetachainHeadersHandler ¶
func (bts *BlockTrackerStub) RegisterFinalMetachainHeadersHandler(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte))
RegisterFinalMetachainHeadersHandler -
func (*BlockTrackerStub) RegisterSelfNotarizedFromCrossHeadersHandler ¶
func (bts *BlockTrackerStub) RegisterSelfNotarizedFromCrossHeadersHandler(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte))
RegisterSelfNotarizedFromCrossHeadersHandler -
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 -
func (*BlockTrackerStub) ShouldSkipMiniBlocksCreationFromSelf ¶
func (bts *BlockTrackerStub) ShouldSkipMiniBlocksCreationFromSelf() bool
ShouldSkipMiniBlocksCreationFromSelf -
type BootstrapStorerMock ¶
type BootstrapStorerMock struct {
PutCalled func(round int64, bootData bootstrapStorage.BootstrapData) error
GetCalled func(round int64) (bootstrapStorage.BootstrapData, error)
GetHighestRoundCalled func() int64
}
BootstrapStorerMock -
func (*BootstrapStorerMock) Get ¶
func (bsm *BootstrapStorerMock) Get(round int64) (bootstrapStorage.BootstrapData, error)
Get -
func (*BootstrapStorerMock) GetHighestRound ¶
func (bsm *BootstrapStorerMock) GetHighestRound() int64
GetHighestRound -
func (*BootstrapStorerMock) IsInterfaceNil ¶
func (bsm *BootstrapStorerMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*BootstrapStorerMock) Put ¶
func (bsm *BootstrapStorerMock) Put(round int64, bootData bootstrapStorage.BootstrapData) error
Put -
func (*BootstrapStorerMock) SaveLastRound ¶
func (bsm *BootstrapStorerMock) SaveLastRound(_ int64) error
SaveLastRound -
type DelegatedListProcessorStub ¶
type DelegatedListProcessorStub struct {
GetDelegatorsListCalled func(ctx context.Context) ([]*api.Delegator, error)
}
DelegatedListProcessorStub -
func (*DelegatedListProcessorStub) GetDelegatorsList ¶
func (dlps *DelegatedListProcessorStub) GetDelegatorsList(ctx context.Context) ([]*api.Delegator, error)
GetDelegatorsList -
func (*DelegatedListProcessorStub) IsInterfaceNil ¶
func (dlps *DelegatedListProcessorStub) IsInterfaceNil() bool
IsInterfaceNil -
type DirectStakedListProcessorStub ¶
type DirectStakedListProcessorStub struct {
GetDirectStakedListCalled func(ctx context.Context) ([]*api.DirectStakedValue, error)
}
DirectStakedListProcessorStub -
func (*DirectStakedListProcessorStub) GetDirectStakedList ¶
func (dslps *DirectStakedListProcessorStub) GetDirectStakedList(ctx context.Context) ([]*api.DirectStakedValue, error)
GetDirectStakedList -
func (*DirectStakedListProcessorStub) IsInterfaceNil ¶
func (dslps *DirectStakedListProcessorStub) IsInterfaceNil() bool
IsInterfaceNil -
type EpochStartNotifierStub ¶
type EpochStartNotifierStub struct {
RegisterHandlerCalled func(handler epochStart.ActionHandler)
UnregisterHandlerCalled func(handler epochStart.ActionHandler)
NotifyAllCalled func(hdr data.HeaderHandler)
NotifyAllPrepareCalled func(hdr data.HeaderHandler, body data.BodyHandler)
NotifyEpochChangeConfirmedCalled func(epoch uint32)
// 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(metaHdr data.HeaderHandler, body data.BodyHandler)
NotifyAllPrepare -
func (*EpochStartNotifierStub) NotifyEpochChangeConfirmed ¶
func (esnm *EpochStartNotifierStub) NotifyEpochChangeConfirmed(epoch uint32)
NotifyEpochChangeConfirmed -
func (*EpochStartNotifierStub) RegisterHandler ¶
func (esnm *EpochStartNotifierStub) RegisterHandler(handler epochStart.ActionHandler)
RegisterHandler -
func (*EpochStartNotifierStub) UnregisterHandler ¶
func (esnm *EpochStartNotifierStub) UnregisterHandler(handler epochStart.ActionHandler)
UnregisterHandler -
type EpochStartTriggerStub ¶
type EpochStartTriggerStub struct {
ForceEpochStartCalled func(round uint64)
IsEpochStartCalled func() bool
EpochCalled func() uint32
MetaEpochCalled func() uint32
ReceivedHeaderCalled func(handler data.HeaderHandler)
UpdateCalled func(round uint64, nonce uint64)
ProcessedCalled func(header data.HeaderHandler)
EpochStartRoundCalled func() uint64
}
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)
ForceEpochStart -
func (*EpochStartTriggerStub) GetSavedStateKey ¶
func (e *EpochStartTriggerStub) GetSavedStateKey() []byte
GetSavedStateKey -
func (*EpochStartTriggerStub) IsEpochStart ¶
func (e *EpochStartTriggerStub) IsEpochStart() bool
IsEpochStart -
func (*EpochStartTriggerStub) IsInterfaceNil ¶
func (e *EpochStartTriggerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*EpochStartTriggerStub) LoadState ¶
func (e *EpochStartTriggerStub) LoadState(_ []byte) error
LoadState -
func (*EpochStartTriggerStub) MetaEpoch ¶
func (e *EpochStartTriggerStub) MetaEpoch() uint32
MetaEpoch -
func (*EpochStartTriggerStub) NotifyAll ¶
func (e *EpochStartTriggerStub) NotifyAll(_ data.HeaderHandler)
NotifyAll -
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) SetAppStatusHandler ¶
func (e *EpochStartTriggerStub) SetAppStatusHandler(_ core.AppStatusHandler) error
SetAppStatusHandler -
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, _ data.BodyHandler)
SetProcessed -
func (*EpochStartTriggerStub) Update ¶
func (e *EpochStartTriggerStub) Update(round uint64, nonce uint64)
Update -
type ForkDetectorMock ¶
type ForkDetectorMock struct {
AddHeaderCalled func(header data.HeaderHandler, hash []byte, state process.BlockHeaderState, selfNotarizedHeaders []data.HeaderHandler, selfNotarizedHeadersHashes [][]byte) error
RemoveHeaderCalled func(nonce uint64, hash []byte)
CheckForkCalled func() *process.ForkInfo
GetHighestFinalBlockNonceCalled func() uint64
GetHighestFinalBlockHashCalled func() []byte
ProbableHighestNonceCalled func() uint64
ResetForkCalled func()
GetNotarizedHeaderHashCalled func(nonce uint64) []byte
SetRollBackNonceCalled func(nonce uint64)
RestoreToGenesisCalled func()
ResetProbableHighestNonceCalled func()
SetFinalToLastCheckpointCalled 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 GetProbableHighestNonce
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) SetFinalToLastCheckpoint ¶
func (fdm *ForkDetectorMock) SetFinalToLastCheckpoint()
SetFinalToLastCheckpoint -
func (*ForkDetectorMock) SetRollBackNonce ¶
func (fdm *ForkDetectorMock) SetRollBackNonce(nonce uint64)
SetRollBackNonce -
type GeneratorSuite ¶
GeneratorSuite -
func (*GeneratorSuite) CreateKey ¶
func (gs *GeneratorSuite) CreateKey(c cipher.Stream) crypto.Scalar
CreateKey -
type HasherMock ¶
HasherMock -
func (HasherMock) IsInterfaceNil ¶
func (hash HasherMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type HeaderIntegrityVerifierStub ¶
type HeaderIntegrityVerifierStub struct {
VerifyCalled func(header data.HeaderHandler) error
GetVersionCalled func(epoch uint32) string
}
HeaderIntegrityVerifierStub -
func (*HeaderIntegrityVerifierStub) GetVersion ¶
func (h *HeaderIntegrityVerifierStub) GetVersion(epoch uint32) string
GetVersion -
func (*HeaderIntegrityVerifierStub) IsInterfaceNil ¶
func (h *HeaderIntegrityVerifierStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*HeaderIntegrityVerifierStub) Verify ¶
func (h *HeaderIntegrityVerifierStub) Verify(header data.HeaderHandler) error
Verify -
type HeaderSigVerifierStub ¶
type HeaderSigVerifierStub struct {
VerifyRandSeedAndLeaderSignatureCalled func(header data.HeaderHandler) error
VerifySignatureCalled func(header data.HeaderHandler) error
VerifyRandSeedCalled func(header data.HeaderHandler) error
VerifyLeaderSignatureCalled func(header data.HeaderHandler) error
}
HeaderSigVerifierStub -
func (*HeaderSigVerifierStub) IsInterfaceNil ¶
func (hsvm *HeaderSigVerifierStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*HeaderSigVerifierStub) VerifyLeaderSignature ¶
func (hsvm *HeaderSigVerifierStub) VerifyLeaderSignature(header data.HeaderHandler) error
VerifyLeaderSignature -
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 HeaderValidatorStub ¶
type HeaderValidatorStub struct {
IsHeaderConstructionValidCalled func(currHdr, prevHdr data.HeaderHandler) error
}
HeaderValidatorStub -
func (*HeaderValidatorStub) IsHeaderConstructionValid ¶
func (hvs *HeaderValidatorStub) IsHeaderConstructionValid(currHdr, prevHdr data.HeaderHandler) error
IsHeaderConstructionValid -
func (*HeaderValidatorStub) IsInterfaceNil ¶
func (hvs *HeaderValidatorStub) IsInterfaceNil() bool
IsInterfaceNil returns if underlying object is true
type HeadersCacherStub ¶
type HeadersCacherStub struct {
AddCalled func(headerHash []byte, header data.HeaderHandler)
RemoveHeaderByHashCalled func(headerHash []byte)
RemoveHeaderByNonceAndShardIdCalled func(hdrNonce uint64, shardId uint32)
GetHeaderByNonceAndShardIdCalled func(hdrNonce uint64, shardId uint32) ([]data.HeaderHandler, [][]byte, error)
GetHeaderByHashCalled func(hash []byte) (data.HeaderHandler, error)
ClearCalled func()
RegisterHandlerCalled func(handler func(header data.HeaderHandler, shardHeaderHash []byte))
NoncesCalled func(shardId uint32) []uint64
LenCalled func() int
MaxSizeCalled func() int
GetNumHeadersCalled func(shardId uint32) int
}
HeadersCacherStub -
func (*HeadersCacherStub) AddHeader ¶
func (hcs *HeadersCacherStub) AddHeader(headerHash []byte, header data.HeaderHandler)
AddHeader -
func (*HeadersCacherStub) GetHeaderByHash ¶
func (hcs *HeadersCacherStub) GetHeaderByHash(hash []byte) (data.HeaderHandler, error)
GetHeaderByHash -
func (*HeadersCacherStub) GetHeadersByNonceAndShardId ¶
func (hcs *HeadersCacherStub) GetHeadersByNonceAndShardId(hdrNonce uint64, shardId uint32) ([]data.HeaderHandler, [][]byte, error)
GetHeadersByNonceAndShardId -
func (*HeadersCacherStub) GetNumHeaders ¶
func (hcs *HeadersCacherStub) GetNumHeaders(shardId uint32) int
GetNumHeaders -
func (*HeadersCacherStub) IsInterfaceNil ¶
func (hcs *HeadersCacherStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*HeadersCacherStub) Nonces ¶
func (hcs *HeadersCacherStub) Nonces(shardId uint32) []uint64
Nonces -
func (*HeadersCacherStub) RegisterHandler ¶
func (hcs *HeadersCacherStub) RegisterHandler(handler func(header data.HeaderHandler, shardHeaderHash []byte))
RegisterHandler -
func (*HeadersCacherStub) RemoveHeaderByHash ¶
func (hcs *HeadersCacherStub) RemoveHeaderByHash(headerHash []byte)
RemoveHeaderByHash -
func (*HeadersCacherStub) RemoveHeaderByNonceAndShardId ¶
func (hcs *HeadersCacherStub) RemoveHeaderByNonceAndShardId(hdrNonce uint64, shardId uint32)
RemoveHeaderByNonceAndShardId -
type InternalBlockApiHandlerStub ¶
type InternalBlockApiHandlerStub struct {
GetInternalShardBlockByNonceCalled func(format common.ApiOutputFormat, nonce uint64) (interface{}, error)
GetInternalShardBlockByHashCalled func(format common.ApiOutputFormat, hash []byte) (interface{}, error)
GetInternalShardBlockByRoundCalled func(format common.ApiOutputFormat, round uint64) (interface{}, error)
GetInternalMetaBlockByNonceCalled func(format common.ApiOutputFormat, nonce uint64) (interface{}, error)
GetInternalMetaBlockByHashCalled func(format common.ApiOutputFormat, hash []byte) (interface{}, error)
GetInternalMetaBlockByRoundCalled func(format common.ApiOutputFormat, round uint64) (interface{}, error)
GetInternalMiniBlockCalled func(format common.ApiOutputFormat, hash []byte, epoch uint32) (interface{}, error)
GetInternalStartOfEpochMetaBlockCalled func(format common.ApiOutputFormat, epoch uint32) (interface{}, error)
GetInternalStartOfEpochValidatorsInfoCalled func(epoch uint32) ([]*state.ShardValidatorInfo, error)
}
InternalBlockApiHandlerStub -
func (*InternalBlockApiHandlerStub) GetInternalMetaBlockByHash ¶
func (ibah *InternalBlockApiHandlerStub) GetInternalMetaBlockByHash(format common.ApiOutputFormat, hash []byte) (interface{}, error)
GetInternalMetaBlockByHash -
func (*InternalBlockApiHandlerStub) GetInternalMetaBlockByNonce ¶
func (ibah *InternalBlockApiHandlerStub) GetInternalMetaBlockByNonce(format common.ApiOutputFormat, nonce uint64) (interface{}, error)
GetInternalMetaBlockByNonce -
func (*InternalBlockApiHandlerStub) GetInternalMetaBlockByRound ¶
func (ibah *InternalBlockApiHandlerStub) GetInternalMetaBlockByRound(format common.ApiOutputFormat, round uint64) (interface{}, error)
GetInternalMetaBlockByRound -
func (*InternalBlockApiHandlerStub) GetInternalMiniBlock ¶
func (ibah *InternalBlockApiHandlerStub) GetInternalMiniBlock(format common.ApiOutputFormat, hash []byte, epoch uint32) (interface{}, error)
GetInternalMiniBlock -
func (*InternalBlockApiHandlerStub) GetInternalShardBlockByHash ¶
func (ibah *InternalBlockApiHandlerStub) GetInternalShardBlockByHash(format common.ApiOutputFormat, hash []byte) (interface{}, error)
GetInternalShardBlockByHash -
func (*InternalBlockApiHandlerStub) GetInternalShardBlockByNonce ¶
func (ibah *InternalBlockApiHandlerStub) GetInternalShardBlockByNonce(format common.ApiOutputFormat, nonce uint64) (interface{}, error)
GetInternalShardBlockByNonce -
func (*InternalBlockApiHandlerStub) GetInternalShardBlockByRound ¶
func (ibah *InternalBlockApiHandlerStub) GetInternalShardBlockByRound(format common.ApiOutputFormat, round uint64) (interface{}, error)
GetInternalShardBlockByRound -
func (*InternalBlockApiHandlerStub) GetInternalStartOfEpochMetaBlock ¶
func (ibah *InternalBlockApiHandlerStub) GetInternalStartOfEpochMetaBlock(format common.ApiOutputFormat, epoch uint32) (interface{}, error)
GetInternalStartOfEpochMetaBlock -
func (*InternalBlockApiHandlerStub) GetInternalStartOfEpochValidatorsInfo ¶
func (ibah *InternalBlockApiHandlerStub) GetInternalStartOfEpochValidatorsInfo(epoch uint32) ([]*state.ShardValidatorInfo, error)
GetInternalStartOfEpochValidatorsInfo -
func (*InternalBlockApiHandlerStub) IsInterfaceNil ¶
func (ibah *InternalBlockApiHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
type KeyGenMock ¶
type KeyGenMock struct {
GeneratePairMock func() (crypto.PrivateKey, crypto.PublicKey)
PrivateKeyFromByteArrayMock func(b []byte) (crypto.PrivateKey, error)
PublicKeyFromByteArrayMock func(b []byte) (crypto.PublicKey, error)
SuiteMock func() crypto.Suite
}
KeyGenMock -
func (*KeyGenMock) CheckPublicKeyValid ¶
func (keyGen *KeyGenMock) CheckPublicKeyValid(_ []byte) error
CheckPublicKeyValid -
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(b []byte) (crypto.PrivateKey, error)
PrivateKeyFromByteArray -
func (*KeyGenMock) PublicKeyFromByteArray ¶
func (keyGen *KeyGenMock) PublicKeyFromByteArray(b []byte) (crypto.PublicKey, error)
PublicKeyFromByteArray -
type MarshalizerFake ¶
type MarshalizerFake struct {
Fail bool
}
MarshalizerFake that will be used for testing
func (*MarshalizerFake) IsInterfaceNil ¶
func (mm *MarshalizerFake) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*MarshalizerFake) Marshal ¶
func (mm *MarshalizerFake) Marshal(obj interface{}) ([]byte, error)
Marshal converts the input object in a slice of bytes
func (*MarshalizerFake) Unmarshal ¶
func (mm *MarshalizerFake) Unmarshal(obj interface{}, buff []byte) error
Unmarshal applies the serialized values over an instantiated object
type MarshalizerMock ¶
type MarshalizerMock struct {
MarshalHandler func(obj interface{}) ([]byte, error)
UnmarshalHandler func(obj interface{}, buff []byte) error
}
MarshalizerMock -
func (*MarshalizerMock) IsInterfaceNil ¶
func (j *MarshalizerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*MarshalizerMock) Marshal ¶
func (j *MarshalizerMock) Marshal(obj interface{}) ([]byte, error)
Marshal -
func (*MarshalizerMock) Unmarshal ¶
func (j *MarshalizerMock) Unmarshal(obj interface{}, buff []byte) error
Unmarshal -
type MiniBlocksProviderStub ¶
type MiniBlocksProviderStub struct {
GetMiniBlocksCalled func(hashes [][]byte) ([]*block.MiniblockAndHash, [][]byte)
GetMiniBlocksFromPoolCalled func(hashes [][]byte) ([]*block.MiniblockAndHash, [][]byte)
GetMiniBlocksFromStorerCalled func(hashes [][]byte) ([]*block.MiniblockAndHash, [][]byte)
}
MiniBlocksProviderStub -
func (*MiniBlocksProviderStub) GetMiniBlocks ¶
func (mbps *MiniBlocksProviderStub) GetMiniBlocks(hashes [][]byte) ([]*block.MiniblockAndHash, [][]byte)
GetMiniBlocks -
func (*MiniBlocksProviderStub) GetMiniBlocksFromPool ¶
func (mbps *MiniBlocksProviderStub) GetMiniBlocksFromPool(hashes [][]byte) ([]*block.MiniblockAndHash, [][]byte)
GetMiniBlocksFromPool -
func (*MiniBlocksProviderStub) GetMiniBlocksFromStorer ¶
func (mbps *MiniBlocksProviderStub) GetMiniBlocksFromStorer(hashes [][]byte) ([]*block.MiniblockAndHash, [][]byte)
GetMiniBlocksFromStorer -
func (*MiniBlocksProviderStub) IsInterfaceNil ¶
func (mbps *MiniBlocksProviderStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type NodeRedundancyHandlerStub ¶
type NodeRedundancyHandlerStub struct {
IsRedundancyNodeCalled func() bool
IsMainMachineActiveCalled func() bool
AdjustInactivityIfNeededCalled func(selfPubKey string, consensusPubKeys []string, roundIndex int64)
ResetInactivityIfNeededCalled func(selfPubKey string, consensusMsgPubKey string, consensusMsgPeerID core.PeerID)
ObserverPrivateKeyCalled func() crypto.PrivateKey
}
NodeRedundancyHandlerStub -
func (*NodeRedundancyHandlerStub) AdjustInactivityIfNeeded ¶
func (nrhs *NodeRedundancyHandlerStub) AdjustInactivityIfNeeded(selfPubKey string, consensusPubKeys []string, roundIndex int64)
AdjustInactivityIfNeeded -
func (*NodeRedundancyHandlerStub) IsInterfaceNil ¶
func (nrhs *NodeRedundancyHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*NodeRedundancyHandlerStub) IsMainMachineActive ¶
func (nrhs *NodeRedundancyHandlerStub) IsMainMachineActive() bool
IsMainMachineActive -
func (*NodeRedundancyHandlerStub) IsRedundancyNode ¶
func (nrhs *NodeRedundancyHandlerStub) IsRedundancyNode() bool
IsRedundancyNode -
func (*NodeRedundancyHandlerStub) ObserverPrivateKey ¶
func (nrhs *NodeRedundancyHandlerStub) ObserverPrivateKey() crypto.PrivateKey
ObserverPrivateKey -
func (*NodeRedundancyHandlerStub) ResetInactivityIfNeeded ¶
func (nrhs *NodeRedundancyHandlerStub) ResetInactivityIfNeeded(selfPubKey string, consensusMsgPubKey string, consensusMsgPeerID core.PeerID)
ResetInactivityIfNeeded -
type NodeWrapperStub ¶
type NodeWrapperStub struct {
AddQueryHandlerCalled func(name string, handler debug.QueryHandler) error
}
NodeWrapperStub -
func (*NodeWrapperStub) AddQueryHandler ¶
func (nws *NodeWrapperStub) AddQueryHandler(name string, handler debug.QueryHandler) error
AddQueryHandler -
func (*NodeWrapperStub) IsInterfaceNil ¶
func (nws *NodeWrapperStub) IsInterfaceNil() bool
IsInterfaceNil -
type P2PAntifloodHandlerStub ¶
type P2PAntifloodHandlerStub struct {
CanProcessMessageCalled func(message p2p.MessageP2P, fromConnectedPeer core.PeerID) error
CanProcessMessagesOnTopicCalled func(peer core.PeerID, topic string, numMessages uint32, totalSize uint64, sequence []byte) error
ApplyConsensusSizeCalled func(size int)
SetDebuggerCalled func(debugger process.AntifloodDebugger) error
BlacklistPeerCalled func(peer core.PeerID, reason string, duration time.Duration)
IsOriginatorEligibleForTopicCalled func(pid core.PeerID, topic string) error
}
P2PAntifloodHandlerStub -
func (*P2PAntifloodHandlerStub) ApplyConsensusSize ¶
func (p2pahs *P2PAntifloodHandlerStub) ApplyConsensusSize(size int)
ApplyConsensusSize -
func (*P2PAntifloodHandlerStub) BlacklistPeer ¶
func (p2pahs *P2PAntifloodHandlerStub) BlacklistPeer(peer core.PeerID, reason string, duration time.Duration)
BlacklistPeer -
func (*P2PAntifloodHandlerStub) CanProcessMessage ¶
func (p2pahs *P2PAntifloodHandlerStub) CanProcessMessage(message p2p.MessageP2P, fromConnectedPeer core.PeerID) error
CanProcessMessage -
func (*P2PAntifloodHandlerStub) CanProcessMessagesOnTopic ¶
func (p2pahs *P2PAntifloodHandlerStub) CanProcessMessagesOnTopic(peer core.PeerID, topic string, numMessages uint32, totalSize uint64, sequence []byte) error
CanProcessMessagesOnTopic -
func (*P2PAntifloodHandlerStub) Close ¶
func (p2pahs *P2PAntifloodHandlerStub) Close() error
Close -
func (*P2PAntifloodHandlerStub) IsInterfaceNil ¶
func (p2pahs *P2PAntifloodHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*P2PAntifloodHandlerStub) IsOriginatorEligibleForTopic ¶
func (p2pahs *P2PAntifloodHandlerStub) IsOriginatorEligibleForTopic(pid core.PeerID, topic string) error
IsOriginatorEligibleForTopic -
func (*P2PAntifloodHandlerStub) ResetForTopic ¶
func (p2pahs *P2PAntifloodHandlerStub) ResetForTopic(_ string)
ResetForTopic -
func (*P2PAntifloodHandlerStub) SetDebugger ¶
func (p2pahs *P2PAntifloodHandlerStub) SetDebugger(debugger process.AntifloodDebugger) error
SetDebugger -
func (*P2PAntifloodHandlerStub) SetMaxMessagesForTopic ¶
func (p2pahs *P2PAntifloodHandlerStub) SetMaxMessagesForTopic(_ string, _ uint32)
SetMaxMessagesForTopic -
func (*P2PAntifloodHandlerStub) SetPeerValidatorMapper ¶
func (p2pahs *P2PAntifloodHandlerStub) SetPeerValidatorMapper(_ process.PeerValidatorMapper) error
SetPeerValidatorMapper -
func (*P2PAntifloodHandlerStub) SetTopicsForAll ¶
func (p2pahs *P2PAntifloodHandlerStub) SetTopicsForAll(_ ...string)
SetTopicsForAll -
type P2PMessageStub ¶
type P2PMessageStub struct {
FromField []byte
DataField []byte
SeqNoField []byte
TopicsField []string
SignatureField []byte
KeyField []byte
PeerField core.PeerID
}
P2PMessageStub -
func (*P2PMessageStub) IsInterfaceNil ¶
func (msg *P2PMessageStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type PeerBlackListHandlerStub ¶
type PeerBlackListHandlerStub struct {
UpsertCalled func(pid core.PeerID, span time.Duration) error
HasCalled func(pid core.PeerID) bool
SweepCalled func()
}
PeerBlackListHandlerStub -
func (*PeerBlackListHandlerStub) Has ¶
func (pblhs *PeerBlackListHandlerStub) Has(pid core.PeerID) bool
Has -
func (*PeerBlackListHandlerStub) IsInterfaceNil ¶
func (pblhs *PeerBlackListHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
type PeerDenialEvaluatorStub ¶
type PeerDenialEvaluatorStub struct {
IsDeniedCalled func(pid core.PeerID) bool
UpsertPeerIDCalled func(pid core.PeerID, duration time.Duration) error
}
PeerDenialEvaluatorStub -
func (*PeerDenialEvaluatorStub) IsDenied ¶
func (pdes *PeerDenialEvaluatorStub) IsDenied(pid core.PeerID) bool
IsDenied -
func (*PeerDenialEvaluatorStub) IsInterfaceNil ¶
func (pdes *PeerDenialEvaluatorStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*PeerDenialEvaluatorStub) UpsertPeerID ¶
UpsertPeerID -
type PeerSignatureHandler ¶
type PeerSignatureHandler struct{}
PeerSignatureHandler -
func (*PeerSignatureHandler) GetPeerSignature ¶
func (p *PeerSignatureHandler) GetPeerSignature(_ crypto.PrivateKey, _ []byte) ([]byte, error)
GetPeerSignature -
func (*PeerSignatureHandler) IsInterfaceNil ¶
func (p *PeerSignatureHandler) IsInterfaceNil() bool
IsInterfaceNil -
func (*PeerSignatureHandler) VerifyPeerSignature ¶
VerifyPeerSignature -
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 PrivateKeyStub ¶
type PrivateKeyStub struct {
ToByteArrayHandler func() ([]byte, error)
GeneratePublicHandler func() crypto.PublicKey
SuiteHandler func() crypto.Suite
ScalarHandler func() crypto.Scalar
}
PrivateKeyStub -
func (*PrivateKeyStub) GeneratePublic ¶
func (sk *PrivateKeyStub) GeneratePublic() crypto.PublicKey
GeneratePublic -
func (*PrivateKeyStub) IsInterfaceNil ¶
func (sk *PrivateKeyStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*PrivateKeyStub) ToByteArray ¶
func (sk *PrivateKeyStub) ToByteArray() ([]byte, error)
ToByteArray -
type PublicKeyMock ¶
type PublicKeyMock struct {
ToByteArrayHandler func() ([]byte, error)
SuiteCalled func() crypto.Suite
PointCalled func() crypto.Point
}
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 QueryHandlerStub ¶
QueryHandlerStub -
func (*QueryHandlerStub) IsInterfaceNil ¶
func (qhs *QueryHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
type RoundHandlerMock ¶
type RoundHandlerMock struct {
IndexCalled func() int64
TimeDurationCalled func() time.Duration
TimeStampCalled func() time.Time
UpdateRoundCalled func(time.Time, time.Time)
RemainingTimeCalled func(startTime time.Time, maxTime time.Duration) time.Duration
BeforeGenesisCalled func() bool
// contains filtered or unexported fields
}
RoundHandlerMock -
func (*RoundHandlerMock) BeforeGenesis ¶
func (rndm *RoundHandlerMock) BeforeGenesis() bool
BeforeGenesis -
func (*RoundHandlerMock) IsInterfaceNil ¶
func (rndm *RoundHandlerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*RoundHandlerMock) RemainingTime ¶
func (rndm *RoundHandlerMock) RemainingTime(startTime time.Time, maxTime time.Duration) time.Duration
RemainingTime -
func (*RoundHandlerMock) TimeDuration ¶
func (rndm *RoundHandlerMock) TimeDuration() time.Duration
TimeDuration -
func (*RoundHandlerMock) TimeStamp ¶
func (rndm *RoundHandlerMock) TimeStamp() time.Time
TimeStamp -
func (*RoundHandlerMock) UpdateRound ¶
func (rndm *RoundHandlerMock) UpdateRound(genesisRoundTimeStamp time.Time, timeStamp time.Time)
UpdateRound -
type SCQueryServiceStub ¶
type SCQueryServiceStub struct {
ExecuteQueryCalled func(*process.SCQuery) (*vmcommon.VMOutput, common.BlockInfo, error)
ComputeScCallGasLimitHandler func(tx *transaction.Transaction) (uint64, error)
CloseCalled func() error
}
SCQueryServiceStub -
func (*SCQueryServiceStub) ComputeScCallGasLimit ¶
func (serviceStub *SCQueryServiceStub) ComputeScCallGasLimit(tx *transaction.Transaction) (uint64, error)
ComputeScCallGasLimit -
func (*SCQueryServiceStub) ExecuteQuery ¶
func (serviceStub *SCQueryServiceStub) ExecuteQuery(query *process.SCQuery) (*vmcommon.VMOutput, common.BlockInfo, error)
ExecuteQuery -
func (*SCQueryServiceStub) IsInterfaceNil ¶
func (serviceStub *SCQueryServiceStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type ShardCoordinatorMock ¶
ShardCoordinatorMock -
func (*ShardCoordinatorMock) CommunicationIdentifier ¶
func (scm *ShardCoordinatorMock) CommunicationIdentifier(destShardID uint32) string
CommunicationIdentifier -
func (*ShardCoordinatorMock) ComputeId ¶
func (scm *ShardCoordinatorMock) ComputeId(addr []byte) uint32
ComputeId -
func (*ShardCoordinatorMock) IsInterfaceNil ¶
func (scm *ShardCoordinatorMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ShardCoordinatorMock) NumberOfShards ¶
func (scm *ShardCoordinatorMock) NumberOfShards() uint32
NumberOfShards -
func (*ShardCoordinatorMock) SameShard ¶
func (scm *ShardCoordinatorMock) SameShard(_, _ []byte) bool
SameShard -
func (*ShardCoordinatorMock) SetSelfShardId ¶
func (scm *ShardCoordinatorMock) SetSelfShardId(shardId uint32) error
SetSelfShardId -
type SingleSignerMock ¶
type SingleSignerMock struct {
SignStub func(private crypto.PrivateKey, msg []byte) ([]byte, error)
VerifyStub func(public crypto.PublicKey, msg []byte, sig []byte) error
}
SingleSignerMock -
func (*SingleSignerMock) IsInterfaceNil ¶
func (s *SingleSignerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type SinglesignFailMock ¶
type SinglesignFailMock struct {
}
SinglesignFailMock -
func (*SinglesignFailMock) IsInterfaceNil ¶
func (s *SinglesignFailMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type SinglesignMock ¶
type SinglesignMock struct {
}
SinglesignMock -
func (*SinglesignMock) IsInterfaceNil ¶
func (s *SinglesignMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type SinglesignStub ¶
type SinglesignStub struct {
SignCalled func(private crypto.PrivateKey, msg []byte) ([]byte, error)
VerifyCalled func(public crypto.PublicKey, msg []byte, sig []byte) error
}
SinglesignStub -
func (*SinglesignStub) IsInterfaceNil ¶
func (s *SinglesignStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type StakeValuesProcessorStub ¶
type StakeValuesProcessorStub struct {
GetTotalStakedValueCalled func(ctx context.Context) (*api.StakeValues, error)
}
StakeValuesProcessorStub -
func (*StakeValuesProcessorStub) GetTotalStakedValue ¶
func (svps *StakeValuesProcessorStub) GetTotalStakedValue(ctx context.Context) (*api.StakeValues, error)
GetTotalStakedValue -
func (*StakeValuesProcessorStub) IsInterfaceNil ¶
func (svps *StakeValuesProcessorStub) IsInterfaceNil() bool
IsInterfaceNil -
type StatusComputerStub ¶
type StatusComputerStub struct {
}
StatusComputerStub -
func (*StatusComputerStub) ComputeStatusWhenInStorageKnowingMiniblock ¶
func (scs *StatusComputerStub) ComputeStatusWhenInStorageKnowingMiniblock(_ block.Type, _ *transaction.ApiTransactionResult) (transaction.TxStatus, error)
ComputeStatusWhenInStorageKnowingMiniblock -
func (*StatusComputerStub) ComputeStatusWhenInStorageNotKnowingMiniblock ¶
func (scs *StatusComputerStub) ComputeStatusWhenInStorageNotKnowingMiniblock(_ uint32, _ *transaction.ApiTransactionResult) (transaction.TxStatus, error)
ComputeStatusWhenInStorageNotKnowingMiniblock -
func (*StatusComputerStub) SetStatusIfIsRewardReverted ¶
func (scs *StatusComputerStub) SetStatusIfIsRewardReverted(_ *transaction.ApiTransactionResult, _ block.Type, _ uint64, _ []byte) (bool, error)
SetStatusIfIsRewardReverted -
type Streamer ¶
type Streamer struct {
// contains filtered or unexported fields
}
Streamer -
func (*Streamer) XORKeyStream ¶
XORKeyStream -
type SuiteMock ¶
type SuiteMock struct {
StringStub func() string
ScalarLenStub func() int
CreateScalarStub func() crypto.Scalar
PointLenStub func() int
CreatePointStub func() crypto.Point
CreatePointForScalarStub func(scalar crypto.Scalar) crypto.Point
RandomStreamStub func() cipher.Stream
GetUnderlyingSuiteStub func() interface{}
}
SuiteMock -
func (*SuiteMock) GetUnderlyingSuite ¶
func (s *SuiteMock) GetUnderlyingSuite() interface{}
GetUnderlyingSuite -
func (*SuiteMock) IsInterfaceNil ¶
IsInterfaceNil returns true if there is no value under the interface
type SyncTimerStub ¶
type SyncTimerStub struct {
}
SyncTimerStub -
func (*SyncTimerStub) ClockOffset ¶
func (sts *SyncTimerStub) ClockOffset() time.Duration
ClockOffset -
func (*SyncTimerStub) FormattedCurrentTime ¶
func (sts *SyncTimerStub) FormattedCurrentTime() string
FormattedCurrentTime -
func (*SyncTimerStub) IsInterfaceNil ¶
func (sts *SyncTimerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*SyncTimerStub) StartSyncingTime ¶
func (sts *SyncTimerStub) StartSyncingTime()
StartSyncingTime -
type ThrottlerStub ¶
type ThrottlerStub struct {
CanProcessCalled func() bool
StartProcessingCalled func()
EndProcessingCalled func()
StartWasCalled bool
EndWasCalled bool
}
ThrottlerStub -
func (*ThrottlerStub) IsInterfaceNil ¶
func (ts *ThrottlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*ThrottlerStub) StartProcessing ¶
func (ts *ThrottlerStub) StartProcessing()
StartProcessing -
type TransactionAPIHandlerStub ¶
type TransactionAPIHandlerStub struct {
GetTransactionCalled func(hash string, withResults bool) (*transaction.ApiTransactionResult, error)
GetTransactionsPoolCalled func(fields string) (*common.TransactionsPoolAPIResponse, error)
GetTransactionsPoolForSenderCalled func(sender, fields string) (*common.TransactionsPoolForSenderApiResponse, error)
GetLastPoolNonceForSenderCalled func(sender string) (uint64, error)
GetTransactionsPoolNonceGapsForSenderCalled func(sender string, senderAccountNonce uint64) (*common.TransactionsPoolNonceGapsForSenderApiResponse, error)
UnmarshalTransactionCalled func(txBytes []byte, txType transaction.TxType) (*transaction.ApiTransactionResult, error)
UnmarshalReceiptCalled func(receiptBytes []byte) (*transaction.ApiReceipt, error)
PopulateComputedFieldsCalled func(tx *transaction.ApiTransactionResult)
}
TransactionAPIHandlerStub -
func (*TransactionAPIHandlerStub) GetLastPoolNonceForSender ¶
func (tas *TransactionAPIHandlerStub) GetLastPoolNonceForSender(sender string) (uint64, error)
GetLastPoolNonceForSender -
func (*TransactionAPIHandlerStub) GetTransaction ¶
func (tas *TransactionAPIHandlerStub) GetTransaction(hash string, withResults bool) (*transaction.ApiTransactionResult, error)
GetTransaction -
func (*TransactionAPIHandlerStub) GetTransactionsPool ¶
func (tas *TransactionAPIHandlerStub) GetTransactionsPool(fields string) (*common.TransactionsPoolAPIResponse, error)
GetTransactionsPool -
func (*TransactionAPIHandlerStub) GetTransactionsPoolForSender ¶
func (tas *TransactionAPIHandlerStub) GetTransactionsPoolForSender(sender, fields string) (*common.TransactionsPoolForSenderApiResponse, error)
GetTransactionsPoolForSender -
func (*TransactionAPIHandlerStub) GetTransactionsPoolNonceGapsForSender ¶
func (tas *TransactionAPIHandlerStub) GetTransactionsPoolNonceGapsForSender(sender string, senderAccountNonce uint64) (*common.TransactionsPoolNonceGapsForSenderApiResponse, error)
GetTransactionsPoolNonceGapsForSender -
func (*TransactionAPIHandlerStub) IsInterfaceNil ¶
func (tas *TransactionAPIHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*TransactionAPIHandlerStub) PopulateComputedFields ¶
func (tas *TransactionAPIHandlerStub) PopulateComputedFields(tx *transaction.ApiTransactionResult)
PopulateComputedFields -
func (*TransactionAPIHandlerStub) UnmarshalReceipt ¶
func (tas *TransactionAPIHandlerStub) UnmarshalReceipt(receiptBytes []byte) (*transaction.ApiReceipt, error)
UnmarshalReceipt -
func (*TransactionAPIHandlerStub) UnmarshalTransaction ¶
func (tas *TransactionAPIHandlerStub) UnmarshalTransaction(txBytes []byte, txType transaction.TxType) (*transaction.ApiTransactionResult, error)
UnmarshalTransaction -
type TransactionCostEstimatorMock ¶
type TransactionCostEstimatorMock struct {
ComputeTransactionGasLimitCalled func(tx *transaction.Transaction) (*transaction.CostResponse, error)
SimulateTransactionExecutionCalled func(tx *transaction.Transaction) (*txSimData.SimulationResultsWithVMOutput, error)
}
TransactionCostEstimatorMock -
func (*TransactionCostEstimatorMock) ComputeTransactionGasLimit ¶
func (tcem *TransactionCostEstimatorMock) ComputeTransactionGasLimit(tx *transaction.Transaction) (*transaction.CostResponse, error)
ComputeTransactionGasLimit -
func (*TransactionCostEstimatorMock) IsInterfaceNil ¶
func (tcem *TransactionCostEstimatorMock) IsInterfaceNil() bool
IsInterfaceNil -
func (*TransactionCostEstimatorMock) SimulateTransactionExecution ¶ added in v1.6.0
func (tcem *TransactionCostEstimatorMock) SimulateTransactionExecution(tx *transaction.Transaction) (*txSimData.SimulationResultsWithVMOutput, error)
SimulateTransactionExecution -
type TxLogProcessorMock ¶
type TxLogProcessorMock struct {
}
TxLogProcessorMock -
func (*TxLogProcessorMock) EnableLogToBeSavedInCache ¶
func (t *TxLogProcessorMock) EnableLogToBeSavedInCache()
EnableLogToBeSavedInCache -
func (*TxLogProcessorMock) GetLogFromCache ¶
func (t *TxLogProcessorMock) GetLogFromCache(_ []byte) (*data.LogData, bool)
GetLogFromCache -
func (*TxLogProcessorMock) IsInterfaceNil ¶
func (t *TxLogProcessorMock) IsInterfaceNil() bool
IsInterfaceNil -
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
CloseCalled func() error
}
VMContainerMock -
func (*VMContainerMock) Add ¶
func (v *VMContainerMock) Add(key []byte, val vmcommon.VMExecutionHandler) error
Add -
func (*VMContainerMock) AddMultiple ¶
func (v *VMContainerMock) AddMultiple(keys [][]byte, vms []vmcommon.VMExecutionHandler) error
AddMultiple -
func (*VMContainerMock) Get ¶
func (v *VMContainerMock) Get(key []byte) (vmcommon.VMExecutionHandler, error)
Get -
func (*VMContainerMock) IsInterfaceNil ¶
func (v *VMContainerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*VMContainerMock) Replace ¶
func (v *VMContainerMock) Replace(key []byte, val vmcommon.VMExecutionHandler) error
Replace -
type VMExecutionHandlerStub ¶
type VMExecutionHandlerStub struct {
RunSmartContractCreateCalled func(input *vmcommon.ContractCreateInput) (*vmcommon.VMOutput, error)
RunSmartContractCallCalled func(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error)
GasScheduleChangeCalled func(newGasSchedule map[string]map[string]uint64)
GetVersionCalled func() string
}
VMExecutionHandlerStub -
func (*VMExecutionHandlerStub) GasScheduleChange ¶
func (vm *VMExecutionHandlerStub) GasScheduleChange(newGasSchedule map[string]map[string]uint64)
GasScheduleChange sets a new gas schedule for the VM
func (*VMExecutionHandlerStub) GetVersion ¶
func (vm *VMExecutionHandlerStub) GetVersion() string
GetVersion -
func (*VMExecutionHandlerStub) IsInterfaceNil ¶
func (vm *VMExecutionHandlerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*VMExecutionHandlerStub) RunSmartContractCall ¶
func (vm *VMExecutionHandlerStub) RunSmartContractCall(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error)
RunSmartContractCall Computes the result of a smart contract call and how the system must change after the execution
func (*VMExecutionHandlerStub) RunSmartContractCreate ¶
func (vm *VMExecutionHandlerStub) RunSmartContractCreate(input *vmcommon.ContractCreateInput) (*vmcommon.VMOutput, error)
RunSmartContractCreate computes how a smart contract creation should be performed
type VmMachinesContainerFactoryMock ¶
type VmMachinesContainerFactoryMock struct {
}
VmMachinesContainerFactoryMock -
func (*VmMachinesContainerFactoryMock) BlockChainHookImpl ¶
func (v *VmMachinesContainerFactoryMock) BlockChainHookImpl() process.BlockChainHookWithAccountsAdapter
BlockChainHookImpl -
func (*VmMachinesContainerFactoryMock) Close ¶
func (v *VmMachinesContainerFactoryMock) Close() error
Close -
func (*VmMachinesContainerFactoryMock) Create ¶
func (v *VmMachinesContainerFactoryMock) Create() (process.VirtualMachinesContainer, error)
Create -
func (*VmMachinesContainerFactoryMock) IsInterfaceNil ¶
func (v *VmMachinesContainerFactoryMock) IsInterfaceNil() bool
IsInterfaceNil -
type WatchdogMock ¶
type WatchdogMock struct {
}
WatchdogMock -
func (*WatchdogMock) Set ¶
func (w *WatchdogMock) Set(_ func(alarmID string), _ time.Duration, _ string)
Set -
func (*WatchdogMock) SetDefault ¶
func (w *WatchdogMock) SetDefault(_ time.Duration, _ string)
SetDefault -
Source Files
¶
- accumulatorMock.go
- apiBlockHandlerStub.go
- apiInternalBlockHandlerStub.go
- apiTransactionHandlerStub.go
- applicationRunningTrigger.go
- blockTrackerStub.go
- bootstrapStorerMock.go
- closerStub.go
- delegatedListProcessorStub.go
- directStakedListProcessorStub.go
- endOfEpochTriggerStub.go
- epochStartNotifier.go
- forkDetectorMock.go
- hasherMock.go
- headerIntegrityVerifierStub.go
- headerSigVerifierStub.go
- headerValidatorStub.go
- headersCacherStub.go
- keyMock.go
- marshalizerFake.go
- marshalizerMock.go
- miniBlocksProviderMock.go
- multipleShardsCoordinatorMock.go
- nodeRedundancyHandlerStub.go
- nodeWrapperStub.go
- nonceHashConverterMock.go
- oneShardCoordinatorMock.go
- p2pAntifloodHandlerStub.go
- p2pMessageStub.go
- peerBlackListCacher.go
- peerDenialEvaluatorStub.go
- peerSignatureHandlerMock.go
- pendingMiniBlocksHandlerStub.go
- queryHandlerStub.go
- rounderMock.go
- scQueryServiceStub.go
- shardCoordinatorMock.go
- singleSigMock.go
- singlesignerMock.go
- stakeValuesProcessorStub.go
- statusComputerHandlerStub.go
- streamerMock.go
- suiteStub.go
- syncTimerStub.go
- throttlerStub.go
- transactionCostEstimatorMock.go
- txLogsProcessorMock.go
- vmContainerMock.go
- vmExecutionHandlerStub.go
- vmMachinesContainerFactoryMock.go
- watchdogMock.go