testscommon

package
v1.7.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2024 License: GPL-3.0 Imports: 54 Imported by: 3

Documentation

Index

Constants

View Source
const HashSize = 32

HashSize holds the size of a typical hash used by the protocol

Variables

View Source
var (
	// TestAddressAlice is a test address
	TestAddressAlice = "erd1qyu5wthldzr8wx5c9ucg8kjagg0jfs53s8nr3zpz3hypefsdd8ssycr6th"
	// TestPubKeyAlice is a test pubkey
	TestPubKeyAlice, _ = RealWorldBech32PubkeyConverter.Decode(TestAddressAlice)
	// TestPubKeyHexAlice is a test pubkey
	TestPubKeyHexAlice = hex.EncodeToString(TestPubKeyAlice)

	// TestAddressBob is a test address
	TestAddressBob = "erd1spyavw0956vq68xj8y4tenjpq2wd5a9p2c6j8gsz7ztyrnpxrruqzu66jx"
	// TestPubKeyBob is a test pubkey
	TestPubKeyBob, _ = RealWorldBech32PubkeyConverter.Decode(TestAddressBob)
	// TestPubKeyHexBob is a test pubkey
	TestPubKeyHexBob = hex.EncodeToString(TestPubKeyBob)
)
View Source
var ErrNotImplemented = errors.New("not implemented")

ErrNotImplemented signals that a method is not implemented for an interface implementation

View Source
var RealWorldBech32PubkeyConverter, _ = pubkeyConverter.NewBech32PubkeyConverter(32, "erd")

RealWorldBech32PubkeyConverter is a bech32 converter, to be used in tests

Functions

func AddTimestampSuffix

func AddTimestampSuffix(tag string) string

AddTimestampSuffix -

func CreateGinContextWithRawQuery

func CreateGinContextWithRawQuery(rawQuery string) *gin.Context

CreateGinContextWithRawQuery creates a test gin context

func CreateMemUnit

func CreateMemUnit() storage.Storer

CreateMemUnit creates a new in-memory storage unit

func CreateTestConfigs added in v1.6.0

func CreateTestConfigs(tempDir string, originalConfigsPath string) (*config.Configs, error)

CreateTestConfigs will try to copy the whole configs directory to a temp directory and return the configs after load The copying of the configs is required because minor adjustments of their contents is required for the tests to pass

func GetDefaultHeaderVersionConfig added in v1.7.6

func GetDefaultHeaderVersionConfig() config.VersionsConfig

GetDefaultHeaderVersionConfig -

func GetDefaultRoundsConfig added in v1.7.6

func GetDefaultRoundsConfig() config.RoundConfig

GetDefaultRoundsConfig -

func GetEconomicsConfig

func GetEconomicsConfig() config.EconomicsConfig

GetEconomicsConfig returns the common configuration used for testing

func GetGeneralConfig

func GetGeneralConfig() config.Config

GetGeneralConfig returns the common configuration used for testing

func NewKeysHandlerSingleSignerMock added in v1.6.0

func NewKeysHandlerSingleSignerMock(
	privateKey crypto.PrivateKey,
	pid core.PeerID,
) *keysHandlerSingleSignerMock

NewKeysHandlerSingleSignerMock -

func NewNonceHashConverterMock

func NewNonceHashConverterMock() *nonceHashConverterMock

NewNonceHashConverterMock -

func NewTimeoutHandlerMock

func NewTimeoutHandlerMock(timeout time.Duration) *timeoutHandlerMock

NewTimeoutHandlerMock -

Types

type AlarmSchedulerStub

type AlarmSchedulerStub struct {
	AddCalled    func(func(alarmID string), time.Duration, string)
	CancelCalled func(string)
	CloseCalled  func()
	ResetCalled  func(string)
}

AlarmSchedulerStub -

func (*AlarmSchedulerStub) Add

func (a *AlarmSchedulerStub) Add(callback func(alarmID string), duration time.Duration, alarmID string)

Add -

func (*AlarmSchedulerStub) Cancel

func (a *AlarmSchedulerStub) Cancel(alarmID string)

Cancel -

func (*AlarmSchedulerStub) Close

func (a *AlarmSchedulerStub) Close()

Close -

func (*AlarmSchedulerStub) IsInterfaceNil

func (a *AlarmSchedulerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*AlarmSchedulerStub) Reset

func (a *AlarmSchedulerStub) Reset(alarmID string)

Reset -

type AlteredAccountsProviderStub

type AlteredAccountsProviderStub struct {
	ExtractAlteredAccountsFromPoolCalled func(txPool *outport.TransactionPool, options shared.AlteredAccountsOptions) (map[string]*alteredAccount.AlteredAccount, error)
}

AlteredAccountsProviderStub -

func (*AlteredAccountsProviderStub) ExtractAlteredAccountsFromPool

ExtractAlteredAccountsFromPool -

func (*AlteredAccountsProviderStub) IsInterfaceNil

func (a *AlteredAccountsProviderStub) IsInterfaceNil() bool

IsInterfaceNil -

type BalanceComputationStub

type BalanceComputationStub struct {
	InitCalled                    func()
	SetBalanceToAddressCalled     func(address []byte, value *big.Int)
	AddBalanceToAddressCalled     func(address []byte, value *big.Int) bool
	SubBalanceFromAddressCalled   func(address []byte, value *big.Int) bool
	IsAddressSetCalled            func(address []byte) bool
	AddressHasEnoughBalanceCalled func(address []byte, value *big.Int) bool
}

BalanceComputationStub -

func (*BalanceComputationStub) AddBalanceToAddress

func (bcs *BalanceComputationStub) AddBalanceToAddress(address []byte, value *big.Int) bool

AddBalanceToAddress -

func (*BalanceComputationStub) AddressHasEnoughBalance

func (bcs *BalanceComputationStub) AddressHasEnoughBalance(address []byte, value *big.Int) bool

AddressHasEnoughBalance -

func (*BalanceComputationStub) Init

func (bcs *BalanceComputationStub) Init()

Init -

func (*BalanceComputationStub) IsAddressSet

func (bcs *BalanceComputationStub) IsAddressSet(address []byte) bool

IsAddressSet -

func (*BalanceComputationStub) IsInterfaceNil

func (bcs *BalanceComputationStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*BalanceComputationStub) SetBalanceToAddress

func (bcs *BalanceComputationStub) SetBalanceToAddress(address []byte, value *big.Int)

SetBalanceToAddress -

func (*BalanceComputationStub) SubBalanceFromAddress

func (bcs *BalanceComputationStub) SubBalanceFromAddress(address []byte, value *big.Int) bool

SubBalanceFromAddress -

type BlockChainHookCounterStub

type BlockChainHookCounterStub struct {
	ProcessCrtNumberOfTrieReadsCounterCalled func() error
	ProcessMaxBuiltInCountersCalled          func(input *vmcommon.ContractCallInput) error
	ResetCountersCalled                      func()
	SetMaximumValuesCalled                   func(mapsOfValues map[string]uint64)
	GetCounterValuesCalled                   func() map[string]uint64
}

BlockChainHookCounterStub -

func (*BlockChainHookCounterStub) GetCounterValues

func (stub *BlockChainHookCounterStub) GetCounterValues() map[string]uint64

GetCounterValues -

func (*BlockChainHookCounterStub) IsInterfaceNil

func (stub *BlockChainHookCounterStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*BlockChainHookCounterStub) ProcessCrtNumberOfTrieReadsCounter

func (stub *BlockChainHookCounterStub) ProcessCrtNumberOfTrieReadsCounter() error

ProcessCrtNumberOfTrieReadsCounter -

func (*BlockChainHookCounterStub) ProcessMaxBuiltInCounters

func (stub *BlockChainHookCounterStub) ProcessMaxBuiltInCounters(input *vmcommon.ContractCallInput) error

ProcessMaxBuiltInCounters -

func (*BlockChainHookCounterStub) ResetCounters

func (stub *BlockChainHookCounterStub) ResetCounters()

ResetCounters -

func (*BlockChainHookCounterStub) SetMaximumValues

func (stub *BlockChainHookCounterStub) SetMaximumValues(mapsOfValues map[string]uint64)

SetMaximumValues -

type BlockChainHookStub

type BlockChainHookStub struct {
	NewAddressCalled                        func(creatorAddress []byte, creatorNonce uint64, vmType []byte) ([]byte, error)
	GetStorageDataCalled                    func(accountsAddress []byte, index []byte) ([]byte, uint32, error)
	GetBlockHashCalled                      func(nonce uint64) ([]byte, error)
	LastNonceCalled                         func() uint64
	LastRoundCalled                         func() uint64
	LastTimeStampCalled                     func() uint64
	LastRandomSeedCalled                    func() []byte
	LastEpochCalled                         func() uint32
	GetStateRootHashCalled                  func() []byte
	CurrentNonceCalled                      func() uint64
	CurrentRoundCalled                      func() uint64
	CurrentTimeStampCalled                  func() uint64
	CurrentRandomSeedCalled                 func() []byte
	CurrentEpochCalled                      func() uint32
	ProcessBuiltInFunctionCalled            func(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error)
	GetBuiltinFunctionNamesCalled           func() vmcommon.FunctionNames
	GetBuiltinFunctionsContainerCalled      func() vmcommon.BuiltInFunctionContainer
	GetAllStateCalled                       func(address []byte) (map[string][]byte, error)
	GetUserAccountCalled                    func(address []byte) (vmcommon.UserAccountHandler, error)
	GetShardOfAddressCalled                 func(address []byte) uint32
	IsSmartContractCalled                   func(address []byte) bool
	IsPayableCalled                         func(sndAddress []byte, recvAddress []byte) (bool, error)
	GetCompiledCodeCalled                   func(codeHash []byte) (bool, []byte)
	SaveCompiledCodeCalled                  func(codeHash []byte, code []byte)
	ClearCompiledCodesCalled                func()
	GetCodeCalled                           func(account vmcommon.UserAccountHandler) []byte
	GetESDTTokenCalled                      func(address []byte, tokenID []byte, nonce uint64) (*esdt.ESDigitalToken, error)
	NumberOfShardsCalled                    func() uint32
	GetSnapshotCalled                       func() int
	RevertToSnapshotCalled                  func(snapshot int) error
	SetCurrentHeaderCalled                  func(hdr data.HeaderHandler)
	DeleteCompiledCodeCalled                func(codeHash []byte)
	SaveNFTMetaDataToSystemAccountCalled    func(tx data.TransactionHandler) error
	CloseCalled                             func() error
	FilterCodeMetadataForUpgradeCalled      func(input []byte) ([]byte, error)
	ApplyFiltersOnCodeMetadataCalled        func(codeMetadata vmcommon.CodeMetadata) vmcommon.CodeMetadata
	ResetCountersCalled                     func()
	GetCounterValuesCalled                  func() map[string]uint64
	IsBuiltinFunctionNameCalled             func(functionName string)
	IsPausedCalled                          func(_ []byte) bool
	IsLimitedTransferCalled                 func(_ []byte) bool
	ExecuteSmartContractCallOnOtherVMCalled func(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error)
	SetVMContainerCalled                    func(vmContainer process.VirtualMachinesContainer) error
	GetAccountsAdapterCalled                func() state.AccountsAdapter
}

BlockChainHookStub -

func (*BlockChainHookStub) ApplyFiltersOnSCCodeMetadata added in v1.5.0

func (stub *BlockChainHookStub) ApplyFiltersOnSCCodeMetadata(codeMetadata vmcommon.CodeMetadata) vmcommon.CodeMetadata

ApplyFiltersOnSCCodeMetadata -

func (*BlockChainHookStub) ClearCompiledCodes

func (stub *BlockChainHookStub) ClearCompiledCodes()

ClearCompiledCodes -

func (*BlockChainHookStub) Close

func (stub *BlockChainHookStub) Close() error

Close -

func (*BlockChainHookStub) CurrentEpoch

func (stub *BlockChainHookStub) CurrentEpoch() uint32

CurrentEpoch -

func (*BlockChainHookStub) CurrentNonce

func (stub *BlockChainHookStub) CurrentNonce() uint64

CurrentNonce -

func (*BlockChainHookStub) CurrentRandomSeed

func (stub *BlockChainHookStub) CurrentRandomSeed() []byte

CurrentRandomSeed -

func (*BlockChainHookStub) CurrentRound

func (stub *BlockChainHookStub) CurrentRound() uint64

CurrentRound -

func (*BlockChainHookStub) CurrentTimeStamp

func (stub *BlockChainHookStub) CurrentTimeStamp() uint64

CurrentTimeStamp -

func (*BlockChainHookStub) DeleteCompiledCode

func (stub *BlockChainHookStub) DeleteCompiledCode(codeHash []byte)

DeleteCompiledCode -

func (*BlockChainHookStub) ExecuteSmartContractCallOnOtherVM added in v1.6.0

func (stub *BlockChainHookStub) ExecuteSmartContractCallOnOtherVM(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error)

ExecuteSmartContractCallOnOtherVM -

func (*BlockChainHookStub) FilterCodeMetadataForUpgrade

func (stub *BlockChainHookStub) FilterCodeMetadataForUpgrade(input []byte) ([]byte, error)

FilterCodeMetadataForUpgrade -

func (*BlockChainHookStub) GetAccountsAdapter added in v1.6.0

func (stub *BlockChainHookStub) GetAccountsAdapter() state.AccountsAdapter

GetAccountsAdapter -

func (*BlockChainHookStub) GetAllState

func (stub *BlockChainHookStub) GetAllState(address []byte) (map[string][]byte, error)

GetAllState -

func (*BlockChainHookStub) GetBlockhash

func (stub *BlockChainHookStub) GetBlockhash(nonce uint64) ([]byte, error)

GetBlockhash -

func (*BlockChainHookStub) GetBuiltinFunctionNames

func (stub *BlockChainHookStub) GetBuiltinFunctionNames() vmcommon.FunctionNames

GetBuiltinFunctionNames -

func (*BlockChainHookStub) GetBuiltinFunctionsContainer

func (stub *BlockChainHookStub) GetBuiltinFunctionsContainer() vmcommon.BuiltInFunctionContainer

GetBuiltinFunctionsContainer -

func (*BlockChainHookStub) GetCode

func (stub *BlockChainHookStub) GetCode(account vmcommon.UserAccountHandler) []byte

GetCode -

func (*BlockChainHookStub) GetCompiledCode

func (stub *BlockChainHookStub) GetCompiledCode(codeHash []byte) (bool, []byte)

GetCompiledCode -

func (*BlockChainHookStub) GetCounterValues

func (stub *BlockChainHookStub) GetCounterValues() map[string]uint64

GetCounterValues -

func (*BlockChainHookStub) GetESDTToken

func (stub *BlockChainHookStub) GetESDTToken(address []byte, tokenID []byte, nonce uint64) (*esdt.ESDigitalToken, error)

GetESDTToken -

func (*BlockChainHookStub) GetShardOfAddress

func (stub *BlockChainHookStub) GetShardOfAddress(address []byte) uint32

GetShardOfAddress -

func (*BlockChainHookStub) GetSnapshot

func (stub *BlockChainHookStub) GetSnapshot() int

GetSnapshot -

func (*BlockChainHookStub) GetStateRootHash

func (stub *BlockChainHookStub) GetStateRootHash() []byte

GetStateRootHash -

func (*BlockChainHookStub) GetStorageData

func (stub *BlockChainHookStub) GetStorageData(accountAddress []byte, index []byte) ([]byte, uint32, error)

GetStorageData -

func (*BlockChainHookStub) GetUserAccount

func (stub *BlockChainHookStub) GetUserAccount(address []byte) (vmcommon.UserAccountHandler, error)

GetUserAccount -

func (*BlockChainHookStub) IsBuiltinFunctionName added in v1.6.0

func (stub *BlockChainHookStub) IsBuiltinFunctionName(functionName string) bool

IsBuiltinFunctionName -

func (*BlockChainHookStub) IsInterfaceNil

func (stub *BlockChainHookStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*BlockChainHookStub) IsLimitedTransfer

func (stub *BlockChainHookStub) IsLimitedTransfer(arg []byte) bool

IsLimitedTransfer -

func (*BlockChainHookStub) IsPaused

func (stub *BlockChainHookStub) IsPaused(arg []byte) bool

IsPaused -

func (*BlockChainHookStub) IsPayable

func (stub *BlockChainHookStub) IsPayable(sndAddress []byte, recvAddress []byte) (bool, error)

IsPayable -

func (*BlockChainHookStub) IsSmartContract

func (stub *BlockChainHookStub) IsSmartContract(address []byte) bool

IsSmartContract -

func (*BlockChainHookStub) LastEpoch

func (stub *BlockChainHookStub) LastEpoch() uint32

LastEpoch -

func (*BlockChainHookStub) LastNonce

func (stub *BlockChainHookStub) LastNonce() uint64

LastNonce -

func (*BlockChainHookStub) LastRandomSeed

func (stub *BlockChainHookStub) LastRandomSeed() []byte

LastRandomSeed -

func (*BlockChainHookStub) LastRound

func (stub *BlockChainHookStub) LastRound() uint64

LastRound -

func (*BlockChainHookStub) LastTimeStamp

func (stub *BlockChainHookStub) LastTimeStamp() uint64

LastTimeStamp -

func (*BlockChainHookStub) NewAddress

func (stub *BlockChainHookStub) NewAddress(creatorAddress []byte, creatorNonce uint64, vmType []byte) ([]byte, error)

NewAddress -

func (*BlockChainHookStub) NumberOfShards

func (stub *BlockChainHookStub) NumberOfShards() uint32

NumberOfShards -

func (*BlockChainHookStub) ProcessBuiltInFunction

func (stub *BlockChainHookStub) ProcessBuiltInFunction(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error)

ProcessBuiltInFunction -

func (*BlockChainHookStub) ResetCounters

func (stub *BlockChainHookStub) ResetCounters()

ResetCounters -

func (*BlockChainHookStub) RevertToSnapshot

func (stub *BlockChainHookStub) RevertToSnapshot(snapshot int) error

RevertToSnapshot -

func (*BlockChainHookStub) SaveCompiledCode

func (stub *BlockChainHookStub) SaveCompiledCode(codeHash []byte, code []byte)

SaveCompiledCode -

func (*BlockChainHookStub) SaveNFTMetaDataToSystemAccount

func (stub *BlockChainHookStub) SaveNFTMetaDataToSystemAccount(tx data.TransactionHandler) error

SaveNFTMetaDataToSystemAccount -

func (*BlockChainHookStub) SetCurrentHeader

func (stub *BlockChainHookStub) SetCurrentHeader(hdr data.HeaderHandler)

SetCurrentHeader -

func (*BlockChainHookStub) SetVMContainer added in v1.6.0

func (stub *BlockChainHookStub) SetVMContainer(vmContainer process.VirtualMachinesContainer) error

SetVMContainer -

type BlockInfoProviderStub

type BlockInfoProviderStub struct {
	GetBlockInfoCalled func() common.BlockInfo
}

BlockInfoProviderStub -

func (*BlockInfoProviderStub) GetBlockInfo

func (stub *BlockInfoProviderStub) GetBlockInfo() common.BlockInfo

GetBlockInfo -

func (*BlockInfoProviderStub) IsInterfaceNil

func (stub *BlockInfoProviderStub) IsInterfaceNil() bool

IsInterfaceNil -

type BlockProcessingCutoffStub added in v1.6.0

type BlockProcessingCutoffStub struct {
	HandleProcessErrorCutoffCalled func(header data.HeaderHandler) error
	HandlePauseCutoffCalled        func(header data.HeaderHandler)
}

BlockProcessingCutoffStub -

func (*BlockProcessingCutoffStub) HandlePauseCutoff added in v1.6.0

func (b *BlockProcessingCutoffStub) HandlePauseCutoff(header data.HeaderHandler)

HandlePauseCutoff -

func (*BlockProcessingCutoffStub) HandleProcessErrorCutoff added in v1.6.0

func (b *BlockProcessingCutoffStub) HandleProcessErrorCutoff(header data.HeaderHandler) error

HandleProcessErrorCutoff -

func (*BlockProcessingCutoffStub) IsInterfaceNil added in v1.6.0

func (b *BlockProcessingCutoffStub) IsInterfaceNil() bool

IsInterfaceNil -

type BlockProcessorStub

type BlockProcessorStub struct {
	SetNumProcessedObjCalled         func(numObj uint64)
	ProcessBlockCalled               func(header data.HeaderHandler, body data.BodyHandler, haveTime func() time.Duration) error
	ProcessScheduledBlockCalled      func(header data.HeaderHandler, body data.BodyHandler, haveTime func() time.Duration) error
	CommitBlockCalled                func(header data.HeaderHandler, body data.BodyHandler) error
	RevertCurrentBlockCalled         func()
	PruneStateOnRollbackCalled       func(currHeader data.HeaderHandler, currHeaderHash []byte, prevHeader data.HeaderHandler, prevHeaderHash []byte)
	CreateBlockCalled                func(initialHdrData data.HeaderHandler, haveTime func() bool) (data.HeaderHandler, data.BodyHandler, error)
	RestoreBlockIntoPoolsCalled      func(header data.HeaderHandler, body data.BodyHandler) error
	RestoreBlockBodyIntoPoolsCalled  func(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
	CreateNewHeaderCalled            func(round uint64, nonce uint64) (data.HeaderHandler, error)
	RevertStateToBlockCalled         func(header data.HeaderHandler, rootHash []byte) error
	NonceOfFirstCommittedBlockCalled func() core.OptionalUint64
	CloseCalled                      func() error
}

BlockProcessorStub mocks the implementation for a blockProcessor

func (*BlockProcessorStub) Close

func (bps *BlockProcessorStub) Close() error

Close -

func (*BlockProcessorStub) CommitBlock

func (bps *BlockProcessorStub) CommitBlock(header data.HeaderHandler, body data.BodyHandler) error

CommitBlock mocks the commit of a block

func (*BlockProcessorStub) CreateBlock

func (bps *BlockProcessorStub) CreateBlock(initialHdrData data.HeaderHandler, haveTime func() bool) (data.HeaderHandler, data.BodyHandler, error)

CreateBlock mocks the creation of a new block with header and body

func (*BlockProcessorStub) CreateNewHeader

func (bps *BlockProcessorStub) CreateNewHeader(round uint64, nonce uint64) (data.HeaderHandler, error)

CreateNewHeader creates a new header

func (*BlockProcessorStub) DecodeBlockBody

func (bps *BlockProcessorStub) DecodeBlockBody(dta []byte) data.BodyHandler

DecodeBlockBody -

func (*BlockProcessorStub) DecodeBlockHeader

func (bps *BlockProcessorStub) DecodeBlockHeader(dta []byte) data.HeaderHandler

DecodeBlockHeader -

func (*BlockProcessorStub) IsInterfaceNil

func (bps *BlockProcessorStub) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*BlockProcessorStub) MarshalizedDataToBroadcast

func (bps *BlockProcessorStub) MarshalizedDataToBroadcast(header data.HeaderHandler, body data.BodyHandler) (map[uint32][]byte, map[string][][]byte, error)

MarshalizedDataToBroadcast -

func (*BlockProcessorStub) NonceOfFirstCommittedBlock

func (bps *BlockProcessorStub) NonceOfFirstCommittedBlock() core.OptionalUint64

NonceOfFirstCommittedBlock -

func (*BlockProcessorStub) ProcessBlock

func (bps *BlockProcessorStub) ProcessBlock(header data.HeaderHandler, body data.BodyHandler, haveTime func() time.Duration) error

ProcessBlock mocks processing a block

func (*BlockProcessorStub) ProcessScheduledBlock

func (bps *BlockProcessorStub) ProcessScheduledBlock(header data.HeaderHandler, body data.BodyHandler, haveTime func() time.Duration) error

ProcessScheduledBlock mocks processing a scheduled block

func (*BlockProcessorStub) PruneStateOnRollback

func (bps *BlockProcessorStub) PruneStateOnRollback(currHeader data.HeaderHandler, currHeaderHash []byte, prevHeader data.HeaderHandler, prevHeaderHash []byte)

PruneStateOnRollback recreates the state tries to the root hashes indicated by the provided header

func (*BlockProcessorStub) RestoreBlockBodyIntoPools

func (bps *BlockProcessorStub) RestoreBlockBodyIntoPools(body data.BodyHandler) error

RestoreBlockBodyIntoPools -

func (*BlockProcessorStub) RestoreBlockIntoPools

func (bps *BlockProcessorStub) RestoreBlockIntoPools(header data.HeaderHandler, body data.BodyHandler) error

RestoreBlockIntoPools -

func (*BlockProcessorStub) RevertCurrentBlock

func (bps *BlockProcessorStub) RevertCurrentBlock()

RevertCurrentBlock mocks revert of the current block

func (*BlockProcessorStub) RevertStateToBlock

func (bps *BlockProcessorStub) RevertStateToBlock(header data.HeaderHandler, rootHash []byte) error

RevertStateToBlock recreates the state tries to the root hashes indicated by the provided header

func (*BlockProcessorStub) SetNumProcessedObj

func (bps *BlockProcessorStub) SetNumProcessedObj(numObj uint64)

SetNumProcessedObj -

type BlockSizeComputationStub

type BlockSizeComputationStub struct {
	InitCalled                                 func()
	AddNumMiniBlocksCalled                     func(int)
	AddNumTxsCalled                            func(int)
	IsMaxBlockSizeReachedCalled                func(int, int) bool
	IsMaxBlockSizeWithoutThrottleReachedCalled func(int, int) bool
}

BlockSizeComputationStub -

func (*BlockSizeComputationStub) AddNumMiniBlocks

func (bscs *BlockSizeComputationStub) AddNumMiniBlocks(numMiniBlocks int)

AddNumMiniBlocks -

func (*BlockSizeComputationStub) AddNumTxs

func (bscs *BlockSizeComputationStub) AddNumTxs(numTxs int)

AddNumTxs -

func (*BlockSizeComputationStub) Init

func (bscs *BlockSizeComputationStub) Init()

Init -

func (*BlockSizeComputationStub) IsInterfaceNil

func (bscs *BlockSizeComputationStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*BlockSizeComputationStub) IsMaxBlockSizeReached

func (bscs *BlockSizeComputationStub) IsMaxBlockSizeReached(numNewMiniBlocks int, numNewTxs int) bool

IsMaxBlockSizeReached -

func (*BlockSizeComputationStub) IsMaxBlockSizeWithoutThrottleReached

func (bscs *BlockSizeComputationStub) IsMaxBlockSizeWithoutThrottleReached(numNewMiniBlocks int, numNewTxs int) bool

IsMaxBlockSizeWithoutThrottleReached -

type CacherMock

type CacherMock struct {
	// contains filtered or unexported fields
}

CacherMock -

func NewCacherMock

func NewCacherMock() *CacherMock

NewCacherMock -

func (*CacherMock) Clear

func (cacher *CacherMock) Clear()

Clear -

func (*CacherMock) Close

func (cacher *CacherMock) Close() error

Close -

func (*CacherMock) Get

func (cacher *CacherMock) Get(key []byte) (value interface{}, ok bool)

Get -

func (*CacherMock) Has

func (cacher *CacherMock) Has(key []byte) bool

Has -

func (*CacherMock) HasOrAdd

func (cacher *CacherMock) HasOrAdd(key []byte, value interface{}, _ int) (has, added bool)

HasOrAdd -

func (*CacherMock) IsInterfaceNil

func (cacher *CacherMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*CacherMock) Keys

func (cacher *CacherMock) Keys() [][]byte

Keys -

func (*CacherMock) Len

func (cacher *CacherMock) Len() int

Len -

func (*CacherMock) MaxSize

func (cacher *CacherMock) MaxSize() int

MaxSize -

func (*CacherMock) Peek

func (cacher *CacherMock) Peek(key []byte) (value interface{}, ok bool)

Peek -

func (*CacherMock) Put

func (cacher *CacherMock) Put(key []byte, value interface{}, _ int) (evicted bool)

Put -

func (*CacherMock) RegisterHandler

func (cacher *CacherMock) RegisterHandler(handler func(key []byte, value interface{}), _ string)

RegisterHandler -

func (*CacherMock) Remove

func (cacher *CacherMock) Remove(key []byte)

Remove -

func (*CacherMock) SizeInBytesContained

func (cacher *CacherMock) SizeInBytesContained() uint64

SizeInBytesContained -

func (*CacherMock) UnRegisterHandler

func (cacher *CacherMock) UnRegisterHandler(string)

UnRegisterHandler -

type CacherStub

type CacherStub struct {
	ClearCalled             func()
	PutCalled               func(key []byte, value interface{}, sizeInBytes int) (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{}, sizeInBytes int) (has, added bool)
	RemoveCalled            func(key []byte)
	RemoveOldestCalled      func()
	KeysCalled              func() [][]byte
	LenCalled               func() int
	MaxSizeCalled           func() int
	RegisterHandlerCalled   func(func(key []byte, value interface{}))
	UnRegisterHandlerCalled func(id string)
	CloseCalled             func() error
}

CacherStub -

func NewCacherStub

func NewCacherStub() *CacherStub

NewCacherStub -

func (*CacherStub) Clear

func (cacher *CacherStub) Clear()

Clear -

func (*CacherStub) Close

func (cacher *CacherStub) Close() error

Close -

func (*CacherStub) Get

func (cacher *CacherStub) Get(key []byte) (value interface{}, ok bool)

Get -

func (*CacherStub) Has

func (cacher *CacherStub) Has(key []byte) bool

Has -

func (*CacherStub) HasOrAdd

func (cacher *CacherStub) HasOrAdd(key []byte, value interface{}, sizeInBytes int) (has, added bool)

HasOrAdd -

func (*CacherStub) IsInterfaceNil

func (cacher *CacherStub) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*CacherStub) Keys

func (cacher *CacherStub) Keys() [][]byte

Keys -

func (*CacherStub) Len

func (cacher *CacherStub) Len() int

Len -

func (*CacherStub) MaxSize

func (cacher *CacherStub) MaxSize() int

MaxSize -

func (*CacherStub) Peek

func (cacher *CacherStub) Peek(key []byte) (value interface{}, ok bool)

Peek -

func (*CacherStub) Put

func (cacher *CacherStub) Put(key []byte, value interface{}, sizeInBytes int) (evicted bool)

Put -

func (*CacherStub) RegisterHandler

func (cacher *CacherStub) RegisterHandler(handler func(key []byte, value interface{}), _ string)

RegisterHandler -

func (*CacherStub) Remove

func (cacher *CacherStub) Remove(key []byte)

Remove -

func (*CacherStub) SizeInBytesContained

func (cacher *CacherStub) SizeInBytesContained() uint64

SizeInBytesContained -

func (*CacherStub) UnRegisterHandler

func (cacher *CacherStub) UnRegisterHandler(id string)

UnRegisterHandler -

type ChainHandlerMock

type ChainHandlerMock struct {
	// contains filtered or unexported fields
}

ChainHandlerMock -

func (*ChainHandlerMock) GetCurrentBlockHeader

func (mock *ChainHandlerMock) GetCurrentBlockHeader() data.HeaderHandler

GetCurrentBlockHeader -

func (*ChainHandlerMock) GetCurrentBlockHeaderHash

func (mock *ChainHandlerMock) GetCurrentBlockHeaderHash() []byte

GetCurrentBlockHeaderHash -

func (*ChainHandlerMock) GetCurrentBlockRootHash

func (mock *ChainHandlerMock) GetCurrentBlockRootHash() []byte

GetCurrentBlockRootHash -

func (*ChainHandlerMock) GetFinalBlockInfo

func (mock *ChainHandlerMock) GetFinalBlockInfo() (nonce uint64, blockHash []byte, rootHash []byte)

GetFinalBlockInfo -

func (*ChainHandlerMock) GetGenesisHeader

func (mock *ChainHandlerMock) GetGenesisHeader() data.HeaderHandler

GetGenesisHeader -

func (*ChainHandlerMock) GetGenesisHeaderHash

func (mock *ChainHandlerMock) GetGenesisHeaderHash() []byte

GetGenesisHeaderHash -

func (*ChainHandlerMock) IsInterfaceNil

func (mock *ChainHandlerMock) IsInterfaceNil() bool

IsInterfaceNil -

func (*ChainHandlerMock) SetCurrentBlockHeaderAndRootHash

func (mock *ChainHandlerMock) SetCurrentBlockHeaderAndRootHash(header data.HeaderHandler, rootHash []byte) error

SetCurrentBlockHeaderAndRootHash -

func (*ChainHandlerMock) SetCurrentBlockHeaderHash

func (mock *ChainHandlerMock) SetCurrentBlockHeaderHash(hash []byte)

SetCurrentBlockHeaderHash -

func (*ChainHandlerMock) SetFinalBlockInfo

func (mock *ChainHandlerMock) SetFinalBlockInfo(nonce uint64, headerHash []byte, rootHash []byte)

SetFinalBlockInfo -

func (*ChainHandlerMock) SetGenesisHeader

func (mock *ChainHandlerMock) SetGenesisHeader(genesisBlock data.HeaderHandler) error

SetGenesisHeader -

func (*ChainHandlerMock) SetGenesisHeaderHash

func (mock *ChainHandlerMock) SetGenesisHeaderHash(hash []byte)

SetGenesisHeaderHash -

type ChainHandlerStub

type ChainHandlerStub struct {
	GetGenesisHeaderCalled                 func() data.HeaderHandler
	SetGenesisHeaderCalled                 func(handler data.HeaderHandler) error
	GetGenesisHeaderHashCalled             func() []byte
	SetGenesisHeaderHashCalled             func([]byte)
	GetCurrentBlockHeaderCalled            func() data.HeaderHandler
	SetCurrentBlockHeaderAndRootHashCalled func(header data.HeaderHandler, rootHash []byte) error
	GetCurrentBlockHeaderHashCalled        func() []byte
	SetCurrentBlockHeaderHashCalled        func([]byte)
	GetCurrentBlockRootHashCalled          func() []byte
	SetFinalBlockInfoCalled                func(nonce uint64, headerHash []byte, rootHash []byte)
	GetFinalBlockInfoCalled                func() (nonce uint64, blockHash []byte, rootHash []byte)
}

ChainHandlerStub -

func (*ChainHandlerStub) GetCurrentBlockHeader

func (stub *ChainHandlerStub) GetCurrentBlockHeader() data.HeaderHandler

GetCurrentBlockHeader -

func (*ChainHandlerStub) GetCurrentBlockHeaderHash

func (stub *ChainHandlerStub) GetCurrentBlockHeaderHash() []byte

GetCurrentBlockHeaderHash -

func (*ChainHandlerStub) GetCurrentBlockRootHash

func (stub *ChainHandlerStub) GetCurrentBlockRootHash() []byte

GetCurrentBlockRootHash -

func (*ChainHandlerStub) GetFinalBlockInfo

func (stub *ChainHandlerStub) GetFinalBlockInfo() (nonce uint64, blockHash []byte, rootHash []byte)

GetFinalBlockInfo -

func (*ChainHandlerStub) GetGenesisHeader

func (stub *ChainHandlerStub) GetGenesisHeader() data.HeaderHandler

GetGenesisHeader -

func (*ChainHandlerStub) GetGenesisHeaderHash

func (stub *ChainHandlerStub) GetGenesisHeaderHash() []byte

GetGenesisHeaderHash -

func (*ChainHandlerStub) IsInterfaceNil

func (stub *ChainHandlerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*ChainHandlerStub) SetCurrentBlockHeaderAndRootHash

func (stub *ChainHandlerStub) SetCurrentBlockHeaderAndRootHash(header data.HeaderHandler, rootHash []byte) error

SetCurrentBlockHeaderAndRootHash -

func (*ChainHandlerStub) SetCurrentBlockHeaderHash

func (stub *ChainHandlerStub) SetCurrentBlockHeaderHash(hash []byte)

SetCurrentBlockHeaderHash -

func (*ChainHandlerStub) SetFinalBlockInfo

func (stub *ChainHandlerStub) SetFinalBlockInfo(nonce uint64, headerHash []byte, rootHash []byte)

SetFinalBlockInfo -

func (*ChainHandlerStub) SetGenesisHeader

func (stub *ChainHandlerStub) SetGenesisHeader(genesisBlock data.HeaderHandler) error

SetGenesisHeader -

func (*ChainHandlerStub) SetGenesisHeaderHash

func (stub *ChainHandlerStub) SetGenesisHeaderHash(hash []byte)

SetGenesisHeaderHash -

type CurrentEpochProviderStub

type CurrentEpochProviderStub struct {
	EpochIsActiveInNetworkCalled func(epoch uint32) bool
}

CurrentEpochProviderStub -

func (*CurrentEpochProviderStub) EpochIsActiveInNetwork

func (c *CurrentEpochProviderStub) EpochIsActiveInNetwork(epoch uint32) bool

EpochIsActiveInNetwork -

func (*CurrentEpochProviderStub) IsInterfaceNil

func (c *CurrentEpochProviderStub) IsInterfaceNil() bool

IsInterfaceNil -

type CustomDatabaseRemoverStub

type CustomDatabaseRemoverStub struct {
	ShouldRemoveCalled func(dbIdentifier string, epoch uint32) bool
}

CustomDatabaseRemoverStub -

func (*CustomDatabaseRemoverStub) IsInterfaceNil

func (c *CustomDatabaseRemoverStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*CustomDatabaseRemoverStub) ShouldRemove

func (c *CustomDatabaseRemoverStub) ShouldRemove(dbIdentifier string, epoch uint32) bool

ShouldRemove -

type DataFieldParserStub

type DataFieldParserStub struct {
	ParseCalled func(dataField []byte, sender, receiver []byte, numOfShards uint32) *datafield.ResponseParseData
}

DataFieldParserStub -

func (*DataFieldParserStub) Parse

func (df *DataFieldParserStub) Parse(dataField []byte, sender, receiver []byte, numOfShards uint32) *datafield.ResponseParseData

Parse -

type ESDTGlobalSettingsHandlerStub

type ESDTGlobalSettingsHandlerStub struct {
	IsPausedCalled          func(esdtTokenKey []byte) bool
	IsLimitedTransferCalled func(esdtTokenKey []byte) bool
}

ESDTGlobalSettingsHandlerStub -

func (*ESDTGlobalSettingsHandlerStub) IsInterfaceNil

func (e *ESDTGlobalSettingsHandlerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*ESDTGlobalSettingsHandlerStub) IsLimitedTransfer

func (e *ESDTGlobalSettingsHandlerStub) IsLimitedTransfer(esdtTokenKey []byte) bool

IsLimitedTransfer -

func (*ESDTGlobalSettingsHandlerStub) IsPaused

func (e *ESDTGlobalSettingsHandlerStub) IsPaused(esdtTokenKey []byte) bool

IsPaused -

type ESDTTransferParserStub

type ESDTTransferParserStub struct {
	ParseESDTTransfersCalled func(sndAddr []byte, rcvAddr []byte, function string, args [][]byte) (*vmcommon.ParsedESDTTransfers, error)
}

ESDTTransferParserStub -

func (*ESDTTransferParserStub) IsInterfaceNil

func (stub *ESDTTransferParserStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*ESDTTransferParserStub) ParseESDTTransfers

func (stub *ESDTTransferParserStub) ParseESDTTransfers(sndAddr []byte, rcvAddr []byte, function string, args [][]byte) (*vmcommon.ParsedESDTTransfers, error)

ParseESDTTransfers -

type EnableRoundsHandlerStub

type EnableRoundsHandlerStub struct {
	IsDisableAsyncCallV1EnabledCalled func() bool
}

EnableRoundsHandlerStub -

func (*EnableRoundsHandlerStub) IsDisableAsyncCallV1Enabled added in v1.6.0

func (stub *EnableRoundsHandlerStub) IsDisableAsyncCallV1Enabled() bool

IsDisableAsyncCallV1Enabled -

func (*EnableRoundsHandlerStub) IsInterfaceNil

func (stub *EnableRoundsHandlerStub) IsInterfaceNil() bool

IsInterfaceNil -

type EpochStartSystemSCStub added in v1.7.0

type EpochStartSystemSCStub struct {
	ProcessSystemSmartContractCalled func(validatorsInfo state.ShardValidatorsInfoMapHandler, header data.HeaderHandler) error
	ProcessDelegationRewardsCalled   func(miniBlocks block.MiniBlockSlice, txCache epochStart.TransactionCacher) error
	ToggleUnStakeUnBondCalled        func(value bool) error
}

EpochStartSystemSCStub -

func (*EpochStartSystemSCStub) IsInterfaceNil added in v1.7.0

func (e *EpochStartSystemSCStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*EpochStartSystemSCStub) ProcessDelegationRewards added in v1.7.0

func (e *EpochStartSystemSCStub) ProcessDelegationRewards(
	miniBlocks block.MiniBlockSlice,
	txCache epochStart.TransactionCacher,
) error

ProcessDelegationRewards -

func (*EpochStartSystemSCStub) ProcessSystemSmartContract added in v1.7.0

func (e *EpochStartSystemSCStub) ProcessSystemSmartContract(
	validatorsInfo state.ShardValidatorsInfoMapHandler,
	header data.HeaderHandler,
) error

ProcessSystemSmartContract -

func (*EpochStartSystemSCStub) ToggleUnStakeUnBond added in v1.7.0

func (e *EpochStartSystemSCStub) ToggleUnStakeUnBond(value bool) error

ToggleUnStakeUnBond -

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
	EpochFinalityAttestingRoundCalled func() uint64
	EpochStartMetaHdrHashCalled       func() []byte
}

EpochStartTriggerStub -

func (*EpochStartTriggerStub) Close

func (e *EpochStartTriggerStub) Close() error

Close -

func (*EpochStartTriggerStub) Epoch

func (e *EpochStartTriggerStub) Epoch() uint32

Epoch -

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

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 EpochValidatorInfoCreatorStub added in v1.7.0

type EpochValidatorInfoCreatorStub struct {
	CreateValidatorInfoMiniBlocksCalled func(validatorsInfo state.ShardValidatorsInfoMapHandler) (block.MiniBlockSlice, error)
	VerifyValidatorInfoMiniBlocksCalled func(miniblocks []*block.MiniBlock, validatorsInfo state.ShardValidatorsInfoMapHandler) error
	GetLocalValidatorInfoCacheCalled    func() epochStart.ValidatorInfoCacher
	CreateMarshalledDataCalled          func(body *block.Body) map[string][][]byte
	GetValidatorInfoTxsCalled           func(body *block.Body) map[string]*state.ShardValidatorInfo
	SaveBlockDataToStorageCalled        func(metaBlock data.HeaderHandler, body *block.Body)
	DeleteBlockDataFromStorageCalled    func(metaBlock data.HeaderHandler, body *block.Body)
	RemoveBlockDataFromPoolsCalled      func(metaBlock data.HeaderHandler, body *block.Body)
}

EpochValidatorInfoCreatorStub -

func (*EpochValidatorInfoCreatorStub) CreateMarshalledData added in v1.7.0

func (e *EpochValidatorInfoCreatorStub) CreateMarshalledData(body *block.Body) map[string][][]byte

CreateMarshalledData -

func (*EpochValidatorInfoCreatorStub) CreateValidatorInfoMiniBlocks added in v1.7.0

func (e *EpochValidatorInfoCreatorStub) CreateValidatorInfoMiniBlocks(validatorInfo state.ShardValidatorsInfoMapHandler) (block.MiniBlockSlice, error)

CreateValidatorInfoMiniBlocks -

func (*EpochValidatorInfoCreatorStub) DeleteBlockDataFromStorage added in v1.7.0

func (e *EpochValidatorInfoCreatorStub) DeleteBlockDataFromStorage(metaBlock data.HeaderHandler, body *block.Body)

DeleteBlockDataFromStorage -

func (*EpochValidatorInfoCreatorStub) GetLocalValidatorInfoCache added in v1.7.0

func (e *EpochValidatorInfoCreatorStub) GetLocalValidatorInfoCache() epochStart.ValidatorInfoCacher

GetLocalValidatorInfoCache -

func (*EpochValidatorInfoCreatorStub) GetValidatorInfoTxs added in v1.7.0

func (e *EpochValidatorInfoCreatorStub) GetValidatorInfoTxs(body *block.Body) map[string]*state.ShardValidatorInfo

GetValidatorInfoTxs -

func (*EpochValidatorInfoCreatorStub) IsInterfaceNil added in v1.7.0

func (e *EpochValidatorInfoCreatorStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*EpochValidatorInfoCreatorStub) RemoveBlockDataFromPools added in v1.7.0

func (e *EpochValidatorInfoCreatorStub) RemoveBlockDataFromPools(metaBlock data.HeaderHandler, body *block.Body)

RemoveBlockDataFromPools -

func (*EpochValidatorInfoCreatorStub) SaveBlockDataToStorage added in v1.7.0

func (e *EpochValidatorInfoCreatorStub) SaveBlockDataToStorage(metaBlock data.HeaderHandler, body *block.Body)

SaveBlockDataToStorage -

func (*EpochValidatorInfoCreatorStub) VerifyValidatorInfoMiniBlocks added in v1.7.0

func (e *EpochValidatorInfoCreatorStub) VerifyValidatorInfoMiniBlocks(miniBlocks []*block.MiniBlock, validatorsInfo state.ShardValidatorsInfoMapHandler) error

VerifyValidatorInfoMiniBlocks -

type EsdtStorageHandlerStub

type EsdtStorageHandlerStub struct {
	SaveESDTNFTTokenCalled                                    func(senderAddress []byte, acnt vmcommon.UserAccountHandler, esdtTokenKey []byte, nonce uint64, esdtData *esdt.ESDigitalToken, isCreation bool, isReturnWithError bool) ([]byte, error)
	GetESDTNFTTokenOnSenderCalled                             func(acnt vmcommon.UserAccountHandler, esdtTokenKey []byte, nonce uint64) (*esdt.ESDigitalToken, error)
	GetESDTNFTTokenOnDestinationCalled                        func(acnt vmcommon.UserAccountHandler, esdtTokenKey []byte, nonce uint64) (*esdt.ESDigitalToken, bool, error)
	GetESDTNFTTokenOnDestinationWithCustomSystemAccountCalled func(accnt vmcommon.UserAccountHandler, esdtTokenKey []byte, nonce uint64, systemAccount vmcommon.UserAccountHandler) (*esdt.ESDigitalToken, bool, error)
	WasAlreadySentToDestinationShardAndUpdateStateCalled      func(tickerID []byte, nonce uint64, dstAddress []byte) (bool, error)
	SaveNFTMetaDataToSystemAccountCalled                      func(tx data.TransactionHandler) error
	AddToLiquiditySystemAccCalled                             func(esdtTokenKey []byte, nonce uint64, transferValue *big.Int) error
}

EsdtStorageHandlerStub -

func (*EsdtStorageHandlerStub) AddToLiquiditySystemAcc

func (e *EsdtStorageHandlerStub) AddToLiquiditySystemAcc(esdtTokenKey []byte, nonce uint64, transferValue *big.Int) error

AddToLiquiditySystemAcc -

func (*EsdtStorageHandlerStub) GetESDTNFTTokenOnDestination

func (e *EsdtStorageHandlerStub) GetESDTNFTTokenOnDestination(acnt vmcommon.UserAccountHandler, esdtTokenKey []byte, nonce uint64) (*esdt.ESDigitalToken, bool, error)

GetESDTNFTTokenOnDestination -

func (*EsdtStorageHandlerStub) GetESDTNFTTokenOnDestinationWithCustomSystemAccount

func (e *EsdtStorageHandlerStub) GetESDTNFTTokenOnDestinationWithCustomSystemAccount(accnt vmcommon.UserAccountHandler, esdtTokenKey []byte, nonce uint64, systemAccount vmcommon.UserAccountHandler) (*esdt.ESDigitalToken, bool, error)

GetESDTNFTTokenOnDestinationWithCustomSystemAccount -

func (*EsdtStorageHandlerStub) GetESDTNFTTokenOnSender

func (e *EsdtStorageHandlerStub) GetESDTNFTTokenOnSender(acnt vmcommon.UserAccountHandler, esdtTokenKey []byte, nonce uint64) (*esdt.ESDigitalToken, error)

GetESDTNFTTokenOnSender -

func (*EsdtStorageHandlerStub) IsInterfaceNil

func (e *EsdtStorageHandlerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*EsdtStorageHandlerStub) SaveESDTNFTToken

func (e *EsdtStorageHandlerStub) SaveESDTNFTToken(senderAddress []byte, acnt vmcommon.UserAccountHandler, esdtTokenKey []byte, nonce uint64, esdtData *esdt.ESDigitalToken, isCreation bool, isReturnWithError bool) ([]byte, error)

SaveESDTNFTToken -

func (*EsdtStorageHandlerStub) SaveNFTMetaDataToSystemAccount

func (e *EsdtStorageHandlerStub) SaveNFTMetaDataToSystemAccount(tx data.TransactionHandler) error

SaveNFTMetaDataToSystemAccount -

func (*EsdtStorageHandlerStub) WasAlreadySentToDestinationShardAndUpdateState

func (e *EsdtStorageHandlerStub) WasAlreadySentToDestinationShardAndUpdateState(tickerID []byte, nonce uint64, dstAddress []byte) (bool, error)

WasAlreadySentToDestinationShardAndUpdateState -

type FallBackHeaderValidatorStub

type FallBackHeaderValidatorStub struct {
	ShouldApplyFallbackValidationCalled func(headerHandler data.HeaderHandler) bool
}

FallBackHeaderValidatorStub -

func (*FallBackHeaderValidatorStub) IsInterfaceNil

func (fhvs *FallBackHeaderValidatorStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*FallBackHeaderValidatorStub) ShouldApplyFallbackValidation

func (fhvs *FallBackHeaderValidatorStub) ShouldApplyFallbackValidation(headerHandler data.HeaderHandler) bool

ShouldApplyFallbackValidation -

type FeeComputerStub

type FeeComputerStub struct {
	ComputeTransactionFeeCalled                  func(tx *transaction.ApiTransactionResult) *big.Int
	ComputeGasUsedAndFeeBasedOnRefundValueCalled func(tx *transaction.ApiTransactionResult, refundValue *big.Int) (uint64, *big.Int)
	ComputeTxFeeBasedOnGasUsedCalled             func(tx *transaction.ApiTransactionResult, gasUsed uint64) *big.Int
	ComputeGasLimitCalled                        func(tx *transaction.ApiTransactionResult) uint64
}

FeeComputerStub -

func (*FeeComputerStub) ComputeGasLimit added in v1.4.5

func (stub *FeeComputerStub) ComputeGasLimit(tx *transaction.ApiTransactionResult) uint64

ComputeGasLimit -

func (*FeeComputerStub) ComputeGasUsedAndFeeBasedOnRefundValue added in v1.4.5

func (stub *FeeComputerStub) ComputeGasUsedAndFeeBasedOnRefundValue(tx *transaction.ApiTransactionResult, refundValue *big.Int) (uint64, *big.Int)

ComputeGasUsedAndFeeBasedOnRefundValue -

func (*FeeComputerStub) ComputeTransactionFee

func (stub *FeeComputerStub) ComputeTransactionFee(tx *transaction.ApiTransactionResult) *big.Int

ComputeTransactionFee -

func (*FeeComputerStub) ComputeTxFeeBasedOnGasUsed added in v1.4.5

func (stub *FeeComputerStub) ComputeTxFeeBasedOnGasUsed(tx *transaction.ApiTransactionResult, gasUsed uint64) *big.Int

ComputeTxFeeBasedOnGasUsed -

func (*FeeComputerStub) IsInterfaceNil

func (stub *FeeComputerStub) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

type GasHandlerStub

type GasHandlerStub struct {
	InitCalled                          func()
	ResetCalled                         func(key []byte)
	SetGasProvidedCalled                func(gasProvided uint64, hash []byte)
	SetGasProvidedAsScheduledCalled     func(gasProvided uint64, hash []byte)
	SetGasRefundedCalled                func(gasRefunded uint64, hash []byte)
	SetGasPenalizedCalled               func(gasPenalized uint64, hash []byte)
	GasProvidedCalled                   func(hash []byte) uint64
	GasProvidedAsScheduledCalled        func(hash []byte) uint64
	GasRefundedCalled                   func(hash []byte) uint64
	GasPenalizedCalled                  func(hash []byte) uint64
	TotalGasProvidedCalled              func() uint64
	TotalGasProvidedAsScheduledCalled   func() uint64
	TotalGasProvidedWithScheduledCalled func() uint64
	TotalGasRefundedCalled              func() uint64
	TotalGasPenalizedCalled             func() uint64
	RemoveGasProvidedCalled             func(hashes [][]byte)
	RemoveGasProvidedAsScheduledCalled  func(hashes [][]byte)
	RemoveGasRefundedCalled             func(hashes [][]byte)
	RemoveGasPenalizedCalled            func(hashes [][]byte)
	RestoreGasSinceLastResetCalled      func(key []byte)
	ComputeGasProvidedByMiniBlockCalled func(miniBlock *block.MiniBlock, mapHashTx map[string]data.TransactionHandler) (uint64, uint64, error)
	ComputeGasProvidedByTxCalled        func(txSenderShardId uint32, txReceiverSharedId uint32, txHandler data.TransactionHandler) (uint64, uint64, error)
}

GasHandlerStub -

func (*GasHandlerStub) ComputeGasProvidedByMiniBlock

func (ghs *GasHandlerStub) ComputeGasProvidedByMiniBlock(miniBlock *block.MiniBlock, mapHashTx map[string]data.TransactionHandler) (uint64, uint64, error)

ComputeGasProvidedByMiniBlock -

func (*GasHandlerStub) ComputeGasProvidedByTx

func (ghs *GasHandlerStub) ComputeGasProvidedByTx(txSenderShardId uint32, txReceiverShardId uint32, txHandler data.TransactionHandler) (uint64, uint64, error)

ComputeGasProvidedByTx -

func (*GasHandlerStub) GasPenalized

func (ghs *GasHandlerStub) GasPenalized(hash []byte) uint64

GasPenalized -

func (*GasHandlerStub) GasProvided

func (ghs *GasHandlerStub) GasProvided(hash []byte) uint64

GasProvided -

func (*GasHandlerStub) GasProvidedAsScheduled

func (ghs *GasHandlerStub) GasProvidedAsScheduled(hash []byte) uint64

GasProvidedAsScheduled -

func (*GasHandlerStub) GasRefunded

func (ghs *GasHandlerStub) GasRefunded(hash []byte) uint64

GasRefunded -

func (*GasHandlerStub) Init

func (ghs *GasHandlerStub) Init()

Init -

func (*GasHandlerStub) IsInterfaceNil

func (ghs *GasHandlerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*GasHandlerStub) RemoveGasPenalized

func (ghs *GasHandlerStub) RemoveGasPenalized(hashes [][]byte)

RemoveGasPenalized -

func (*GasHandlerStub) RemoveGasProvided

func (ghs *GasHandlerStub) RemoveGasProvided(hashes [][]byte)

RemoveGasProvided -

func (*GasHandlerStub) RemoveGasProvidedAsScheduled

func (ghs *GasHandlerStub) RemoveGasProvidedAsScheduled(hashes [][]byte)

RemoveGasProvidedAsScheduled -

func (*GasHandlerStub) RemoveGasRefunded

func (ghs *GasHandlerStub) RemoveGasRefunded(hashes [][]byte)

RemoveGasRefunded -

func (*GasHandlerStub) Reset

func (ghs *GasHandlerStub) Reset(key []byte)

Reset -

func (*GasHandlerStub) RestoreGasSinceLastReset

func (ghs *GasHandlerStub) RestoreGasSinceLastReset(key []byte)

RestoreGasSinceLastReset -

func (*GasHandlerStub) SetGasPenalized

func (ghs *GasHandlerStub) SetGasPenalized(gasPenalized uint64, hash []byte)

SetGasPenalized -

func (*GasHandlerStub) SetGasProvided

func (ghs *GasHandlerStub) SetGasProvided(gasProvided uint64, hash []byte)

SetGasProvided -

func (*GasHandlerStub) SetGasProvidedAsScheduled

func (ghs *GasHandlerStub) SetGasProvidedAsScheduled(gasProvided uint64, hash []byte)

SetGasProvidedAsScheduled -

func (*GasHandlerStub) SetGasRefunded

func (ghs *GasHandlerStub) SetGasRefunded(gasRefunded uint64, hash []byte)

SetGasRefunded -

func (*GasHandlerStub) TotalGasPenalized

func (ghs *GasHandlerStub) TotalGasPenalized() uint64

TotalGasPenalized -

func (*GasHandlerStub) TotalGasProvided

func (ghs *GasHandlerStub) TotalGasProvided() uint64

TotalGasProvided -

func (*GasHandlerStub) TotalGasProvidedAsScheduled

func (ghs *GasHandlerStub) TotalGasProvidedAsScheduled() uint64

TotalGasProvidedAsScheduled -

func (*GasHandlerStub) TotalGasProvidedWithScheduled

func (ghs *GasHandlerStub) TotalGasProvidedWithScheduled() uint64

TotalGasProvidedWithScheduled -

func (*GasHandlerStub) TotalGasRefunded

func (ghs *GasHandlerStub) TotalGasRefunded() uint64

TotalGasRefunded -

type GasScheduleNotifierMock

type GasScheduleNotifierMock struct {
	GasSchedule                 map[string]map[string]uint64
	RegisterNotifyHandlerCalled func(handler core.GasScheduleSubscribeHandler)
	LatestGasScheduleCalled     func() map[string]map[string]uint64
	LatestGasScheduleCopyCalled func() map[string]map[string]uint64
}

GasScheduleNotifierMock -

func NewGasScheduleNotifierMock

func NewGasScheduleNotifierMock(gasSchedule map[string]map[string]uint64) *GasScheduleNotifierMock

NewGasScheduleNotifierMock -

func (*GasScheduleNotifierMock) IsInterfaceNil

func (g *GasScheduleNotifierMock) IsInterfaceNil() bool

IsInterfaceNil -

func (*GasScheduleNotifierMock) LatestGasSchedule

func (g *GasScheduleNotifierMock) LatestGasSchedule() map[string]map[string]uint64

LatestGasSchedule -

func (*GasScheduleNotifierMock) LatestGasScheduleCopy

func (g *GasScheduleNotifierMock) LatestGasScheduleCopy() map[string]map[string]uint64

LatestGasScheduleCopy -

func (*GasScheduleNotifierMock) RegisterNotifyHandler

func (g *GasScheduleNotifierMock) RegisterNotifyHandler(handler core.GasScheduleSubscribeHandler)

RegisterNotifyHandler -

func (*GasScheduleNotifierMock) UnRegisterAll

func (g *GasScheduleNotifierMock) UnRegisterAll()

UnRegisterAll -

type HardforkTriggerStub

type HardforkTriggerStub struct {
	SetExportFactoryHandlerCalled func(exportFactoryHandler update.ExportFactoryHandler) error
	TriggerCalled                 func(epoch uint32, withEarlyEndOfEpoch bool) error
	IsSelfTriggerCalled           func() bool
	TriggerReceivedCalled         func(payload []byte, data []byte, pkBytes []byte) (bool, error)
	RecordedTriggerMessageCalled  func() ([]byte, bool)
	CreateDataCalled              func() []byte
	AddCloserCalled               func(closer update.Closer) error
	NotifyTriggerReceivedV2Called func() <-chan struct{}
}

HardforkTriggerStub -

func (*HardforkTriggerStub) AddCloser

func (hts *HardforkTriggerStub) AddCloser(closer update.Closer) error

AddCloser -

func (*HardforkTriggerStub) CreateData

func (hts *HardforkTriggerStub) CreateData() []byte

CreateData -

func (*HardforkTriggerStub) IsInterfaceNil

func (hts *HardforkTriggerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*HardforkTriggerStub) IsSelfTrigger

func (hts *HardforkTriggerStub) IsSelfTrigger() bool

IsSelfTrigger -

func (*HardforkTriggerStub) NotifyTriggerReceivedV2

func (hts *HardforkTriggerStub) NotifyTriggerReceivedV2() <-chan struct{}

NotifyTriggerReceivedV2 -

func (*HardforkTriggerStub) RecordedTriggerMessage

func (hts *HardforkTriggerStub) RecordedTriggerMessage() ([]byte, bool)

RecordedTriggerMessage -

func (*HardforkTriggerStub) SetExportFactoryHandler

func (hts *HardforkTriggerStub) SetExportFactoryHandler(exportFactoryHandler update.ExportFactoryHandler) error

SetExportFactoryHandler -

func (*HardforkTriggerStub) Trigger

func (hts *HardforkTriggerStub) Trigger(epoch uint32, withEarlyEndOfEpoch bool) error

Trigger -

func (*HardforkTriggerStub) TriggerReceived

func (hts *HardforkTriggerStub) TriggerReceived(payload []byte, data []byte, pkBytes []byte) (bool, error)

TriggerReceived -

type HasherStub

type HasherStub struct {
	ComputeCalled   func(s string) []byte
	EmptyHashCalled func() []byte
	SizeCalled      func() int
}

HasherStub -

func (*HasherStub) Compute

func (hash *HasherStub) Compute(s string) []byte

Compute -

func (*HasherStub) EmptyHash

func (hash *HasherStub) EmptyHash() []byte

EmptyHash -

func (*HasherStub) IsInterfaceNil

func (hash *HasherStub) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*HasherStub) Size

func (hash *HasherStub) Size() int

Size -

type HeaderHandlerStub

type HeaderHandlerStub struct {
	EpochField                             uint32
	RoundField                             uint64
	TimestampField                         uint64
	BlockBodyTypeInt32Field                int32
	GetMiniBlockHeadersWithDstCalled       func(destId uint32) map[string]uint32
	GetOrderedCrossMiniblocksWithDstCalled func(destId uint32) []*data.MiniBlockInfo
	GetPubKeysBitmapCalled                 func() []byte
	GetSignatureCalled                     func() []byte
	GetRootHashCalled                      func() []byte
	GetRandSeedCalled                      func() []byte
	GetPrevRandSeedCalled                  func() []byte
	GetPrevHashCalled                      func() []byte
	CloneCalled                            func() data.HeaderHandler
	GetChainIDCalled                       func() []byte
	CheckChainIDCalled                     func(reference []byte) error
	GetReservedCalled                      func() []byte
	IsStartOfEpochBlockCalled              func() bool
	HasScheduledMiniBlocksCalled           func() bool
	GetNonceCalled                         func() uint64
	CheckFieldsForNilCalled                func() error
	SetShardIDCalled                       func(shardID uint32) error
	SetPrevHashCalled                      func(hash []byte) error
	SetPrevRandSeedCalled                  func(seed []byte) error
	SetPubKeysBitmapCalled                 func(bitmap []byte) error
	SetChainIDCalled                       func(chainID []byte) error
	SetTimeStampCalled                     func(timestamp uint64) error
	SetRandSeedCalled                      func(seed []byte) error
	SetSignatureCalled                     func(signature []byte) error
	SetLeaderSignatureCalled               func(signature []byte) error
}

HeaderHandlerStub -

func (*HeaderHandlerStub) CheckFieldsForNil added in v1.4.6

func (hhs *HeaderHandlerStub) CheckFieldsForNil() error

CheckFieldsForNil -

func (*HeaderHandlerStub) GetAccumulatedFees

func (hhs *HeaderHandlerStub) GetAccumulatedFees() *big.Int

GetAccumulatedFees -

func (*HeaderHandlerStub) GetAdditionalData

func (hhs *HeaderHandlerStub) GetAdditionalData() headerVersionData.HeaderAdditionalData

GetAdditionalData gets the additional version-related data

func (*HeaderHandlerStub) GetBlockBodyTypeInt32

func (hhs *HeaderHandlerStub) GetBlockBodyTypeInt32() int32

GetBlockBodyTypeInt32 -

func (*HeaderHandlerStub) GetChainID

func (hhs *HeaderHandlerStub) GetChainID() []byte

GetChainID -

func (*HeaderHandlerStub) GetDevFeesInEpoch

func (hhs *HeaderHandlerStub) GetDevFeesInEpoch() *big.Int

GetDevFeesInEpoch -

func (*HeaderHandlerStub) GetDeveloperFees

func (hhs *HeaderHandlerStub) GetDeveloperFees() *big.Int

GetDeveloperFees -

func (*HeaderHandlerStub) GetEpoch

func (hhs *HeaderHandlerStub) GetEpoch() uint32

GetEpoch -

func (*HeaderHandlerStub) GetEpochStartHandler

func (hhs *HeaderHandlerStub) GetEpochStartHandler() data.EpochStartHandler

GetEpochStartHandler -

func (*HeaderHandlerStub) GetEpochStartMetaHash

func (hhs *HeaderHandlerStub) GetEpochStartMetaHash() []byte

GetEpochStartMetaHash -

func (*HeaderHandlerStub) GetLeaderSignature

func (hhs *HeaderHandlerStub) GetLeaderSignature() []byte

GetLeaderSignature -

func (*HeaderHandlerStub) GetMetaBlockHashes

func (hhs *HeaderHandlerStub) GetMetaBlockHashes() [][]byte

GetMetaBlockHashes -

func (*HeaderHandlerStub) GetMiniBlockHeaderHandlers

func (hhs *HeaderHandlerStub) GetMiniBlockHeaderHandlers() []data.MiniBlockHeaderHandler

GetMiniBlockHeaderHandlers -

func (*HeaderHandlerStub) GetMiniBlockHeadersHashes

func (hhs *HeaderHandlerStub) GetMiniBlockHeadersHashes() [][]byte

GetMiniBlockHeadersHashes -

func (*HeaderHandlerStub) GetMiniBlockHeadersWithDst

func (hhs *HeaderHandlerStub) GetMiniBlockHeadersWithDst(destId uint32) map[string]uint32

GetMiniBlockHeadersWithDst -

func (*HeaderHandlerStub) GetNonce

func (hhs *HeaderHandlerStub) GetNonce() uint64

GetNonce -

func (*HeaderHandlerStub) GetOrderedCrossMiniblocksWithDst

func (hhs *HeaderHandlerStub) GetOrderedCrossMiniblocksWithDst(destId uint32) []*data.MiniBlockInfo

GetOrderedCrossMiniblocksWithDst -

func (*HeaderHandlerStub) GetPrevHash

func (hhs *HeaderHandlerStub) GetPrevHash() []byte

GetPrevHash -

func (*HeaderHandlerStub) GetPrevRandSeed

func (hhs *HeaderHandlerStub) GetPrevRandSeed() []byte

GetPrevRandSeed -

func (*HeaderHandlerStub) GetPubKeysBitmap

func (hhs *HeaderHandlerStub) GetPubKeysBitmap() []byte

GetPubKeysBitmap -

func (*HeaderHandlerStub) GetRandSeed

func (hhs *HeaderHandlerStub) GetRandSeed() []byte

GetRandSeed -

func (*HeaderHandlerStub) GetReceiptsHash

func (hhs *HeaderHandlerStub) GetReceiptsHash() []byte

GetReceiptsHash -

func (*HeaderHandlerStub) GetReserved

func (hhs *HeaderHandlerStub) GetReserved() []byte

GetReserved -

func (*HeaderHandlerStub) GetRootHash

func (hhs *HeaderHandlerStub) GetRootHash() []byte

GetRootHash -

func (*HeaderHandlerStub) GetRound

func (hhs *HeaderHandlerStub) GetRound() uint64

GetRound -

func (*HeaderHandlerStub) GetShardID

func (hhs *HeaderHandlerStub) GetShardID() uint32

GetShardID -

func (*HeaderHandlerStub) GetShardInfoHandlers

func (hhs *HeaderHandlerStub) GetShardInfoHandlers() []data.ShardDataHandler

GetShardInfoHandlers -

func (*HeaderHandlerStub) GetSignature

func (hhs *HeaderHandlerStub) GetSignature() []byte

GetSignature -

func (*HeaderHandlerStub) GetSoftwareVersion

func (hhs *HeaderHandlerStub) GetSoftwareVersion() []byte

GetSoftwareVersion -

func (*HeaderHandlerStub) GetTimeStamp

func (hhs *HeaderHandlerStub) GetTimeStamp() uint64

GetTimeStamp -

func (*HeaderHandlerStub) GetTxCount

func (hhs *HeaderHandlerStub) GetTxCount() uint32

GetTxCount -

func (*HeaderHandlerStub) GetValidatorStatsRootHash

func (hhs *HeaderHandlerStub) GetValidatorStatsRootHash() []byte

GetValidatorStatsRootHash -

func (*HeaderHandlerStub) HasScheduledMiniBlocks

func (hhs *HeaderHandlerStub) HasScheduledMiniBlocks() bool

HasScheduledMiniBlocks -

func (*HeaderHandlerStub) HasScheduledSupport

func (hhs *HeaderHandlerStub) HasScheduledSupport() bool

HasScheduledSupport -

func (*HeaderHandlerStub) IsInterfaceNil

func (hhs *HeaderHandlerStub) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*HeaderHandlerStub) IsStartOfEpochBlock

func (hhs *HeaderHandlerStub) IsStartOfEpochBlock() bool

IsStartOfEpochBlock -

func (*HeaderHandlerStub) MapMiniBlockHashesToShards

func (hhs *HeaderHandlerStub) MapMiniBlockHashesToShards() map[string]uint32

MapMiniBlockHashesToShards -

func (*HeaderHandlerStub) SetAccumulatedFees

func (hhs *HeaderHandlerStub) SetAccumulatedFees(_ *big.Int) error

SetAccumulatedFees -

func (*HeaderHandlerStub) SetAccumulatedFeesInEpoch

func (hhs *HeaderHandlerStub) SetAccumulatedFeesInEpoch(_ *big.Int) error

SetAccumulatedFeesInEpoch -

func (*HeaderHandlerStub) SetAdditionalData

SetAdditionalData sets the additional version-related data

func (*HeaderHandlerStub) SetBlockBodyTypeInt32 added in v1.7.6

func (hhs *HeaderHandlerStub) SetBlockBodyTypeInt32(blockBodyType int32) error

SetBlockBodyTypeInt32 -

func (*HeaderHandlerStub) SetChainID

func (hhs *HeaderHandlerStub) SetChainID(chainID []byte) error

SetChainID -

func (*HeaderHandlerStub) SetDevFeesInEpoch

func (hhs *HeaderHandlerStub) SetDevFeesInEpoch(_ *big.Int) error

SetDevFeesInEpoch -

func (*HeaderHandlerStub) SetDeveloperFees

func (hhs *HeaderHandlerStub) SetDeveloperFees(_ *big.Int) error

SetDeveloperFees -

func (*HeaderHandlerStub) SetEpoch

func (hhs *HeaderHandlerStub) SetEpoch(_ uint32) error

SetEpoch -

func (*HeaderHandlerStub) SetEpochStartMetaHash

func (hhs *HeaderHandlerStub) SetEpochStartMetaHash(_ []byte) error

SetEpochStartMetaHash -

func (*HeaderHandlerStub) SetLeaderSignature

func (hhs *HeaderHandlerStub) SetLeaderSignature(signature []byte) error

SetLeaderSignature -

func (*HeaderHandlerStub) SetMetaBlockHashes

func (hhs *HeaderHandlerStub) SetMetaBlockHashes(_ [][]byte) error

SetMetaBlockHashes -

func (*HeaderHandlerStub) SetMiniBlockHeaderHandlers

func (hhs *HeaderHandlerStub) SetMiniBlockHeaderHandlers(_ []data.MiniBlockHeaderHandler) error

SetMiniBlockHeaderHandlers -

func (*HeaderHandlerStub) SetNonce

func (hhs *HeaderHandlerStub) SetNonce(_ uint64) error

SetNonce -

func (*HeaderHandlerStub) SetPrevHash

func (hhs *HeaderHandlerStub) SetPrevHash(hash []byte) error

SetPrevHash -

func (*HeaderHandlerStub) SetPrevRandSeed

func (hhs *HeaderHandlerStub) SetPrevRandSeed(seed []byte) error

SetPrevRandSeed -

func (*HeaderHandlerStub) SetPubKeysBitmap

func (hhs *HeaderHandlerStub) SetPubKeysBitmap(bitmap []byte) error

SetPubKeysBitmap -

func (*HeaderHandlerStub) SetRandSeed

func (hhs *HeaderHandlerStub) SetRandSeed(seed []byte) error

SetRandSeed -

func (*HeaderHandlerStub) SetReceiptsHash

func (hhs *HeaderHandlerStub) SetReceiptsHash(_ []byte) error

SetReceiptsHash -

func (*HeaderHandlerStub) SetRootHash

func (hhs *HeaderHandlerStub) SetRootHash(_ []byte) error

SetRootHash -

func (*HeaderHandlerStub) SetRound

func (hhs *HeaderHandlerStub) SetRound(_ uint64) error

SetRound -

func (*HeaderHandlerStub) SetScheduledRootHash

func (hhs *HeaderHandlerStub) SetScheduledRootHash(_ []byte) error

SetScheduledRootHash -

func (*HeaderHandlerStub) SetShardID

func (hhs *HeaderHandlerStub) SetShardID(shardID uint32) error

SetShardID -

func (*HeaderHandlerStub) SetShardInfoHandlers

func (hhs *HeaderHandlerStub) SetShardInfoHandlers(_ []data.ShardDataHandler) error

SetShardInfoHandlers -

func (*HeaderHandlerStub) SetSignature

func (hhs *HeaderHandlerStub) SetSignature(signature []byte) error

SetSignature -

func (*HeaderHandlerStub) SetSoftwareVersion

func (hhs *HeaderHandlerStub) SetSoftwareVersion(_ []byte) error

SetSoftwareVersion -

func (*HeaderHandlerStub) SetTimeStamp

func (hhs *HeaderHandlerStub) SetTimeStamp(timestamp uint64) error

SetTimeStamp -

func (*HeaderHandlerStub) SetTxCount

func (hhs *HeaderHandlerStub) SetTxCount(_ uint32) error

SetTxCount -

func (*HeaderHandlerStub) SetValidatorStatsRootHash

func (hhs *HeaderHandlerStub) SetValidatorStatsRootHash(_ []byte) error

SetValidatorStatsRootHash -

func (*HeaderHandlerStub) ShallowClone

func (hhs *HeaderHandlerStub) ShallowClone() data.HeaderHandler

ShallowClone -

func (*HeaderHandlerStub) ValidateHeaderVersion

func (hhs *HeaderHandlerStub) ValidateHeaderVersion() error

ValidateHeaderVersion -

type HeaderVersionHandlerStub

type HeaderVersionHandlerStub struct {
	GetVersionCalled     func(epoch uint32) string
	VerifyCalled         func(hdr data.HeaderHandler) error
	IsInterfaceNilCalled func() bool
}

HeaderVersionHandlerStub -

func (*HeaderVersionHandlerStub) GetVersion

func (hvm *HeaderVersionHandlerStub) GetVersion(epoch uint32) string

GetVersion -

func (*HeaderVersionHandlerStub) IsInterfaceNil

func (hvm *HeaderVersionHandlerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*HeaderVersionHandlerStub) Verify

Verify -

type ImportStartHandlerStub

type ImportStartHandlerStub struct {
	SetStartImportCalled            func() error
	ResetStartImportCalled          func() error
	IsAfterExportBeforeImportCalled func() bool
	ShouldStartImportCalled         func() bool
}

ImportStartHandlerStub -

func (*ImportStartHandlerStub) IsAfterExportBeforeImport

func (ish *ImportStartHandlerStub) IsAfterExportBeforeImport() bool

IsAfterExportBeforeImport -

func (*ImportStartHandlerStub) IsInterfaceNil

func (ish *ImportStartHandlerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*ImportStartHandlerStub) ResetStartImport

func (ish *ImportStartHandlerStub) ResetStartImport() error

ResetStartImport -

func (*ImportStartHandlerStub) SetStartImport

func (ish *ImportStartHandlerStub) SetStartImport() error

SetStartImport -

func (*ImportStartHandlerStub) ShouldStartImport

func (ish *ImportStartHandlerStub) ShouldStartImport() bool

ShouldStartImport -

type InterceptedDataStub

type InterceptedDataStub struct {
	CheckValidityCalled     func() error
	IsForCurrentShardCalled func() bool
	HashCalled              func() []byte
	TypeCalled              func() string
	IdentifiersCalled       func() [][]byte
	StringCalled            func() string
}

InterceptedDataStub -

func (*InterceptedDataStub) CheckValidity

func (ids *InterceptedDataStub) CheckValidity() error

CheckValidity -

func (*InterceptedDataStub) Hash

func (ids *InterceptedDataStub) Hash() []byte

Hash -

func (*InterceptedDataStub) Identifiers

func (ids *InterceptedDataStub) Identifiers() [][]byte

Identifiers -

func (*InterceptedDataStub) IsForCurrentShard

func (ids *InterceptedDataStub) IsForCurrentShard() bool

IsForCurrentShard -

func (*InterceptedDataStub) IsInterfaceNil

func (ids *InterceptedDataStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*InterceptedDataStub) String

func (ids *InterceptedDataStub) String() string

String -

func (*InterceptedDataStub) Type

func (ids *InterceptedDataStub) Type() string

Type -

type InterceptorStub

type InterceptorStub struct {
	ProcessReceivedMessageCalled     func(message p2p.MessageP2P) error
	SetInterceptedDebugHandlerCalled func(debugger process.InterceptedDebugger) error
	RegisterHandlerCalled            func(handler func(topic string, hash []byte, data interface{}))
	CloseCalled                      func() error
}

InterceptorStub -

func (*InterceptorStub) Close

func (is *InterceptorStub) Close() error

Close -

func (*InterceptorStub) IsInterfaceNil

func (is *InterceptorStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*InterceptorStub) ProcessReceivedMessage

func (is *InterceptorStub) ProcessReceivedMessage(message p2p.MessageP2P, _ core.PeerID, _ p2p.MessageHandler) error

ProcessReceivedMessage -

func (*InterceptorStub) RegisterHandler

func (is *InterceptorStub) RegisterHandler(handler func(topic string, hash []byte, data interface{}))

RegisterHandler -

func (*InterceptorStub) SetInterceptedDebugHandler

func (is *InterceptorStub) SetInterceptedDebugHandler(debugger process.InterceptedDebugger) error

SetInterceptedDebugHandler -

type InterceptorsContainerStub

type InterceptorsContainerStub struct {
	IterateCalled     func(handler func(key string, interceptor process.Interceptor) bool)
	GetCalled         func(string) (process.Interceptor, error)
	AddCalled         func(key string, interceptor process.Interceptor) error
	AddMultipleCalled func(keys []string, interceptors []process.Interceptor) error
	ReplaceCalled     func(key string, interceptor process.Interceptor) error
	RemoveCalled      func(key string)
	LenCalled         func() int
	CloseCalled       func() error
}

InterceptorsContainerStub -

func (*InterceptorsContainerStub) Add

func (ics *InterceptorsContainerStub) Add(key string, interceptor process.Interceptor) error

Add -

func (*InterceptorsContainerStub) AddMultiple

func (ics *InterceptorsContainerStub) AddMultiple(keys []string, interceptors []process.Interceptor) error

AddMultiple -

func (*InterceptorsContainerStub) Close

func (ics *InterceptorsContainerStub) Close() error

Close -

func (*InterceptorsContainerStub) Get

Get -

func (*InterceptorsContainerStub) IsInterfaceNil

func (ics *InterceptorsContainerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*InterceptorsContainerStub) Iterate

func (ics *InterceptorsContainerStub) Iterate(handler func(key string, interceptor process.Interceptor) bool)

Iterate -

func (*InterceptorsContainerStub) Len

func (ics *InterceptorsContainerStub) Len() int

Len -

func (*InterceptorsContainerStub) Remove

func (ics *InterceptorsContainerStub) Remove(key string)

Remove -

func (*InterceptorsContainerStub) Replace

func (ics *InterceptorsContainerStub) Replace(key string, interceptor process.Interceptor) error

Replace -

type IteratorChannelsProviderStub added in v1.6.0

type IteratorChannelsProviderStub struct {
	GetIteratorChannelsCalled func() *common.TrieIteratorChannels
}

IteratorChannelsProviderStub -

func (*IteratorChannelsProviderStub) GetIteratorChannels added in v1.6.0

func (icps *IteratorChannelsProviderStub) GetIteratorChannels() *common.TrieIteratorChannels

GetIteratorChannels -

func (*IteratorChannelsProviderStub) IsInterfaceNil added in v1.6.0

func (icps *IteratorChannelsProviderStub) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

type KeccakMock

type KeccakMock struct {
}

KeccakMock is a sha3-Keccak implementation of the hasher interface.

func (KeccakMock) Compute

func (k KeccakMock) Compute(s string) []byte

Compute takes a string, and returns the sha3-Keccak hash of that string

func (KeccakMock) EmptyHash

func (k KeccakMock) EmptyHash() []byte

EmptyHash returns the sha3-Keccak hash of the empty string

func (KeccakMock) IsInterfaceNil

func (k KeccakMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (KeccakMock) Size

func (KeccakMock) Size() int

Size returns the size, in number of bytes, of a sha3-Keccak hash

type KeysHandlerStub added in v1.6.0

type KeysHandlerStub struct {
	GetHandledPrivateKeyCalled                   func(pkBytes []byte) crypto.PrivateKey
	GetP2PIdentityCalled                         func(pkBytes []byte) ([]byte, core.PeerID, error)
	IsKeyManagedByCurrentNodeCalled              func(pkBytes []byte) bool
	IncrementRoundsWithoutReceivedMessagesCalled func(pkBytes []byte)
	GetAssociatedPidCalled                       func(pkBytes []byte) core.PeerID
	IsOriginalPublicKeyOfTheNodeCalled           func(pkBytes []byte) bool
	ResetRoundsWithoutReceivedMessagesCalled     func(pkBytes []byte, pid core.PeerID)
	GetRedundancyStepInReasonCalled              func() string
}

KeysHandlerStub -

func (*KeysHandlerStub) GetAssociatedPid added in v1.6.0

func (stub *KeysHandlerStub) GetAssociatedPid(pkBytes []byte) core.PeerID

GetAssociatedPid -

func (*KeysHandlerStub) GetHandledPrivateKey added in v1.6.0

func (stub *KeysHandlerStub) GetHandledPrivateKey(pkBytes []byte) crypto.PrivateKey

GetHandledPrivateKey -

func (*KeysHandlerStub) GetP2PIdentity added in v1.6.0

func (stub *KeysHandlerStub) GetP2PIdentity(pkBytes []byte) ([]byte, core.PeerID, error)

GetP2PIdentity -

func (*KeysHandlerStub) GetRedundancyStepInReason added in v1.6.14

func (stub *KeysHandlerStub) GetRedundancyStepInReason() string

GetRedundancyStepInReason -

func (*KeysHandlerStub) IncrementRoundsWithoutReceivedMessages added in v1.6.0

func (stub *KeysHandlerStub) IncrementRoundsWithoutReceivedMessages(pkBytes []byte)

IncrementRoundsWithoutReceivedMessages -

func (*KeysHandlerStub) IsInterfaceNil added in v1.6.0

func (stub *KeysHandlerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*KeysHandlerStub) IsKeyManagedByCurrentNode added in v1.6.0

func (stub *KeysHandlerStub) IsKeyManagedByCurrentNode(pkBytes []byte) bool

IsKeyManagedByCurrentNode -

func (*KeysHandlerStub) IsOriginalPublicKeyOfTheNode added in v1.6.0

func (stub *KeysHandlerStub) IsOriginalPublicKeyOfTheNode(pkBytes []byte) bool

IsOriginalPublicKeyOfTheNode -

func (*KeysHandlerStub) ResetRoundsWithoutReceivedMessages added in v1.6.2

func (stub *KeysHandlerStub) ResetRoundsWithoutReceivedMessages(pkBytes []byte, pid core.PeerID)

ResetRoundsWithoutReceivedMessages -

type LoggerStub

type LoggerStub struct {
	TraceCalled      func(message string, args ...interface{})
	DebugCalled      func(message string, args ...interface{})
	InfoCalled       func(message string, args ...interface{})
	WarnCalled       func(message string, args ...interface{})
	ErrorCalled      func(message string, args ...interface{})
	LogIfErrorCalled func(err error, args ...interface{})
	LogCalled        func(logLevel logger.LogLevel, message string, args ...interface{})
	LogLineCalled    func(line *logger.LogLine)
	SetLevelCalled   func(logLevel logger.LogLevel)
	GetLevelCalled   func() logger.LogLevel
}

LoggerStub -

func (*LoggerStub) Debug

func (stub *LoggerStub) Debug(message string, args ...interface{})

Debug -

func (*LoggerStub) Error

func (stub *LoggerStub) Error(message string, args ...interface{})

Error -

func (*LoggerStub) GetLevel

func (stub *LoggerStub) GetLevel() logger.LogLevel

GetLevel -

func (*LoggerStub) Info

func (stub *LoggerStub) Info(message string, args ...interface{})

Info -

func (*LoggerStub) IsInterfaceNil

func (stub *LoggerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*LoggerStub) Log

func (stub *LoggerStub) Log(logLevel logger.LogLevel, message string, args ...interface{})

Log -

func (*LoggerStub) LogIfError

func (stub *LoggerStub) LogIfError(err error, args ...interface{})

LogIfError -

func (*LoggerStub) LogLine

func (stub *LoggerStub) LogLine(line *logger.LogLine)

LogLine -

func (*LoggerStub) SetLevel

func (stub *LoggerStub) SetLevel(logLevel logger.LogLevel)

SetLevel -

func (*LoggerStub) Trace

func (stub *LoggerStub) Trace(message string, args ...interface{})

Trace -

func (*LoggerStub) Warn

func (stub *LoggerStub) Warn(message string, args ...interface{})

Warn -

type LogsFacadeStub

type LogsFacadeStub struct {
	GetLogCalled                    func(txHash []byte, epoch uint32) (*transaction.ApiLogs, error)
	IncludeLogsInTransactionsCalled func(txs []*transaction.ApiTransactionResult, logsKeys [][]byte, epoch uint32) error
}

LogsFacadeStub -

func (*LogsFacadeStub) GetLog

func (stub *LogsFacadeStub) GetLog(logKey []byte, epoch uint32) (*transaction.ApiLogs, error)

GetLog -

func (*LogsFacadeStub) IncludeLogsInTransactions

func (stub *LogsFacadeStub) IncludeLogsInTransactions(txs []*transaction.ApiTransactionResult, logsKeys [][]byte, epoch uint32) error

IncludeLogsInTransactions -

func (*LogsFacadeStub) IsInterfaceNil

func (stub *LogsFacadeStub) IsInterfaceNil() bool

IsInterfaceNil -

type ManagedPeersHolderStub added in v1.6.0

type ManagedPeersHolderStub struct {
	AddManagedPeerCalled                         func(privateKeyBytes []byte) error
	GetPrivateKeyCalled                          func(pkBytes []byte) (crypto.PrivateKey, error)
	GetP2PIdentityCalled                         func(pkBytes []byte) ([]byte, core.PeerID, error)
	GetMachineIDCalled                           func(pkBytes []byte) (string, error)
	GetNameAndIdentityCalled                     func(pkBytes []byte) (string, string, error)
	IncrementRoundsWithoutReceivedMessagesCalled func(pkBytes []byte)
	ResetRoundsWithoutReceivedMessagesCalled     func(pkBytes []byte, pid core.PeerID)
	GetManagedKeysByCurrentNodeCalled            func() map[string]crypto.PrivateKey
	GetLoadedKeysByCurrentNodeCalled             func() [][]byte
	IsKeyManagedByCurrentNodeCalled              func(pkBytes []byte) bool
	IsKeyRegisteredCalled                        func(pkBytes []byte) bool
	IsPidManagedByCurrentNodeCalled              func(pid core.PeerID) bool
	IsKeyValidatorCalled                         func(pkBytes []byte) bool
	SetValidatorStateCalled                      func(pkBytes []byte, state bool)
	GetNextPeerAuthenticationTimeCalled          func(pkBytes []byte) (time.Time, error)
	SetNextPeerAuthenticationTimeCalled          func(pkBytes []byte, nextTime time.Time)
	IsMultiKeyModeCalled                         func() bool
	GetRedundancyStepInReasonCalled              func() string
}

ManagedPeersHolderStub -

func (*ManagedPeersHolderStub) AddManagedPeer added in v1.6.0

func (stub *ManagedPeersHolderStub) AddManagedPeer(privateKeyBytes []byte) error

AddManagedPeer -

func (*ManagedPeersHolderStub) GetLoadedKeysByCurrentNode added in v1.6.16

func (stub *ManagedPeersHolderStub) GetLoadedKeysByCurrentNode() [][]byte

GetLoadedKeysByCurrentNode -

func (*ManagedPeersHolderStub) GetMachineID added in v1.6.0

func (stub *ManagedPeersHolderStub) GetMachineID(pkBytes []byte) (string, error)

GetMachineID -

func (*ManagedPeersHolderStub) GetManagedKeysByCurrentNode added in v1.6.0

func (stub *ManagedPeersHolderStub) GetManagedKeysByCurrentNode() map[string]crypto.PrivateKey

GetManagedKeysByCurrentNode -

func (*ManagedPeersHolderStub) GetNameAndIdentity added in v1.6.0

func (stub *ManagedPeersHolderStub) GetNameAndIdentity(pkBytes []byte) (string, string, error)

GetNameAndIdentity -

func (*ManagedPeersHolderStub) GetNextPeerAuthenticationTime added in v1.6.0

func (stub *ManagedPeersHolderStub) GetNextPeerAuthenticationTime(pkBytes []byte) (time.Time, error)

GetNextPeerAuthenticationTime -

func (*ManagedPeersHolderStub) GetP2PIdentity added in v1.6.0

func (stub *ManagedPeersHolderStub) GetP2PIdentity(pkBytes []byte) ([]byte, core.PeerID, error)

GetP2PIdentity -

func (*ManagedPeersHolderStub) GetPrivateKey added in v1.6.0

func (stub *ManagedPeersHolderStub) GetPrivateKey(pkBytes []byte) (crypto.PrivateKey, error)

GetPrivateKey -

func (*ManagedPeersHolderStub) GetRedundancyStepInReason added in v1.6.14

func (stub *ManagedPeersHolderStub) GetRedundancyStepInReason() string

GetRedundancyStepInReason -

func (*ManagedPeersHolderStub) IncrementRoundsWithoutReceivedMessages added in v1.6.0

func (stub *ManagedPeersHolderStub) IncrementRoundsWithoutReceivedMessages(pkBytes []byte)

IncrementRoundsWithoutReceivedMessages -

func (*ManagedPeersHolderStub) IsInterfaceNil added in v1.6.0

func (stub *ManagedPeersHolderStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*ManagedPeersHolderStub) IsKeyManagedByCurrentNode added in v1.6.0

func (stub *ManagedPeersHolderStub) IsKeyManagedByCurrentNode(pkBytes []byte) bool

IsKeyManagedByCurrentNode -

func (*ManagedPeersHolderStub) IsKeyRegistered added in v1.6.0

func (stub *ManagedPeersHolderStub) IsKeyRegistered(pkBytes []byte) bool

IsKeyRegistered -

func (*ManagedPeersHolderStub) IsKeyValidator added in v1.6.0

func (stub *ManagedPeersHolderStub) IsKeyValidator(pkBytes []byte) bool

IsKeyValidator -

func (*ManagedPeersHolderStub) IsMultiKeyMode added in v1.6.0

func (stub *ManagedPeersHolderStub) IsMultiKeyMode() bool

IsMultiKeyMode -

func (*ManagedPeersHolderStub) IsPidManagedByCurrentNode added in v1.6.0

func (stub *ManagedPeersHolderStub) IsPidManagedByCurrentNode(pid core.PeerID) bool

IsPidManagedByCurrentNode -

func (*ManagedPeersHolderStub) ResetRoundsWithoutReceivedMessages added in v1.6.0

func (stub *ManagedPeersHolderStub) ResetRoundsWithoutReceivedMessages(pkBytes []byte, pid core.PeerID)

ResetRoundsWithoutReceivedMessages -

func (*ManagedPeersHolderStub) SetNextPeerAuthenticationTime added in v1.6.0

func (stub *ManagedPeersHolderStub) SetNextPeerAuthenticationTime(pkBytes []byte, nextTime time.Time)

SetNextPeerAuthenticationTime -

func (*ManagedPeersHolderStub) SetValidatorState added in v1.6.0

func (stub *ManagedPeersHolderStub) SetValidatorState(pkBytes []byte, state bool)

SetValidatorState -

type ManagedPeersMonitorStub added in v1.6.0

type ManagedPeersMonitorStub struct {
	GetManagedKeysCountCalled    func() int
	GetEligibleManagedKeysCalled func() ([][]byte, error)
	GetWaitingManagedKeysCalled  func() ([][]byte, error)
	GetManagedKeysCalled         func() [][]byte
	GetLoadedKeysCalled          func() [][]byte
}

ManagedPeersMonitorStub -

func (*ManagedPeersMonitorStub) GetEligibleManagedKeys added in v1.6.0

func (stub *ManagedPeersMonitorStub) GetEligibleManagedKeys() ([][]byte, error)

GetEligibleManagedKeys -

func (*ManagedPeersMonitorStub) GetLoadedKeys added in v1.6.16

func (stub *ManagedPeersMonitorStub) GetLoadedKeys() [][]byte

GetLoadedKeys -

func (*ManagedPeersMonitorStub) GetManagedKeys added in v1.6.0

func (stub *ManagedPeersMonitorStub) GetManagedKeys() [][]byte

GetManagedKeys -

func (*ManagedPeersMonitorStub) GetManagedKeysCount added in v1.6.0

func (stub *ManagedPeersMonitorStub) GetManagedKeysCount() int

GetManagedKeysCount -

func (*ManagedPeersMonitorStub) GetWaitingManagedKeys added in v1.6.0

func (stub *ManagedPeersMonitorStub) GetWaitingManagedKeys() ([][]byte, error)

GetWaitingManagedKeys -

func (*ManagedPeersMonitorStub) IsInterfaceNil added in v1.6.0

func (stub *ManagedPeersMonitorStub) IsInterfaceNil() bool

IsInterfaceNil -

type MarshallerStub added in v1.6.0

type MarshallerStub struct {
	MarshalCalled   func(obj interface{}) ([]byte, error)
	UnmarshalCalled func(obj interface{}, buff []byte) error
}

MarshallerStub -

func (*MarshallerStub) IsInterfaceNil added in v1.6.0

func (stub *MarshallerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*MarshallerStub) Marshal added in v1.6.0

func (stub *MarshallerStub) Marshal(obj interface{}) ([]byte, error)

Marshal -

func (*MarshallerStub) Unmarshal added in v1.6.0

func (stub *MarshallerStub) Unmarshal(obj interface{}, buff []byte) error

Unmarshal -

type MaxNodesChangeConfigProviderStub added in v1.7.5

type MaxNodesChangeConfigProviderStub struct {
	GetAllNodesConfigCalled     func() []config.MaxNodesChangeConfig
	GetCurrentNodesConfigCalled func() config.MaxNodesChangeConfig
	EpochConfirmedCalled        func(epoch uint32, round uint64)
}

MaxNodesChangeConfigProviderStub -

func (*MaxNodesChangeConfigProviderStub) EpochConfirmed added in v1.7.5

func (stub *MaxNodesChangeConfigProviderStub) EpochConfirmed(epoch uint32, round uint64)

EpochConfirmed -

func (*MaxNodesChangeConfigProviderStub) GetAllNodesConfig added in v1.7.5

func (stub *MaxNodesChangeConfigProviderStub) GetAllNodesConfig() []config.MaxNodesChangeConfig

GetAllNodesConfig -

func (*MaxNodesChangeConfigProviderStub) GetCurrentNodesConfig added in v1.7.5

func (stub *MaxNodesChangeConfigProviderStub) GetCurrentNodesConfig() config.MaxNodesChangeConfig

GetCurrentNodesConfig -

func (*MaxNodesChangeConfigProviderStub) IsInterfaceNil added in v1.7.5

func (stub *MaxNodesChangeConfigProviderStub) IsInterfaceNil() bool

IsInterfaceNil -

type MemDbMock

type MemDbMock struct {
	PutCalled                  func(key, val []byte) error
	GetCalled                  func(key []byte) ([]byte, error)
	GetIdentifierCalled        func() string
	GetStateStatsHandlerCalled func() common.StateStatisticsHandler
	// contains filtered or unexported fields
}

MemDbMock represents the memory database storage. It holds a map of key value pairs and a mutex to handle concurrent accesses to the map

func NewMemDbMock

func NewMemDbMock() *MemDbMock

NewMemDbMock creates a new memorydb object

func (*MemDbMock) Close

func (s *MemDbMock) Close() error

Close closes the files/resources associated to the storage medium

func (*MemDbMock) Destroy

func (s *MemDbMock) Destroy() error

Destroy removes the storage medium stored data

func (*MemDbMock) DestroyClosed

func (s *MemDbMock) DestroyClosed() error

DestroyClosed removes the already closed storage medium stored data

func (*MemDbMock) Get

func (s *MemDbMock) Get(key []byte) ([]byte, error)

Get gets the value associated to the key, or reports an error

func (*MemDbMock) GetIdentifier added in v1.6.0

func (s *MemDbMock) GetIdentifier() string

GetIdentifier returns the identifier of the storage medium

func (*MemDbMock) GetStateStatsHandler added in v1.7.0

func (s *MemDbMock) GetStateStatsHandler() common.StateStatisticsHandler

GetStateStatsHandler -

func (*MemDbMock) Has

func (s *MemDbMock) Has(key []byte) error

Has returns true if the given key is present in the persistence medium, false otherwise

func (*MemDbMock) IsInterfaceNil

func (s *MemDbMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*MemDbMock) Put

func (s *MemDbMock) Put(key, val []byte) error

Put adds the value to the (key, val) storage medium

func (*MemDbMock) RangeKeys

func (s *MemDbMock) RangeKeys(handler func(key []byte, value []byte) bool)

RangeKeys will iterate over all contained (key, value) pairs calling the handler for each pair

func (*MemDbMock) Remove

func (s *MemDbMock) Remove(key []byte) error

Remove removes the data associated to the given key

type MessageSignVerifierMock

type MessageSignVerifierMock struct {
}

MessageSignVerifierMock -

func (*MessageSignVerifierMock) IsInterfaceNil

func (m *MessageSignVerifierMock) IsInterfaceNil() bool

IsInterfaceNil -

func (*MessageSignVerifierMock) Verify

func (m *MessageSignVerifierMock) Verify(_ []byte, _ []byte, _ []byte) error

Verify -

type MissingTrieNodesNotifierStub added in v1.6.0

type MissingTrieNodesNotifierStub struct {
	RegisterHandlerCalled            func(handler common.StateSyncNotifierSubscriber) error
	AsyncNotifyMissingTrieNodeCalled func(hash []byte)
}

MissingTrieNodesNotifierStub -

func (*MissingTrieNodesNotifierStub) AsyncNotifyMissingTrieNode added in v1.6.0

func (mtnns *MissingTrieNodesNotifierStub) AsyncNotifyMissingTrieNode(hash []byte)

AsyncNotifyMissingTrieNode -

func (*MissingTrieNodesNotifierStub) IsInterfaceNil added in v1.6.0

func (mtnns *MissingTrieNodesNotifierStub) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*MissingTrieNodesNotifierStub) RegisterHandler added in v1.6.0

func (mtnns *MissingTrieNodesNotifierStub) RegisterHandler(handler common.StateSyncNotifierSubscriber) error

RegisterHandler -

type NetworkStatisticsProviderStub added in v1.6.0

type NetworkStatisticsProviderStub struct {
	BpsSentCalled                          func() uint64
	BpsRecvCalled                          func() uint64
	BpsSentPeakCalled                      func() uint64
	BpsRecvPeakCalled                      func() uint64
	PercentSentCalled                      func() uint64
	PercentRecvCalled                      func() uint64
	TotalBytesSentInCurrentEpochCalled     func() uint64
	TotalBytesReceivedInCurrentEpochCalled func() uint64
	TotalSentInCurrentEpochCalled          func() string
	TotalReceivedInCurrentEpochCalled      func() string
	EpochConfirmedCalled                   func(epoch uint32, timestamp uint64)
	CloseCalled                            func() error
}

NetworkStatisticsProviderStub -

func (*NetworkStatisticsProviderStub) BpsRecv added in v1.6.0

func (stub *NetworkStatisticsProviderStub) BpsRecv() uint64

BpsRecv -

func (*NetworkStatisticsProviderStub) BpsRecvPeak added in v1.6.0

func (stub *NetworkStatisticsProviderStub) BpsRecvPeak() uint64

BpsRecvPeak -

func (*NetworkStatisticsProviderStub) BpsSent added in v1.6.0

func (stub *NetworkStatisticsProviderStub) BpsSent() uint64

BpsSent -

func (*NetworkStatisticsProviderStub) BpsSentPeak added in v1.6.0

func (stub *NetworkStatisticsProviderStub) BpsSentPeak() uint64

BpsSentPeak -

func (*NetworkStatisticsProviderStub) Close added in v1.6.0

func (stub *NetworkStatisticsProviderStub) Close() error

Close -

func (*NetworkStatisticsProviderStub) EpochConfirmed added in v1.6.0

func (stub *NetworkStatisticsProviderStub) EpochConfirmed(epoch uint32, timestamp uint64)

EpochConfirmed -

func (*NetworkStatisticsProviderStub) IsInterfaceNil added in v1.6.0

func (stub *NetworkStatisticsProviderStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*NetworkStatisticsProviderStub) PercentRecv added in v1.6.0

func (stub *NetworkStatisticsProviderStub) PercentRecv() uint64

PercentRecv -

func (*NetworkStatisticsProviderStub) PercentSent added in v1.6.0

func (stub *NetworkStatisticsProviderStub) PercentSent() uint64

PercentSent -

func (*NetworkStatisticsProviderStub) TotalBytesReceivedInCurrentEpoch added in v1.6.0

func (stub *NetworkStatisticsProviderStub) TotalBytesReceivedInCurrentEpoch() uint64

TotalBytesReceivedInCurrentEpoch -

func (*NetworkStatisticsProviderStub) TotalBytesSentInCurrentEpoch added in v1.6.0

func (stub *NetworkStatisticsProviderStub) TotalBytesSentInCurrentEpoch() uint64

TotalBytesSentInCurrentEpoch -

func (*NetworkStatisticsProviderStub) TotalReceivedInCurrentEpoch added in v1.6.0

func (stub *NetworkStatisticsProviderStub) TotalReceivedInCurrentEpoch() string

TotalReceivedInCurrentEpoch -

func (*NetworkStatisticsProviderStub) TotalSentInCurrentEpoch added in v1.6.0

func (stub *NetworkStatisticsProviderStub) TotalSentInCurrentEpoch() string

TotalSentInCurrentEpoch -

type OldDataCleanerProviderStub

type OldDataCleanerProviderStub struct {
	ShouldCleanCalled func() bool
}

OldDataCleanerProviderStub -

func (*OldDataCleanerProviderStub) IsInterfaceNil

func (o *OldDataCleanerProviderStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*OldDataCleanerProviderStub) ShouldClean

func (o *OldDataCleanerProviderStub) ShouldClean() bool

ShouldClean -

type PanicDoubleTransactionsDetector

type PanicDoubleTransactionsDetector struct {
}

PanicDoubleTransactionsDetector -

func (*PanicDoubleTransactionsDetector) IsInterfaceNil

func (detector *PanicDoubleTransactionsDetector) IsInterfaceNil() bool

IsInterfaceNil -

func (*PanicDoubleTransactionsDetector) ProcessBlockBody

func (detector *PanicDoubleTransactionsDetector) ProcessBlockBody(body *block.Body)

ProcessBlockBody -

type PathManagerStub

type PathManagerStub struct {
	PathForEpochCalled  func(shardId string, epoch uint32, identifier string) string
	PathForStaticCalled func(shardId string, identifier string) string
	DatabasePathCalled  func() string
}

PathManagerStub -

func (*PathManagerStub) DatabasePath

func (p *PathManagerStub) DatabasePath() string

DatabasePath -

func (*PathManagerStub) IsInterfaceNil

func (p *PathManagerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*PathManagerStub) PathForEpoch

func (p *PathManagerStub) PathForEpoch(shardId string, epoch uint32, identifier string) string

PathForEpoch -

func (*PathManagerStub) PathForStatic

func (p *PathManagerStub) PathForStatic(shardId string, identifier string) string

PathForStatic -

type PeerAuthenticationPayloadValidatorStub

type PeerAuthenticationPayloadValidatorStub struct {
	ValidateTimestampCalled func(payloadTimestamp int64) error
}

PeerAuthenticationPayloadValidatorStub -

func (*PeerAuthenticationPayloadValidatorStub) IsInterfaceNil

func (stub *PeerAuthenticationPayloadValidatorStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*PeerAuthenticationPayloadValidatorStub) ValidateTimestamp

func (stub *PeerAuthenticationPayloadValidatorStub) ValidateTimestamp(payloadTimestamp int64) error

ValidateTimestamp -

type PeerHonestyHandlerStub

type PeerHonestyHandlerStub struct {
	ChangeScoreCalled func(pk string, topic string, units int)
}

PeerHonestyHandlerStub -

func (*PeerHonestyHandlerStub) ChangeScore

func (phhs *PeerHonestyHandlerStub) ChangeScore(pk string, topic string, units int)

ChangeScore -

func (*PeerHonestyHandlerStub) Close

func (phhs *PeerHonestyHandlerStub) Close() error

Close -

func (*PeerHonestyHandlerStub) IsInterfaceNil

func (phhs *PeerHonestyHandlerStub) IsInterfaceNil() bool

IsInterfaceNil -

type PreProcessorExecutionInfoHandlerMock

type PreProcessorExecutionInfoHandlerMock struct {
	GetNumOfCrossInterMbsAndTxsCalled func() (int, int)
	InitProcessedTxsResultsCalled     func(key []byte)
	RevertProcessedTxsResultsCalled   func(txHashes [][]byte, key []byte)
}

PreProcessorExecutionInfoHandlerMock -

func (*PreProcessorExecutionInfoHandlerMock) GetNumOfCrossInterMbsAndTxs

func (ppeihm *PreProcessorExecutionInfoHandlerMock) GetNumOfCrossInterMbsAndTxs() (int, int)

GetNumOfCrossInterMbsAndTxs -

func (*PreProcessorExecutionInfoHandlerMock) InitProcessedTxsResults

func (ppeihm *PreProcessorExecutionInfoHandlerMock) InitProcessedTxsResults(key []byte)

InitProcessedTxsResults -

func (*PreProcessorExecutionInfoHandlerMock) RevertProcessedTxsResults

func (ppeihm *PreProcessorExecutionInfoHandlerMock) RevertProcessedTxsResults(txHashes [][]byte, key []byte)

RevertProcessedTxsResults -

type ProcessDebuggerStub

type ProcessDebuggerStub struct {
	SetLastCommittedBlockRoundCalled func(round uint64)
	CloseCalled                      func() error
}

ProcessDebuggerStub -

func (*ProcessDebuggerStub) Close

func (stub *ProcessDebuggerStub) Close() error

Close -

func (*ProcessDebuggerStub) IsInterfaceNil

func (stub *ProcessDebuggerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*ProcessDebuggerStub) SetLastCommittedBlockRound

func (stub *ProcessDebuggerStub) SetLastCommittedBlockRound(round uint64)

SetLastCommittedBlockRound -

type ProcessStatusHandlerStub

type ProcessStatusHandlerStub struct {
	SetBusyCalled func(reason string)
	SetIdleCalled func()
	IsIdleCalled  func() bool
}

ProcessStatusHandlerStub -

func (*ProcessStatusHandlerStub) IsIdle

func (stub *ProcessStatusHandlerStub) IsIdle() bool

IsIdle -

func (*ProcessStatusHandlerStub) IsInterfaceNil

func (stub *ProcessStatusHandlerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*ProcessStatusHandlerStub) SetBusy

func (stub *ProcessStatusHandlerStub) SetBusy(reason string)

SetBusy -

func (*ProcessStatusHandlerStub) SetIdle

func (stub *ProcessStatusHandlerStub) SetIdle()

SetIdle -

type ProcessedMiniBlocksTrackerStub

type ProcessedMiniBlocksTrackerStub struct {
	SetProcessedMiniBlockInfoCalled            func(metaBlockHash []byte, miniBlockHash []byte, processedMbInfo *processedMb.ProcessedMiniBlockInfo)
	RemoveMetaBlockHashCalled                  func(metaBlockHash []byte)
	RemoveMiniBlockHashCalled                  func(miniBlockHash []byte)
	GetProcessedMiniBlocksInfoCalled           func(metaBlockHash []byte) map[string]*processedMb.ProcessedMiniBlockInfo
	GetProcessedMiniBlockInfoCalled            func(miniBlockHash []byte) (*processedMb.ProcessedMiniBlockInfo, []byte)
	IsMiniBlockFullyProcessedCalled            func(metaBlockHash []byte, miniBlockHash []byte) bool
	ConvertProcessedMiniBlocksMapToSliceCalled func() []bootstrapStorage.MiniBlocksInMeta
	ConvertSliceToProcessedMiniBlocksMapCalled func(miniBlocksInMetaBlocks []bootstrapStorage.MiniBlocksInMeta)
	DisplayProcessedMiniBlocksCalled           func()
}

ProcessedMiniBlocksTrackerStub -

func (*ProcessedMiniBlocksTrackerStub) ConvertProcessedMiniBlocksMapToSlice

func (pmbts *ProcessedMiniBlocksTrackerStub) ConvertProcessedMiniBlocksMapToSlice() []bootstrapStorage.MiniBlocksInMeta

ConvertProcessedMiniBlocksMapToSlice -

func (*ProcessedMiniBlocksTrackerStub) ConvertSliceToProcessedMiniBlocksMap

func (pmbts *ProcessedMiniBlocksTrackerStub) ConvertSliceToProcessedMiniBlocksMap(miniBlocksInMetaBlocks []bootstrapStorage.MiniBlocksInMeta)

ConvertSliceToProcessedMiniBlocksMap -

func (*ProcessedMiniBlocksTrackerStub) DisplayProcessedMiniBlocks

func (pmbts *ProcessedMiniBlocksTrackerStub) DisplayProcessedMiniBlocks()

DisplayProcessedMiniBlocks -

func (*ProcessedMiniBlocksTrackerStub) GetProcessedMiniBlockInfo

func (pmbts *ProcessedMiniBlocksTrackerStub) GetProcessedMiniBlockInfo(miniBlockHash []byte) (*processedMb.ProcessedMiniBlockInfo, []byte)

GetProcessedMiniBlockInfo -

func (*ProcessedMiniBlocksTrackerStub) GetProcessedMiniBlocksInfo

func (pmbts *ProcessedMiniBlocksTrackerStub) GetProcessedMiniBlocksInfo(metaBlockHash []byte) map[string]*processedMb.ProcessedMiniBlockInfo

GetProcessedMiniBlocksInfo -

func (*ProcessedMiniBlocksTrackerStub) IsInterfaceNil

func (pmbts *ProcessedMiniBlocksTrackerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*ProcessedMiniBlocksTrackerStub) IsMiniBlockFullyProcessed

func (pmbts *ProcessedMiniBlocksTrackerStub) IsMiniBlockFullyProcessed(metaBlockHash []byte, miniBlockHash []byte) bool

IsMiniBlockFullyProcessed -

func (*ProcessedMiniBlocksTrackerStub) RemoveMetaBlockHash

func (pmbts *ProcessedMiniBlocksTrackerStub) RemoveMetaBlockHash(metaBlockHash []byte)

RemoveMetaBlockHash -

func (*ProcessedMiniBlocksTrackerStub) RemoveMiniBlockHash

func (pmbts *ProcessedMiniBlocksTrackerStub) RemoveMiniBlockHash(miniBlockHash []byte)

RemoveMiniBlockHash -

func (*ProcessedMiniBlocksTrackerStub) SetProcessedMiniBlockInfo

func (pmbts *ProcessedMiniBlocksTrackerStub) SetProcessedMiniBlockInfo(metaBlockHash []byte, miniBlockHash []byte, processedMbInfo *processedMb.ProcessedMiniBlockInfo)

SetProcessedMiniBlockInfo -

type ProtoMarshalizerMock

type ProtoMarshalizerMock struct {
}

ProtoMarshalizerMock implements marshaling with protobuf

func (*ProtoMarshalizerMock) IsInterfaceNil

func (pmm *ProtoMarshalizerMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*ProtoMarshalizerMock) Marshal

func (pmm *ProtoMarshalizerMock) Marshal(obj interface{}) ([]byte, error)

Marshal does the actual serialization of an object The object to be serialized must implement the gogoProtoObj interface

func (*ProtoMarshalizerMock) Unmarshal

func (pmm *ProtoMarshalizerMock) Unmarshal(obj interface{}, buff []byte) error

Unmarshal does the actual deserialization of an object The object to be deserialized must implement the gogoProtoObj interface

type ProtobufMarshalizerMock

type ProtobufMarshalizerMock struct {
}

ProtobufMarshalizerMock implements marshaling with protobuf

func (*ProtobufMarshalizerMock) IsInterfaceNil

func (x *ProtobufMarshalizerMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*ProtobufMarshalizerMock) Marshal

func (x *ProtobufMarshalizerMock) Marshal(obj interface{}) ([]byte, error)

Marshal does the actual serialization of an object through protobuf

func (*ProtobufMarshalizerMock) Unmarshal

func (x *ProtobufMarshalizerMock) Unmarshal(obj interface{}, buff []byte) error

Unmarshal does the actual deserialization of an object through protobuf

type PubkeyConverterMock

type PubkeyConverterMock struct {
	// contains filtered or unexported fields
}

PubkeyConverterMock -

func NewPubkeyConverterMock

func NewPubkeyConverterMock(addressLen int) *PubkeyConverterMock

NewPubkeyConverterMock -

func (*PubkeyConverterMock) Decode

func (pcm *PubkeyConverterMock) Decode(humanReadable string) ([]byte, error)

Decode -

func (*PubkeyConverterMock) Encode

func (pcm *PubkeyConverterMock) Encode(pkBytes []byte) (string, error)

Encode -

func (*PubkeyConverterMock) EncodeSlice added in v1.6.0

func (pcm *PubkeyConverterMock) EncodeSlice(pkBytesSlice [][]byte) ([]string, error)

EncodeSlice -

func (*PubkeyConverterMock) IsInterfaceNil

func (pcm *PubkeyConverterMock) IsInterfaceNil() bool

IsInterfaceNil -

func (*PubkeyConverterMock) Len

func (pcm *PubkeyConverterMock) Len() int

Len -

func (*PubkeyConverterMock) SilentEncode added in v1.6.0

func (pcm *PubkeyConverterMock) SilentEncode(pkBytes []byte, log core.Logger) string

SilentEncode -

type PubkeyConverterStub added in v1.6.0

type PubkeyConverterStub struct {
	LenCalled          func() int
	DecodeCalled       func(humanReadable string) ([]byte, error)
	EncodeCalled       func(pkBytes []byte) (string, error)
	SilentEncodeCalled func(pkBytes []byte, log core.Logger) string
	EncodeSliceCalled  func(pkBytesSlice [][]byte) ([]string, error)
}

PubkeyConverterStub -

func (*PubkeyConverterStub) Decode added in v1.6.0

func (pcs *PubkeyConverterStub) Decode(humanReadable string) ([]byte, error)

Decode -

func (*PubkeyConverterStub) Encode added in v1.6.0

func (pcs *PubkeyConverterStub) Encode(pkBytes []byte) (string, error)

Encode -

func (*PubkeyConverterStub) EncodeSlice added in v1.6.0

func (pcs *PubkeyConverterStub) EncodeSlice(pkBytesSlice [][]byte) ([]string, error)

EncodeSlice -

func (*PubkeyConverterStub) IsInterfaceNil added in v1.6.0

func (pcs *PubkeyConverterStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*PubkeyConverterStub) Len added in v1.6.0

func (pcs *PubkeyConverterStub) Len() int

Len -

func (*PubkeyConverterStub) SilentEncode added in v1.6.0

func (pcs *PubkeyConverterStub) SilentEncode(pkBytes []byte, log core.Logger) string

SilentEncode -

type RaterMock

type RaterMock struct {
	StartRating           uint32
	MinRating             uint32
	MaxRating             uint32
	Chance                uint32
	IncreaseProposer      int32
	DecreaseProposer      int32
	IncreaseValidator     int32
	DecreaseValidator     int32
	MetaIncreaseProposer  int32
	MetaDecreaseProposer  int32
	MetaIncreaseValidator int32
	MetaDecreaseValidator int32

	GetRatingCalled                func(string) uint32
	GetStartRatingCalled           func() uint32
	GetSignedBlocksThresholdCalled func() float32
	ComputeIncreaseProposerCalled  func(shardId uint32, rating uint32) uint32
	ComputeDecreaseProposerCalled  func(shardId uint32, rating uint32, consecutiveMissedBlocks uint32) uint32
	RevertIncreaseProposerCalled   func(shardId uint32, rating uint32, nrReverts uint32) uint32
	RevertIncreaseValidatorCalled  func(shardId uint32, rating uint32, nrReverts uint32) uint32
	ComputeIncreaseValidatorCalled func(shardId uint32, rating uint32) uint32
	ComputeDecreaseValidatorCalled func(shardId uint32, rating uint32) uint32
	GetChancesCalled               func(val uint32) uint32
}

RaterMock -

func GetNewMockRater

func GetNewMockRater() *RaterMock

GetNewMockRater -

func (*RaterMock) ComputeDecreaseProposer

func (rm *RaterMock) ComputeDecreaseProposer(shardId uint32, currentRating uint32, consecutiveMisses uint32) uint32

ComputeDecreaseProposer -

func (*RaterMock) ComputeDecreaseValidator

func (rm *RaterMock) ComputeDecreaseValidator(shardId uint32, currentRating uint32) uint32

ComputeDecreaseValidator -

func (*RaterMock) ComputeIncreaseProposer

func (rm *RaterMock) ComputeIncreaseProposer(shardId uint32, currentRating uint32) uint32

ComputeIncreaseProposer -

func (*RaterMock) ComputeIncreaseValidator

func (rm *RaterMock) ComputeIncreaseValidator(shardId uint32, currentRating uint32) uint32

ComputeIncreaseValidator -

func (*RaterMock) GetChance

func (rm *RaterMock) GetChance(rating uint32) uint32

GetChance -

func (*RaterMock) GetRating

func (rm *RaterMock) GetRating(pk string) uint32

GetRating -

func (*RaterMock) GetSignedBlocksThreshold

func (rm *RaterMock) GetSignedBlocksThreshold() float32

GetSignedBlocksThreshold -

func (*RaterMock) GetStartRating

func (rm *RaterMock) GetStartRating() uint32

GetStartRating -

func (*RaterMock) IsInterfaceNil

func (rm *RaterMock) IsInterfaceNil() bool

IsInterfaceNil -

func (*RaterMock) RevertIncreaseValidator

func (rm *RaterMock) RevertIncreaseValidator(shardId uint32, currentRating uint32, nrReverts uint32) uint32

RevertIncreaseValidator -

type RatingsInfoMock

type RatingsInfoMock struct {
	StartRatingProperty           uint32
	MaxRatingProperty             uint32
	MinRatingProperty             uint32
	SignedBlocksThresholdProperty float32
	MetaRatingsStepDataProperty   process.RatingsStepHandler
	ShardRatingsStepDataProperty  process.RatingsStepHandler
	SelectionChancesProperty      []process.SelectionChance
}

RatingsInfoMock -

func (*RatingsInfoMock) IsInterfaceNil

func (rd *RatingsInfoMock) IsInterfaceNil() bool

IsInterfaceNil -

func (*RatingsInfoMock) MaxRating

func (rd *RatingsInfoMock) MaxRating() uint32

MaxRating -

func (*RatingsInfoMock) MetaChainRatingsStepHandler

func (rd *RatingsInfoMock) MetaChainRatingsStepHandler() process.RatingsStepHandler

MetaChainRatingsStepHandler -

func (*RatingsInfoMock) MinRating

func (rd *RatingsInfoMock) MinRating() uint32

MinRating -

func (*RatingsInfoMock) SelectionChances

func (rd *RatingsInfoMock) SelectionChances() []process.SelectionChance

SelectionChances -

func (*RatingsInfoMock) ShardChainRatingsStepHandler

func (rd *RatingsInfoMock) ShardChainRatingsStepHandler() process.RatingsStepHandler

ShardChainRatingsStepHandler -

func (*RatingsInfoMock) SignedBlocksThreshold

func (rd *RatingsInfoMock) SignedBlocksThreshold() float32

SignedBlocksThreshold -

func (*RatingsInfoMock) StartRating

func (rd *RatingsInfoMock) StartRating() uint32

StartRating -

type ReceiptsRepositoryStub

type ReceiptsRepositoryStub struct {
	SaveReceiptsCalled func(holder common.ReceiptsHolder, header data.HeaderHandler, headerHash []byte) error
	LoadReceiptsCalled func(header data.HeaderHandler, headerHash []byte) (common.ReceiptsHolder, error)
}

ReceiptsRepositoryStub -

func (*ReceiptsRepositoryStub) IsInterfaceNil

func (stub *ReceiptsRepositoryStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*ReceiptsRepositoryStub) LoadReceipts

func (stub *ReceiptsRepositoryStub) LoadReceipts(header data.HeaderHandler, headerHash []byte) (common.ReceiptsHolder, error)

LoadReceipts -

func (*ReceiptsRepositoryStub) SaveReceipts

func (stub *ReceiptsRepositoryStub) SaveReceipts(holder common.ReceiptsHolder, header data.HeaderHandler, headerHash []byte) error

SaveReceipts -

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, hashes [][]byte, topic string)
	RequestStartOfEpochMetaBlockCalled       func(epoch uint32)
	SetNumPeersToQueryCalled                 func(key string, intra int, cross int) error
	GetNumPeersToQueryCalled                 func(key string) (int, int, error)
	RequestTrieNodeCalled                    func(requestHash []byte, topic string, chunkIndex uint32)
	CreateTrieNodeIdentifierCalled           func(requestHash []byte, chunkIndex uint32) []byte
	RequestPeerAuthenticationsByHashesCalled func(destShardID uint32, hashes [][]byte)
	RequestValidatorInfoCalled               func(hash []byte)
	RequestValidatorsInfoCalled              func(hashes [][]byte)
}

RequestHandlerStub -

func (*RequestHandlerStub) CreateTrieNodeIdentifier

func (rhs *RequestHandlerStub) CreateTrieNodeIdentifier(requestHash []byte, chunkIndex uint32) []byte

CreateTrieNodeIdentifier -

func (*RequestHandlerStub) GetNumPeersToQuery

func (rhs *RequestHandlerStub) GetNumPeersToQuery(key string) (int, int, error)

GetNumPeersToQuery -

func (*RequestHandlerStub) IsInterfaceNil

func (rhs *RequestHandlerStub) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*RequestHandlerStub) RequestInterval

func (rhs *RequestHandlerStub) RequestInterval() time.Duration

RequestInterval -

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) RequestPeerAuthenticationsByHashes

func (rhs *RequestHandlerStub) RequestPeerAuthenticationsByHashes(destShardID uint32, hashes [][]byte)

RequestPeerAuthenticationsByHashes -

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) RequestTrieNode

func (rhs *RequestHandlerStub) RequestTrieNode(requestHash []byte, topic string, chunkIndex uint32)

RequestTrieNode -

func (*RequestHandlerStub) RequestTrieNodes

func (rhs *RequestHandlerStub) RequestTrieNodes(destShardID uint32, hashes [][]byte, topic string)

RequestTrieNodes -

func (*RequestHandlerStub) RequestUnsignedTransactions

func (rhs *RequestHandlerStub) RequestUnsignedTransactions(destShardID uint32, txHashes [][]byte)

RequestUnsignedTransactions -

func (*RequestHandlerStub) RequestValidatorInfo

func (rhs *RequestHandlerStub) RequestValidatorInfo(hash []byte)

RequestValidatorInfo -

func (*RequestHandlerStub) RequestValidatorsInfo

func (rhs *RequestHandlerStub) RequestValidatorsInfo(hashes [][]byte)

RequestValidatorsInfo -

func (*RequestHandlerStub) SetEpoch

func (rhs *RequestHandlerStub) SetEpoch(_ uint32)

SetEpoch -

func (*RequestHandlerStub) SetNumPeersToQuery

func (rhs *RequestHandlerStub) SetNumPeersToQuery(key string, intra int, cross int) error

SetNumPeersToQuery -

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 -

func (*RequestedItemsHandlerStub) Sweep

func (rihs *RequestedItemsHandlerStub) Sweep()

Sweep -

type RewardTxProcessorMock

type RewardTxProcessorMock struct {
	ProcessRewardTransactionCalled func(rTx *rewardTx.RewardTx) error
}

RewardTxProcessorMock -

func (*RewardTxProcessorMock) IsInterfaceNil

func (scrp *RewardTxProcessorMock) IsInterfaceNil() bool

IsInterfaceNil -

func (*RewardTxProcessorMock) ProcessRewardTransaction

func (scrp *RewardTxProcessorMock) ProcessRewardTransaction(rTx *rewardTx.RewardTx) error

ProcessRewardTransaction -

type RewardsCreatorStub added in v1.7.0

type RewardsCreatorStub struct {
	CreateRewardsMiniBlocksCalled func(
		metaBlock data.MetaHeaderHandler, validatorsInfo state.ShardValidatorsInfoMapHandler, computedEconomics *block.Economics,
	) (block.MiniBlockSlice, error)
	VerifyRewardsMiniBlocksCalled func(
		metaBlock data.MetaHeaderHandler, validatorsInfo state.ShardValidatorsInfoMapHandler, computedEconomics *block.Economics,
	) error
	GetProtocolSustainabilityRewardsCalled func() *big.Int
	GetLocalTxCacheCalled                  func() epochStart.TransactionCacher
	CreateMarshalledDataCalled             func(body *block.Body) map[string][][]byte
	GetRewardsTxsCalled                    func(body *block.Body) map[string]data.TransactionHandler
	SaveBlockDataToStorageCalled           func(metaBlock data.MetaHeaderHandler, body *block.Body)
	DeleteBlockDataFromStorageCalled       func(metaBlock data.MetaHeaderHandler, body *block.Body)
	RemoveBlockDataFromPoolsCalled         func(metaBlock data.MetaHeaderHandler, body *block.Body)
}

RewardsCreatorStub -

func (*RewardsCreatorStub) CreateMarshalledData added in v1.7.0

func (rcs *RewardsCreatorStub) CreateMarshalledData(body *block.Body) map[string][][]byte

CreateMarshalledData -

func (*RewardsCreatorStub) CreateRewardsMiniBlocks added in v1.7.0

func (rcs *RewardsCreatorStub) CreateRewardsMiniBlocks(
	metaBlock data.MetaHeaderHandler,
	validatorsInfo state.ShardValidatorsInfoMapHandler,
	computedEconomics *block.Economics,
) (block.MiniBlockSlice, error)

CreateRewardsMiniBlocks -

func (*RewardsCreatorStub) DeleteBlockDataFromStorage added in v1.7.0

func (rcs *RewardsCreatorStub) DeleteBlockDataFromStorage(metaBlock data.MetaHeaderHandler, body *block.Body)

DeleteBlockDataFromStorage -

func (*RewardsCreatorStub) GetLocalTxCache added in v1.7.0

func (rcs *RewardsCreatorStub) GetLocalTxCache() epochStart.TransactionCacher

GetLocalTxCache -

func (*RewardsCreatorStub) GetProtocolSustainabilityRewards added in v1.7.0

func (rcs *RewardsCreatorStub) GetProtocolSustainabilityRewards() *big.Int

GetProtocolSustainabilityRewards -

func (*RewardsCreatorStub) GetRewardsTxs added in v1.7.0

func (rcs *RewardsCreatorStub) GetRewardsTxs(body *block.Body) map[string]data.TransactionHandler

GetRewardsTxs -

func (*RewardsCreatorStub) IsInterfaceNil added in v1.7.0

func (rcs *RewardsCreatorStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*RewardsCreatorStub) RemoveBlockDataFromPools added in v1.7.0

func (rcs *RewardsCreatorStub) RemoveBlockDataFromPools(metaBlock data.MetaHeaderHandler, body *block.Body)

RemoveBlockDataFromPools -

func (*RewardsCreatorStub) SaveBlockDataToStorage added in v1.7.0

func (rcs *RewardsCreatorStub) SaveBlockDataToStorage(metaBlock data.MetaHeaderHandler, body *block.Body)

SaveBlockDataToStorage -

func (*RewardsCreatorStub) VerifyRewardsMiniBlocks added in v1.7.0

func (rcs *RewardsCreatorStub) VerifyRewardsMiniBlocks(
	metaBlock data.MetaHeaderHandler,
	validatorsInfo state.ShardValidatorsInfoMapHandler,
	computedEconomics *block.Economics,
) error

VerifyRewardsMiniBlocks -

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
	IncrementIndexCalled func()
	// contains filtered or unexported fields
}

RoundHandlerMock -

func (*RoundHandlerMock) BeforeGenesis

func (rndm *RoundHandlerMock) BeforeGenesis() bool

BeforeGenesis -

func (*RoundHandlerMock) IncrementIndex added in v1.7.1

func (rndm *RoundHandlerMock) IncrementIndex()

IncrementIndex -

func (*RoundHandlerMock) Index

func (rndm *RoundHandlerMock) Index() int64

Index -

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 SCProcessorMock

type SCProcessorMock struct {
	ComputeTransactionTypeCalled           func(tx data.TransactionHandler) (process.TransactionType, process.TransactionType)
	ExecuteSmartContractTransactionCalled  func(tx data.TransactionHandler, acntSrc, acntDst state.UserAccountHandler) (vmcommon.ReturnCode, error)
	ExecuteBuiltInFunctionCalled           func(tx data.TransactionHandler, acntSrc, acntDst state.UserAccountHandler) (vmcommon.ReturnCode, error)
	DeploySmartContractCalled              func(tx data.TransactionHandler, acntSrc state.UserAccountHandler) (vmcommon.ReturnCode, error)
	ProcessSmartContractResultCalled       func(scr *smartContractResult.SmartContractResult) (vmcommon.ReturnCode, error)
	ProcessIfErrorCalled                   func(acntSnd state.UserAccountHandler, txHash []byte, tx data.TransactionHandler, returnCode string, returnMessage []byte, snapshot int, gasLocked uint64) error
	IsPayableCalled                        func(sndAddress, recvAddress []byte) (bool, error)
	CheckBuiltinFunctionIsExecutableCalled func(expectedBuiltinFunction string, tx data.TransactionHandler) error
}

SCProcessorMock -

func (*SCProcessorMock) CheckBuiltinFunctionIsExecutable added in v1.5.3

func (sc *SCProcessorMock) CheckBuiltinFunctionIsExecutable(expectedBuiltinFunction string, tx data.TransactionHandler) error

CheckBuiltinFunctionIsExecutable -

func (*SCProcessorMock) ComputeTransactionType

ComputeTransactionType -

func (*SCProcessorMock) DeploySmartContract

func (sc *SCProcessorMock) DeploySmartContract(tx data.TransactionHandler, acntSrc state.UserAccountHandler) (vmcommon.ReturnCode, error)

DeploySmartContract -

func (*SCProcessorMock) ExecuteBuiltInFunction

func (sc *SCProcessorMock) ExecuteBuiltInFunction(
	tx data.TransactionHandler,
	acntSrc, acntDst state.UserAccountHandler,
) (vmcommon.ReturnCode, error)

ExecuteBuiltInFunction -

func (*SCProcessorMock) ExecuteSmartContractTransaction

func (sc *SCProcessorMock) ExecuteSmartContractTransaction(
	tx data.TransactionHandler,
	acntSrc, acntDst state.UserAccountHandler,
) (vmcommon.ReturnCode, error)

ExecuteSmartContractTransaction -

func (*SCProcessorMock) IsInterfaceNil

func (sc *SCProcessorMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*SCProcessorMock) IsPayable

func (sc *SCProcessorMock) IsPayable(sndAddress []byte, recvAddress []byte) (bool, error)

IsPayable -

func (*SCProcessorMock) ProcessIfError

func (sc *SCProcessorMock) ProcessIfError(
	acntSnd state.UserAccountHandler,
	txHash []byte,
	tx data.TransactionHandler,
	returnCode string,
	returnMessage []byte,
	snapshot int,
	gasLocked uint64,
) error

ProcessIfError -

func (*SCProcessorMock) ProcessSmartContractResult

func (sc *SCProcessorMock) ProcessSmartContractResult(scr *smartContractResult.SmartContractResult) (vmcommon.ReturnCode, error)

ProcessSmartContractResult -

type ScheduledTxsExecutionStub

type ScheduledTxsExecutionStub struct {
	InitCalled                                   func()
	AddScheduledTxCalled                         func([]byte, data.TransactionHandler) bool
	AddScheduledMiniBlocksCalled                 func(miniBlocks block.MiniBlockSlice)
	ExecuteCalled                                func([]byte) error
	ExecuteAllCalled                             func(func() time.Duration) error
	GetScheduledIntermediateTxsCalled            func() map[block.Type][]data.TransactionHandler
	GetScheduledMiniBlocksCalled                 func() block.MiniBlockSlice
	SetScheduledInfoCalled                       func(scheduledInfo *process.ScheduledInfo)
	GetScheduledRootHashForHeaderCalled          func(headerHash []byte) ([]byte, error)
	GetScheduledRootHashForHeaderWithEpochCalled func(headerHash []byte, epoch uint32) ([]byte, error)
	RollBackToBlockCalled                        func(headerHash []byte) error
	GetScheduledRootHashCalled                   func() []byte
	GetScheduledGasAndFeesCalled                 func() scheduled.GasAndFees
	SetScheduledRootHashCalled                   func([]byte)
	SetScheduledGasAndFeesCalled                 func(gasAndFees scheduled.GasAndFees)
	SetTransactionProcessorCalled                func(process.TransactionProcessor)
	SetTransactionCoordinatorCalled              func(process.TransactionCoordinator)
	HaveScheduledTxsCalled                       func() bool
	SaveStateIfNeededCalled                      func(headerHash []byte)
	SaveStateCalled                              func(headerHash []byte, scheduledInfo *process.ScheduledInfo)
	LoadStateCalled                              func(headerHash []byte)
	IsScheduledTxCalled                          func([]byte) bool
	IsMiniBlockExecutedCalled                    func([]byte) bool
}

ScheduledTxsExecutionStub -

func (*ScheduledTxsExecutionStub) AddScheduledMiniBlocks

func (stes *ScheduledTxsExecutionStub) AddScheduledMiniBlocks(miniBlocks block.MiniBlockSlice)

AddScheduledMiniBlocks -

func (*ScheduledTxsExecutionStub) AddScheduledTx

func (stes *ScheduledTxsExecutionStub) AddScheduledTx(txHash []byte, tx data.TransactionHandler) bool

AddScheduledTx -

func (*ScheduledTxsExecutionStub) Execute

func (stes *ScheduledTxsExecutionStub) Execute(txHash []byte) error

Execute -

func (*ScheduledTxsExecutionStub) ExecuteAll

func (stes *ScheduledTxsExecutionStub) ExecuteAll(haveTime func() time.Duration) error

ExecuteAll -

func (*ScheduledTxsExecutionStub) GetScheduledGasAndFees

func (stes *ScheduledTxsExecutionStub) GetScheduledGasAndFees() scheduled.GasAndFees

GetScheduledGasAndFees returns the scheduled SC calls gas and fees

func (*ScheduledTxsExecutionStub) GetScheduledIntermediateTxs

func (stes *ScheduledTxsExecutionStub) GetScheduledIntermediateTxs() map[block.Type][]data.TransactionHandler

GetScheduledIntermediateTxs -

func (*ScheduledTxsExecutionStub) GetScheduledMiniBlocks

func (stes *ScheduledTxsExecutionStub) GetScheduledMiniBlocks() block.MiniBlockSlice

GetScheduledMiniBlocks -

func (*ScheduledTxsExecutionStub) GetScheduledRootHash

func (stes *ScheduledTxsExecutionStub) GetScheduledRootHash() []byte

GetScheduledRootHash -

func (*ScheduledTxsExecutionStub) GetScheduledRootHashForHeader

func (stes *ScheduledTxsExecutionStub) GetScheduledRootHashForHeader(headerHash []byte) ([]byte, error)

GetScheduledRootHashForHeader -

func (*ScheduledTxsExecutionStub) GetScheduledRootHashForHeaderWithEpoch

func (stes *ScheduledTxsExecutionStub) GetScheduledRootHashForHeaderWithEpoch(headerHash []byte, epoch uint32) ([]byte, error)

GetScheduledRootHashForHeaderWithEpoch -

func (*ScheduledTxsExecutionStub) Init

func (stes *ScheduledTxsExecutionStub) Init()

Init -

func (*ScheduledTxsExecutionStub) IsInterfaceNil

func (stes *ScheduledTxsExecutionStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*ScheduledTxsExecutionStub) IsMiniBlockExecuted

func (stes *ScheduledTxsExecutionStub) IsMiniBlockExecuted(mbHash []byte) bool

IsMiniBlockExecuted -

func (*ScheduledTxsExecutionStub) IsScheduledTx

func (stes *ScheduledTxsExecutionStub) IsScheduledTx(txHash []byte) bool

IsScheduledTx -

func (*ScheduledTxsExecutionStub) RollBackToBlock

func (stes *ScheduledTxsExecutionStub) RollBackToBlock(headerHash []byte) error

RollBackToBlock -

func (*ScheduledTxsExecutionStub) SaveState

func (stes *ScheduledTxsExecutionStub) SaveState(
	headerHash []byte,
	scheduledInfo *process.ScheduledInfo,
)

SaveState -

func (*ScheduledTxsExecutionStub) SaveStateIfNeeded

func (stes *ScheduledTxsExecutionStub) SaveStateIfNeeded(headerHash []byte)

SaveStateIfNeeded -

func (*ScheduledTxsExecutionStub) SetScheduledGasAndFees

func (stes *ScheduledTxsExecutionStub) SetScheduledGasAndFees(gasAndFees scheduled.GasAndFees)

SetScheduledGasAndFees -

func (*ScheduledTxsExecutionStub) SetScheduledInfo

func (stes *ScheduledTxsExecutionStub) SetScheduledInfo(scheduledInfo *process.ScheduledInfo)

SetScheduledInfo -

func (*ScheduledTxsExecutionStub) SetScheduledRootHash

func (stes *ScheduledTxsExecutionStub) SetScheduledRootHash(rootHash []byte)

SetScheduledRootHash -

func (*ScheduledTxsExecutionStub) SetTransactionCoordinator

func (stes *ScheduledTxsExecutionStub) SetTransactionCoordinator(txCoordinator process.TransactionCoordinator)

SetTransactionCoordinator -

func (*ScheduledTxsExecutionStub) SetTransactionProcessor

func (stes *ScheduledTxsExecutionStub) SetTransactionProcessor(txProcessor process.TransactionProcessor)

SetTransactionProcessor -

type SentSignatureTrackerStub added in v1.6.14

type SentSignatureTrackerStub struct {
	StartRoundCalled                         func()
	SignatureSentCalled                      func(pkBytes []byte)
	ResetCountersForManagedBlockSignerCalled func(signerPk []byte)
}

SentSignatureTrackerStub -

func (*SentSignatureTrackerStub) IsInterfaceNil added in v1.6.14

func (stub *SentSignatureTrackerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*SentSignatureTrackerStub) ResetCountersForManagedBlockSigner added in v1.6.14

func (stub *SentSignatureTrackerStub) ResetCountersForManagedBlockSigner(signerPk []byte)

ResetCountersForManagedBlockSigner -

func (*SentSignatureTrackerStub) SignatureSent added in v1.6.14

func (stub *SentSignatureTrackerStub) SignatureSent(pkBytes []byte)

SignatureSent -

func (*SentSignatureTrackerStub) StartRound added in v1.6.14

func (stub *SentSignatureTrackerStub) StartRound()

StartRound -

type ShardedDataCacheNotifierMock

type ShardedDataCacheNotifierMock struct {
	// contains filtered or unexported fields
}

ShardedDataCacheNotifierMock -

func NewShardedDataCacheNotifierMock

func NewShardedDataCacheNotifierMock() *ShardedDataCacheNotifierMock

NewShardedDataCacheNotifierMock -

func (*ShardedDataCacheNotifierMock) AddData

func (mock *ShardedDataCacheNotifierMock) AddData(key []byte, data interface{}, sizeInBytes int, cacheId string)

AddData -

func (*ShardedDataCacheNotifierMock) Clear

func (mock *ShardedDataCacheNotifierMock) Clear()

Clear -

func (*ShardedDataCacheNotifierMock) ClearShardStore

func (mock *ShardedDataCacheNotifierMock) ClearShardStore(cacheId string)

ClearShardStore -

func (*ShardedDataCacheNotifierMock) GetCounts

GetCounts -

func (*ShardedDataCacheNotifierMock) ImmunizeSetOfDataAgainstEviction

func (mock *ShardedDataCacheNotifierMock) ImmunizeSetOfDataAgainstEviction(_ [][]byte, _ string)

ImmunizeSetOfDataAgainstEviction -

func (*ShardedDataCacheNotifierMock) IsInterfaceNil

func (mock *ShardedDataCacheNotifierMock) IsInterfaceNil() bool

IsInterfaceNil -

func (*ShardedDataCacheNotifierMock) Keys

func (mock *ShardedDataCacheNotifierMock) Keys() [][]byte

Keys -

func (*ShardedDataCacheNotifierMock) MergeShardStores

func (mock *ShardedDataCacheNotifierMock) MergeShardStores(_, _ string)

MergeShardStores -

func (*ShardedDataCacheNotifierMock) RegisterOnAdded

func (mock *ShardedDataCacheNotifierMock) RegisterOnAdded(_ func(key []byte, value interface{}))

RegisterOnAdded -

func (*ShardedDataCacheNotifierMock) RemoveData

func (mock *ShardedDataCacheNotifierMock) RemoveData(key []byte, cacheId string)

RemoveData -

func (*ShardedDataCacheNotifierMock) RemoveDataFromAllShards

func (mock *ShardedDataCacheNotifierMock) RemoveDataFromAllShards(key []byte)

RemoveDataFromAllShards -

func (*ShardedDataCacheNotifierMock) RemoveSetOfDataFromPool

func (mock *ShardedDataCacheNotifierMock) RemoveSetOfDataFromPool(keys [][]byte, cacheId string)

RemoveSetOfDataFromPool -

func (*ShardedDataCacheNotifierMock) SearchFirstData

func (mock *ShardedDataCacheNotifierMock) SearchFirstData(key []byte) (interface{}, bool)

SearchFirstData -

func (*ShardedDataCacheNotifierMock) ShardDataStore

func (mock *ShardedDataCacheNotifierMock) ShardDataStore(cacheId string) (c storage.Cacher)

ShardDataStore -

type ShardedDataStub

type ShardedDataStub struct {
	RegisterOnAddedCalled                  func(func(key []byte, value interface{}))
	ShardDataStoreCalled                   func(cacheID string) storage.Cacher
	AddDataCalled                          func(key []byte, data interface{}, sizeInBytes int, 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)
	ImmunizeSetOfDataAgainstEvictionCalled func(keys [][]byte, cacheID string)
	CreateShardStoreCalled                 func(destCacheID string)
	GetCountsCalled                        func() counting.CountsWithSize
	KeysCalled                             func() [][]byte
}

ShardedDataStub -

func NewShardedDataStub

func NewShardedDataStub() *ShardedDataStub

NewShardedDataStub -

func (*ShardedDataStub) AddData

func (sd *ShardedDataStub) AddData(key []byte, data interface{}, sizeInBytes int, cacheID string)

AddData -

func (*ShardedDataStub) Clear

func (sd *ShardedDataStub) Clear()

Clear -

func (*ShardedDataStub) ClearShardStore

func (sd *ShardedDataStub) ClearShardStore(cacheID string)

ClearShardStore -

func (*ShardedDataStub) GetCounts

func (sd *ShardedDataStub) GetCounts() counting.CountsWithSize

GetCounts -

func (*ShardedDataStub) ImmunizeSetOfDataAgainstEviction

func (sd *ShardedDataStub) ImmunizeSetOfDataAgainstEviction(keys [][]byte, cacheID string)

ImmunizeSetOfDataAgainstEviction -

func (*ShardedDataStub) IsInterfaceNil

func (sd *ShardedDataStub) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*ShardedDataStub) Keys

func (sd *ShardedDataStub) Keys() [][]byte

Keys -

func (*ShardedDataStub) MergeShardStores

func (sd *ShardedDataStub) MergeShardStores(sourceCacheID, destCacheID string)

MergeShardStores -

func (*ShardedDataStub) RegisterOnAdded

func (sd *ShardedDataStub) RegisterOnAdded(handler func(key []byte, value interface{}))

RegisterOnAdded -

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) storage.Cacher

ShardDataStore -

type ShardsCoordinatorMock

type ShardsCoordinatorMock struct {
	NoShards        uint32
	CurrentShard    uint32
	ComputeIdCalled func(address []byte) uint32
	SelfIDCalled    func() uint32
}

ShardsCoordinatorMock -

func NewMultiShardsCoordinatorMock

func NewMultiShardsCoordinatorMock(numShards uint32) *ShardsCoordinatorMock

NewMultiShardsCoordinatorMock -

func (*ShardsCoordinatorMock) CommunicationIdentifier

func (scm *ShardsCoordinatorMock) CommunicationIdentifier(destShardID uint32) string

CommunicationIdentifier returns the identifier between current shard ID and destination shard ID identifier is generated such as the first shard from identifier is always smaller than the last

func (*ShardsCoordinatorMock) ComputeId

func (scm *ShardsCoordinatorMock) ComputeId(address []byte) uint32

ComputeId -

func (*ShardsCoordinatorMock) IsInterfaceNil

func (scm *ShardsCoordinatorMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*ShardsCoordinatorMock) NumberOfShards

func (scm *ShardsCoordinatorMock) NumberOfShards() uint32

NumberOfShards -

func (*ShardsCoordinatorMock) SameShard

func (scm *ShardsCoordinatorMock) SameShard(_, _ []byte) bool

SameShard -

func (*ShardsCoordinatorMock) SelfId

func (scm *ShardsCoordinatorMock) SelfId() uint32

SelfId -

func (*ShardsCoordinatorMock) SetNoShards

func (scm *ShardsCoordinatorMock) SetNoShards(noShards uint32)

SetNoShards -

func (*ShardsCoordinatorMock) SetSelfId

func (scm *ShardsCoordinatorMock) SetSelfId(_ uint32) error

SetSelfId -

type ShuffleOutCloserStub added in v1.6.0

type ShuffleOutCloserStub struct {
	EndOfProcessingHandlerCalled func(event endProcess.ArgEndProcess) error
	CloseCalled                  func() error
}

ShuffleOutCloserStub -

func (*ShuffleOutCloserStub) Close added in v1.6.0

func (stub *ShuffleOutCloserStub) Close() error

Close -

func (*ShuffleOutCloserStub) EndOfProcessingHandler added in v1.6.0

func (stub *ShuffleOutCloserStub) EndOfProcessingHandler(event endProcess.ArgEndProcess) error

EndOfProcessingHandler -

func (*ShuffleOutCloserStub) IsInterfaceNil added in v1.6.0

func (stub *ShuffleOutCloserStub) IsInterfaceNil() bool

IsInterfaceNil -

type SimpleNFTStorageHandlerStub

type SimpleNFTStorageHandlerStub struct {
	GetESDTNFTTokenOnDestinationCalled   func(accnt vmcommon.UserAccountHandler, esdtTokenKey []byte, nonce uint64) (*esdt.ESDigitalToken, bool, error)
	SaveNFTMetaDataToSystemAccountCalled func(tx data.TransactionHandler) error
}

SimpleNFTStorageHandlerStub -

func (*SimpleNFTStorageHandlerStub) GetESDTNFTTokenOnDestination

func (s *SimpleNFTStorageHandlerStub) GetESDTNFTTokenOnDestination(accnt vmcommon.UserAccountHandler, esdtTokenKey []byte, nonce uint64) (*esdt.ESDigitalToken, bool, error)

GetESDTNFTTokenOnDestination -

func (*SimpleNFTStorageHandlerStub) IsInterfaceNil

func (s *SimpleNFTStorageHandlerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*SimpleNFTStorageHandlerStub) SaveNFTMetaDataToSystemAccount

func (s *SimpleNFTStorageHandlerStub) SaveNFTMetaDataToSystemAccount(tx data.TransactionHandler) error

SaveNFTMetaDataToSystemAccount -

type SizeSyncStatisticsHandlerStub

type SizeSyncStatisticsHandlerStub struct {
	AddNumBytesReceivedCalled func(bytes uint64)
	AddProcessingTimeCalled   func(duration time.Duration)
	IncrementIterationCalled  func()
	ProcessingTimeCalled      func() time.Duration
	ResetCalled               func()
	AddNumProcessedCalled     func(value int)
	AddNumLargeCalled         func(value int)
	SetNumMissingCalled       func(rootHash []byte, value int)
	NumBytesReceivedField     uint64
	NumTriesField             int
	NumIterationsField        int
	NumProcessedField         int
	NumLargeField             int
	NumMissingField           int
}

SizeSyncStatisticsHandlerStub -

func (*SizeSyncStatisticsHandlerStub) AddNumBytesReceived

func (stub *SizeSyncStatisticsHandlerStub) AddNumBytesReceived(bytes uint64)

AddNumBytesReceived -

func (*SizeSyncStatisticsHandlerStub) AddNumLarge

func (stub *SizeSyncStatisticsHandlerStub) AddNumLarge(value int)

AddNumLarge -

func (*SizeSyncStatisticsHandlerStub) AddNumProcessed

func (stub *SizeSyncStatisticsHandlerStub) AddNumProcessed(value int)

AddNumProcessed -

func (*SizeSyncStatisticsHandlerStub) AddProcessingTime

func (stub *SizeSyncStatisticsHandlerStub) AddProcessingTime(duration time.Duration)

AddProcessingTime -

func (*SizeSyncStatisticsHandlerStub) IncrementIteration

func (stub *SizeSyncStatisticsHandlerStub) IncrementIteration()

IncrementIteration -

func (*SizeSyncStatisticsHandlerStub) IsInterfaceNil

func (stub *SizeSyncStatisticsHandlerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*SizeSyncStatisticsHandlerStub) NumBytesReceived

func (stub *SizeSyncStatisticsHandlerStub) NumBytesReceived() uint64

NumBytesReceived -

func (*SizeSyncStatisticsHandlerStub) NumIterations

func (stub *SizeSyncStatisticsHandlerStub) NumIterations() int

NumIterations -

func (*SizeSyncStatisticsHandlerStub) NumLarge

func (stub *SizeSyncStatisticsHandlerStub) NumLarge() int

NumLarge -

func (*SizeSyncStatisticsHandlerStub) NumMissing

func (stub *SizeSyncStatisticsHandlerStub) NumMissing() int

NumMissing -

func (*SizeSyncStatisticsHandlerStub) NumProcessed

func (stub *SizeSyncStatisticsHandlerStub) NumProcessed() int

NumProcessed -

func (*SizeSyncStatisticsHandlerStub) NumTries

func (stub *SizeSyncStatisticsHandlerStub) NumTries() int

NumTries -

func (*SizeSyncStatisticsHandlerStub) ProcessingTime

func (stub *SizeSyncStatisticsHandlerStub) ProcessingTime() time.Duration

ProcessingTime -

func (*SizeSyncStatisticsHandlerStub) Reset

func (stub *SizeSyncStatisticsHandlerStub) Reset()

Reset -

func (*SizeSyncStatisticsHandlerStub) SetNumMissing

func (stub *SizeSyncStatisticsHandlerStub) SetNumMissing(rootHash []byte, value int)

SetNumMissing -

type SmartContractResultsProcessorMock

type SmartContractResultsProcessorMock struct {
	ProcessSmartContractResultCalled func(scr *smartContractResult.SmartContractResult) (vmcommon.ReturnCode, error)
}

SmartContractResultsProcessorMock -

func (*SmartContractResultsProcessorMock) IsInterfaceNil

func (scrp *SmartContractResultsProcessorMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*SmartContractResultsProcessorMock) ProcessSmartContractResult

ProcessSmartContractResult -

type SnapshotPruningStorerMock

type SnapshotPruningStorerMock struct {
	*MemDbMock
}

SnapshotPruningStorerMock -

func NewSnapshotPruningStorerMock

func NewSnapshotPruningStorerMock() *SnapshotPruningStorerMock

NewSnapshotPruningStorerMock -

func (*SnapshotPruningStorerMock) GetFromCurrentEpoch

func (spsm *SnapshotPruningStorerMock) GetFromCurrentEpoch(key []byte) ([]byte, error)

GetFromCurrentEpoch -

func (*SnapshotPruningStorerMock) GetFromEpoch

func (spsm *SnapshotPruningStorerMock) GetFromEpoch(key []byte, _ uint32) ([]byte, error)

GetFromEpoch -

func (*SnapshotPruningStorerMock) GetFromLastEpoch

func (spsm *SnapshotPruningStorerMock) GetFromLastEpoch(key []byte) ([]byte, error)

GetFromLastEpoch -

func (*SnapshotPruningStorerMock) GetFromOldEpochsWithoutAddingToCache

func (spsm *SnapshotPruningStorerMock) GetFromOldEpochsWithoutAddingToCache(key []byte) ([]byte, core.OptionalUint32, error)

GetFromOldEpochsWithoutAddingToCache -

func (*SnapshotPruningStorerMock) GetLatestStorageEpoch

func (spsm *SnapshotPruningStorerMock) GetLatestStorageEpoch() (uint32, error)

GetLatestStorageEpoch -

func (*SnapshotPruningStorerMock) PutInEpoch

func (spsm *SnapshotPruningStorerMock) PutInEpoch(key []byte, data []byte, _ uint32) error

PutInEpoch -

func (*SnapshotPruningStorerMock) PutInEpochWithoutCache

func (spsm *SnapshotPruningStorerMock) PutInEpochWithoutCache(key []byte, data []byte, _ uint32) error

PutInEpochWithoutCache -

func (*SnapshotPruningStorerMock) RemoveFromAllActiveEpochs added in v1.6.0

func (spsm *SnapshotPruningStorerMock) RemoveFromAllActiveEpochs(_ []byte) error

RemoveFromAllActiveEpochs -

func (*SnapshotPruningStorerMock) RemoveFromCurrentEpoch

func (spsm *SnapshotPruningStorerMock) RemoveFromCurrentEpoch(key []byte) error

RemoveFromCurrentEpoch -

type StateStatisticsHandlerStub added in v1.7.1

type StateStatisticsHandlerStub struct {
	ResetCalled                      func()
	ResetSnapshotCalled              func()
	IncrementCacheCalled             func()
	CacheCalled                      func() uint64
	IncrementSnapshotCacheCalled     func()
	SnapshotCacheCalled              func() uint64
	IncrementPersisterCalled         func(epoch uint32)
	PersisterCalled                  func(epoch uint32) uint64
	IncrementSnapshotPersisterCalled func(epoch uint32)
	SnapshotPersisterCalled          func(epoch uint32) uint64
	IncrementTrieCalled              func()
	TrieCalled                       func() uint64
	ProcessingStatsCalled            func() []string
	SnapshotStatsCalled              func() []string
}

StateStatisticsHandlerStub -

func (*StateStatisticsHandlerStub) Cache added in v1.7.1

func (stub *StateStatisticsHandlerStub) Cache() uint64

Cache -

func (*StateStatisticsHandlerStub) IncrementCache added in v1.7.5

func (stub *StateStatisticsHandlerStub) IncrementCache()

IncrementCache -

func (*StateStatisticsHandlerStub) IncrementPersister added in v1.7.5

func (stub *StateStatisticsHandlerStub) IncrementPersister(epoch uint32)

IncrementPersister -

func (*StateStatisticsHandlerStub) IncrementSnapshotCache added in v1.7.5

func (stub *StateStatisticsHandlerStub) IncrementSnapshotCache()

IncrementSnapshotCache -

func (*StateStatisticsHandlerStub) IncrementSnapshotPersister added in v1.7.5

func (stub *StateStatisticsHandlerStub) IncrementSnapshotPersister(epoch uint32)

IncrementSnapshotPersister -

func (*StateStatisticsHandlerStub) IncrementTrie added in v1.7.5

func (stub *StateStatisticsHandlerStub) IncrementTrie()

IncrementTrie -

func (*StateStatisticsHandlerStub) IsInterfaceNil added in v1.7.1

func (stub *StateStatisticsHandlerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*StateStatisticsHandlerStub) Persister added in v1.7.1

func (stub *StateStatisticsHandlerStub) Persister(epoch uint32) uint64

Persister -

func (*StateStatisticsHandlerStub) ProcessingStats added in v1.7.1

func (stub *StateStatisticsHandlerStub) ProcessingStats() []string

ProcessingStats -

func (*StateStatisticsHandlerStub) Reset added in v1.7.1

func (stub *StateStatisticsHandlerStub) Reset()

Reset -

func (*StateStatisticsHandlerStub) ResetSnapshot added in v1.7.1

func (stub *StateStatisticsHandlerStub) ResetSnapshot()

ResetSnapshot -

func (*StateStatisticsHandlerStub) SnapshotCache added in v1.7.1

func (stub *StateStatisticsHandlerStub) SnapshotCache() uint64

SnapshotCache -

func (*StateStatisticsHandlerStub) SnapshotPersister added in v1.7.1

func (stub *StateStatisticsHandlerStub) SnapshotPersister(epoch uint32) uint64

SnapshotPersister -

func (*StateStatisticsHandlerStub) SnapshotStats added in v1.7.1

func (stub *StateStatisticsHandlerStub) SnapshotStats() []string

SnapshotStats -

func (*StateStatisticsHandlerStub) Trie added in v1.7.1

func (stub *StateStatisticsHandlerStub) Trie() uint64

Trie -

type StateSyncNotifierSubscriberStub added in v1.6.0

type StateSyncNotifierSubscriberStub struct {
	MissingDataTrieNodeFoundCalled func(hash []byte)
}

StateSyncNotifierSubscriberStub -

func (*StateSyncNotifierSubscriberStub) IsInterfaceNil added in v1.6.0

func (ssns *StateSyncNotifierSubscriberStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*StateSyncNotifierSubscriberStub) MissingDataTrieNodeFound added in v1.6.0

func (ssns *StateSyncNotifierSubscriberStub) MissingDataTrieNodeFound(hash []byte)

MissingDataTrieNodeFound -

type StatusMetricsStub

type StatusMetricsStub struct {
	StatusMetricsMapWithoutP2PCalled              func() (map[string]interface{}, error)
	StatusP2pMetricsMapCalled                     func() (map[string]interface{}, error)
	ConfigMetricsCalled                           func() (map[string]interface{}, error)
	NetworkMetricsCalled                          func() (map[string]interface{}, error)
	EconomicsMetricsCalled                        func() (map[string]interface{}, error)
	EnableEpochsMetricsCalled                     func() (map[string]interface{}, error)
	RatingsMetricsCalled                          func() (map[string]interface{}, error)
	StatusMetricsWithoutP2PPrometheusStringCalled func() (string, error)
	BootstrapMetricsCalled                        func() (map[string]interface{}, error)
}

StatusMetricsStub -

func (*StatusMetricsStub) BootstrapMetrics added in v1.4.3

func (sms *StatusMetricsStub) BootstrapMetrics() (map[string]interface{}, error)

BootstrapMetrics -

func (*StatusMetricsStub) ConfigMetrics

func (sms *StatusMetricsStub) ConfigMetrics() (map[string]interface{}, error)

ConfigMetrics -

func (*StatusMetricsStub) EconomicsMetrics

func (sms *StatusMetricsStub) EconomicsMetrics() (map[string]interface{}, error)

EconomicsMetrics -

func (*StatusMetricsStub) EnableEpochsMetrics

func (sms *StatusMetricsStub) EnableEpochsMetrics() (map[string]interface{}, error)

EnableEpochsMetrics -

func (*StatusMetricsStub) IsInterfaceNil

func (sms *StatusMetricsStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*StatusMetricsStub) NetworkMetrics

func (sms *StatusMetricsStub) NetworkMetrics() (map[string]interface{}, error)

NetworkMetrics -

func (*StatusMetricsStub) RatingsMetrics

func (sms *StatusMetricsStub) RatingsMetrics() (map[string]interface{}, error)

RatingsMetrics -

func (*StatusMetricsStub) StatusMetricsMapWithoutP2P

func (sms *StatusMetricsStub) StatusMetricsMapWithoutP2P() (map[string]interface{}, error)

StatusMetricsMapWithoutP2P -

func (*StatusMetricsStub) StatusMetricsWithoutP2PPrometheusString

func (sms *StatusMetricsStub) StatusMetricsWithoutP2PPrometheusString() (string, error)

StatusMetricsWithoutP2PPrometheusString -

func (*StatusMetricsStub) StatusP2pMetricsMap

func (sms *StatusMetricsStub) StatusP2pMetricsMap() (map[string]interface{}, error)

StatusP2pMetricsMap -

type SyncTimerStub

type SyncTimerStub struct {
}

SyncTimerStub -

func (*SyncTimerStub) ClockOffset

func (sts *SyncTimerStub) ClockOffset() time.Duration

ClockOffset -

func (*SyncTimerStub) Close

func (sts *SyncTimerStub) Close() error

Close -

func (*SyncTimerStub) CurrentTime

func (sts *SyncTimerStub) CurrentTime() time.Time

CurrentTime -

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 TableDisplayerMock added in v1.7.1

type TableDisplayerMock struct {
	DisplayTableCalled func(tableHeader []string, lines []*display.LineData, message string)
}

TableDisplayerMock -

func (*TableDisplayerMock) DisplayTable added in v1.7.1

func (mock *TableDisplayerMock) DisplayTable(tableHeader []string, lines []*display.LineData, message string)

DisplayTable -

func (*TableDisplayerMock) IsInterfaceNil added in v1.7.1

func (mock *TableDisplayerMock) IsInterfaceNil() bool

type TimeCacheStub

type TimeCacheStub struct {
	AddCalled    func(key string) error
	UpsertCalled func(key string, span time.Duration) error
	HasCalled    func(key string) bool
	SweepCalled  func()
	LenCalled    func() int
}

TimeCacheStub -

func (*TimeCacheStub) Add

func (tcs *TimeCacheStub) Add(key string) error

Add -

func (*TimeCacheStub) Has

func (tcs *TimeCacheStub) Has(key string) bool

Has -

func (*TimeCacheStub) IsInterfaceNil

func (tcs *TimeCacheStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*TimeCacheStub) Len

func (tcs *TimeCacheStub) Len() int

Len -

func (*TimeCacheStub) Sweep

func (tcs *TimeCacheStub) Sweep()

Sweep -

func (*TimeCacheStub) Upsert

func (tcs *TimeCacheStub) Upsert(key string, span time.Duration) error

Upsert -

type TransactionCoordinatorMock

type TransactionCoordinatorMock struct {
	ComputeTransactionTypeCalled                         func(tx data.TransactionHandler) (process.TransactionType, process.TransactionType)
	RequestMiniBlocksAndTransactionsCalled               func(header data.HeaderHandler)
	RequestBlockTransactionsCalled                       func(body *block.Body)
	IsDataPreparedForProcessingCalled                    func(haveTime func() time.Duration) error
	SaveTxsToStorageCalled                               func(body *block.Body)
	RestoreBlockDataFromStorageCalled                    func(body *block.Body) (int, error)
	RemoveBlockDataFromPoolCalled                        func(body *block.Body) error
	RemoveTxsFromPoolCalled                              func(body *block.Body) error
	ProcessBlockTransactionCalled                        func(header data.HeaderHandler, body *block.Body, haveTime func() time.Duration) error
	CreateBlockStartedCalled                             func()
	CreateMbsAndProcessCrossShardTransactionsDstMeCalled func(header data.HeaderHandler, processedMiniBlocksInfo map[string]*processedMb.ProcessedMiniBlockInfo, haveTime func() bool, haveAdditionalTime func() bool, scheduledMode bool) (block.MiniBlockSlice, uint32, bool, error)
	CreateMbsAndProcessTransactionsFromMeCalled          func(haveTime func() bool) block.MiniBlockSlice
	CreateMarshalizedDataCalled                          func(body *block.Body) map[string][][]byte
	GetCreatedInShardMiniBlocksCalled                    func() []*block.MiniBlock
	GetAllCurrentUsedTxsCalled                           func(blockType block.Type) map[string]data.TransactionHandler
	VerifyCreatedBlockTransactionsCalled                 func(hdr data.HeaderHandler, body *block.Body) error
	CreatePostProcessMiniBlocksCalled                    func() block.MiniBlockSlice
	VerifyCreatedMiniBlocksCalled                        func(hdr data.HeaderHandler, body *block.Body) error
	AddIntermediateTransactionsCalled                    func(mapSCRs map[block.Type][]data.TransactionHandler) error
	GetAllIntermediateTxsCalled                          func() map[block.Type]map[string]data.TransactionHandler
	AddTxsFromMiniBlocksCalled                           func(miniBlocks block.MiniBlockSlice)
	AddTransactionsCalled                                func(txHandlers []data.TransactionHandler, blockType block.Type)
	// contains filtered or unexported fields
}

TransactionCoordinatorMock -

func (*TransactionCoordinatorMock) AddIntermediateTransactions

func (tcm *TransactionCoordinatorMock) AddIntermediateTransactions(mapSCRs map[block.Type][]data.TransactionHandler) error

AddIntermediateTransactions -

func (*TransactionCoordinatorMock) AddTransactions

func (tcm *TransactionCoordinatorMock) AddTransactions(txHandlers []data.TransactionHandler, blockType block.Type)

AddTransactions -

func (*TransactionCoordinatorMock) AddTxsFromMiniBlocks

func (tcm *TransactionCoordinatorMock) AddTxsFromMiniBlocks(miniBlocks block.MiniBlockSlice)

AddTxsFromMiniBlocks -

func (*TransactionCoordinatorMock) ClearStoredMbs added in v1.7.1

func (tcm *TransactionCoordinatorMock) ClearStoredMbs()

func (*TransactionCoordinatorMock) ComputeTransactionType

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,
	processedMiniBlocksInfo map[string]*processedMb.ProcessedMiniBlockInfo,
	haveTime func() bool,
	haveAdditionalTime func() bool,
	scheduledMode bool,
) (block.MiniBlockSlice, uint32, bool, error)

CreateMbsAndProcessCrossShardTransactionsDstMe -

func (*TransactionCoordinatorMock) CreateMbsAndProcessTransactionsFromMe

func (tcm *TransactionCoordinatorMock) CreateMbsAndProcessTransactionsFromMe(haveTime func() bool, _ []byte) block.MiniBlockSlice

CreateMbsAndProcessTransactionsFromMe -

func (*TransactionCoordinatorMock) CreatePostProcessMiniBlocks

func (tcm *TransactionCoordinatorMock) CreatePostProcessMiniBlocks() block.MiniBlockSlice

CreatePostProcessMiniBlocks -

func (*TransactionCoordinatorMock) CreateReceiptsHash

func (tcm *TransactionCoordinatorMock) CreateReceiptsHash() ([]byte, error)

CreateReceiptsHash -

func (*TransactionCoordinatorMock) GetAllCurrentLogs

func (tcm *TransactionCoordinatorMock) GetAllCurrentLogs() []*data.LogData

GetAllCurrentLogs -

func (*TransactionCoordinatorMock) GetAllCurrentUsedTxs

func (tcm *TransactionCoordinatorMock) GetAllCurrentUsedTxs(blockType block.Type) map[string]data.TransactionHandler

GetAllCurrentUsedTxs -

func (*TransactionCoordinatorMock) GetAllIntermediateTxs

func (tcm *TransactionCoordinatorMock) GetAllIntermediateTxs() map[block.Type]map[string]data.TransactionHandler

GetAllIntermediateTxs -

func (*TransactionCoordinatorMock) GetCreatedInShardMiniBlocks

func (tcm *TransactionCoordinatorMock) GetCreatedInShardMiniBlocks() []*block.MiniBlock

GetCreatedInShardMiniBlocks -

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(header data.HeaderHandler, body *block.Body, haveTime func() time.Duration) error

ProcessBlockTransaction -

func (*TransactionCoordinatorMock) RemoveBlockDataFromPool

func (tcm *TransactionCoordinatorMock) RemoveBlockDataFromPool(body *block.Body) error

RemoveBlockDataFromPool -

func (*TransactionCoordinatorMock) RemoveTxsFromPool

func (tcm *TransactionCoordinatorMock) RemoveTxsFromPool(body *block.Body) error

RemoveTxsFromPool -

func (*TransactionCoordinatorMock) RequestBlockTransactions

func (tcm *TransactionCoordinatorMock) RequestBlockTransactions(body *block.Body)

RequestBlockTransactions -

func (*TransactionCoordinatorMock) RequestMiniBlocksAndTransactions added in v1.6.3

func (tcm *TransactionCoordinatorMock) RequestMiniBlocksAndTransactions(header data.HeaderHandler)

RequestMiniBlocksAndTransactions -

func (*TransactionCoordinatorMock) RestoreBlockDataFromStorage

func (tcm *TransactionCoordinatorMock) RestoreBlockDataFromStorage(body *block.Body) (int, error)

RestoreBlockDataFromStorage -

func (*TransactionCoordinatorMock) SaveTxsToStorage

func (tcm *TransactionCoordinatorMock) SaveTxsToStorage(body *block.Body)

SaveTxsToStorage -

func (*TransactionCoordinatorMock) VerifyCreatedBlockTransactions

func (tcm *TransactionCoordinatorMock) VerifyCreatedBlockTransactions(hdr data.HeaderHandler, body *block.Body) error

VerifyCreatedBlockTransactions -

func (*TransactionCoordinatorMock) VerifyCreatedMiniBlocks

func (tcm *TransactionCoordinatorMock) VerifyCreatedMiniBlocks(hdr data.HeaderHandler, body *block.Body) error

VerifyCreatedMiniBlocks -

type TxProcessorMock

type TxProcessorMock struct {
	ProcessTransactionCalled         func(transaction *transaction.Transaction) (vmcommon.ReturnCode, error)
	VerifyTransactionCalled          func(tx *transaction.Transaction) error
	SetBalancesToTrieCalled          func(accBalance map[string]*big.Int) (rootHash []byte, err error)
	ProcessSmartContractResultCalled func(scr *smartContractResult.SmartContractResult) (vmcommon.ReturnCode, 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) (vmcommon.ReturnCode, error)

ProcessSmartContractResult -

func (*TxProcessorMock) ProcessTransaction

func (etm *TxProcessorMock) ProcessTransaction(transaction *transaction.Transaction) (vmcommon.ReturnCode, error)

ProcessTransaction -

func (*TxProcessorMock) SetBalancesToTrie

func (etm *TxProcessorMock) SetBalancesToTrie(accBalance map[string]*big.Int) (rootHash []byte, err error)

SetBalancesToTrie -

func (*TxProcessorMock) VerifyTransaction

func (etm *TxProcessorMock) VerifyTransaction(tx *transaction.Transaction) error

VerifyTransaction -

type TxProcessorStub

type TxProcessorStub struct {
	ProcessTransactionCalled func(transaction *transaction.Transaction) (vmcommon.ReturnCode, error)
	VerifyTransactionCalled  func(tx *transaction.Transaction) error
}

TxProcessorStub -

func (*TxProcessorStub) IsInterfaceNil

func (tps *TxProcessorStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*TxProcessorStub) ProcessTransaction

func (tps *TxProcessorStub) ProcessTransaction(transaction *transaction.Transaction) (vmcommon.ReturnCode, error)

ProcessTransaction -

func (*TxProcessorStub) VerifyTransaction

func (tps *TxProcessorStub) VerifyTransaction(tx *transaction.Transaction) error

VerifyTransaction -

type TxTypeHandlerMock

type TxTypeHandlerMock struct {
	ComputeTransactionTypeCalled func(tx data.TransactionHandler) (process.TransactionType, process.TransactionType)
}

TxTypeHandlerMock -

func (*TxTypeHandlerMock) ComputeTransactionType

ComputeTransactionType -

func (*TxTypeHandlerMock) IsInterfaceNil

func (th *TxTypeHandlerMock) IsInterfaceNil() bool

IsInterfaceNil -

type TxVersionCheckerStub added in v1.5.0

type TxVersionCheckerStub struct {
	IsSignedWithHashCalled     func(tx *transaction.Transaction) bool
	IsGuardedTransactionCalled func(tx *transaction.Transaction) bool
	CheckTxVersionCalled       func(tx *transaction.Transaction) error
}

TxVersionCheckerStub -

func (*TxVersionCheckerStub) CheckTxVersion added in v1.5.0

func (tvcs *TxVersionCheckerStub) CheckTxVersion(tx *transaction.Transaction) error

CheckTxVersion will check transaction version

func (*TxVersionCheckerStub) IsGuardedTransaction added in v1.5.0

func (tvcs *TxVersionCheckerStub) IsGuardedTransaction(tx *transaction.Transaction) bool

IsGuardedTransaction will return true if transaction also holds a guardian signature

func (*TxVersionCheckerStub) IsInterfaceNil added in v1.5.0

func (tvcs *TxVersionCheckerStub) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*TxVersionCheckerStub) IsSignedWithHash added in v1.5.0

func (tvcs *TxVersionCheckerStub) IsSignedWithHash(tx *transaction.Transaction) bool

IsSignedWithHash will return true if transaction is signed with hash

type UnsignedTxHandlerStub

type UnsignedTxHandlerStub struct {
	CleanProcessedUtxsCalled                 func()
	ProcessTransactionFeeCalled              func(cost *big.Int, fee *big.Int, hash []byte)
	ProcessTransactionFeeRelayedUserTxCalled func(cost *big.Int, devFee *big.Int, userTxHash []byte, originalTxHash []byte)
	CreateAllUTxsCalled                      func() []data.TransactionHandler
	VerifyCreatedUTxsCalled                  func() error
	AddTxFeeFromBlockCalled                  func(tx data.TransactionHandler)
	GetAccumulatedFeesCalled                 func() *big.Int
	GetDeveloperFeesCalled                   func() *big.Int
	RevertFeesCalled                         func(txHashes [][]byte)
}

UnsignedTxHandlerStub -

func (*UnsignedTxHandlerStub) AddRewardTxFromBlock

func (ut *UnsignedTxHandlerStub) AddRewardTxFromBlock(tx data.TransactionHandler)

AddRewardTxFromBlock -

func (*UnsignedTxHandlerStub) CleanProcessedUTxs

func (ut *UnsignedTxHandlerStub) CleanProcessedUTxs()

CleanProcessedUTxs -

func (*UnsignedTxHandlerStub) CreateAllUTxs

func (ut *UnsignedTxHandlerStub) CreateAllUTxs() []data.TransactionHandler

CreateAllUTxs -

func (*UnsignedTxHandlerStub) CreateBlockStarted

func (ut *UnsignedTxHandlerStub) CreateBlockStarted(_ scheduled.GasAndFees)

CreateBlockStarted -

func (*UnsignedTxHandlerStub) GetAccumulatedFees

func (ut *UnsignedTxHandlerStub) GetAccumulatedFees() *big.Int

GetAccumulatedFees -

func (*UnsignedTxHandlerStub) GetDeveloperFees

func (ut *UnsignedTxHandlerStub) GetDeveloperFees() *big.Int

GetDeveloperFees -

func (*UnsignedTxHandlerStub) IsInterfaceNil

func (ut *UnsignedTxHandlerStub) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*UnsignedTxHandlerStub) ProcessTransactionFee

func (ut *UnsignedTxHandlerStub) ProcessTransactionFee(cost *big.Int, devFee *big.Int, txHash []byte)

ProcessTransactionFee -

func (*UnsignedTxHandlerStub) ProcessTransactionFeeRelayedUserTx

func (ut *UnsignedTxHandlerStub) ProcessTransactionFeeRelayedUserTx(cost *big.Int, devFee *big.Int, userTxHash []byte, originalTxHash []byte)

ProcessTransactionFeeRelayedUserTx -

func (*UnsignedTxHandlerStub) RevertFees

func (ut *UnsignedTxHandlerStub) RevertFees(txHashes [][]byte)

RevertFees -

func (*UnsignedTxHandlerStub) VerifyCreatedUTxs

func (ut *UnsignedTxHandlerStub) VerifyCreatedUTxs() error

VerifyCreatedUTxs -

type ValidatorStatisticsProcessorStub added in v1.7.0

type ValidatorStatisticsProcessorStub struct {
	UpdatePeerStateCalled                    func(header data.MetaHeaderHandler) ([]byte, error)
	RevertPeerStateCalled                    func(header data.MetaHeaderHandler) error
	GetPeerAccountCalled                     func(address []byte) (state.PeerAccountHandler, error)
	RootHashCalled                           func() ([]byte, error)
	LastFinalizedRootHashCalled              func() []byte
	ResetValidatorStatisticsAtNewEpochCalled func(vInfos state.ShardValidatorsInfoMapHandler) error
	GetValidatorInfoForRootHashCalled        func(rootHash []byte) (state.ShardValidatorsInfoMapHandler, error)
	ProcessRatingsEndOfEpochCalled           func(validatorInfos state.ShardValidatorsInfoMapHandler, epoch uint32) error
	ProcessCalled                            func(validatorInfo data.ShardValidatorInfoHandler) error
	CommitCalled                             func() ([]byte, error)
	PeerAccountToValidatorInfoCalled         func(peerAccount state.PeerAccountHandler) *state.ValidatorInfo
	SaveNodesCoordinatorUpdatesCalled        func(epoch uint32) (bool, error)
}

ValidatorStatisticsProcessorStub -

func (*ValidatorStatisticsProcessorStub) Commit added in v1.7.0

func (vsp *ValidatorStatisticsProcessorStub) Commit() ([]byte, error)

Commit -

func (*ValidatorStatisticsProcessorStub) DisplayRatings added in v1.7.0

func (vsp *ValidatorStatisticsProcessorStub) DisplayRatings(_ uint32)

DisplayRatings -

func (*ValidatorStatisticsProcessorStub) GetPeerAccount added in v1.7.0

func (vsp *ValidatorStatisticsProcessorStub) GetPeerAccount(address []byte) (state.PeerAccountHandler, error)

GetPeerAccount -

func (*ValidatorStatisticsProcessorStub) GetValidatorInfoForRootHash added in v1.7.0

func (vsp *ValidatorStatisticsProcessorStub) GetValidatorInfoForRootHash(rootHash []byte) (state.ShardValidatorsInfoMapHandler, error)

GetValidatorInfoForRootHash -

func (*ValidatorStatisticsProcessorStub) IsInterfaceNil added in v1.7.0

func (vsp *ValidatorStatisticsProcessorStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*ValidatorStatisticsProcessorStub) LastFinalizedRootHash added in v1.7.0

func (vsp *ValidatorStatisticsProcessorStub) LastFinalizedRootHash() []byte

LastFinalizedRootHash -

func (*ValidatorStatisticsProcessorStub) PeerAccountToValidatorInfo added in v1.7.0

func (vsp *ValidatorStatisticsProcessorStub) PeerAccountToValidatorInfo(peerAccount state.PeerAccountHandler) *state.ValidatorInfo

PeerAccountToValidatorInfo -

func (*ValidatorStatisticsProcessorStub) Process added in v1.7.0

Process -

func (*ValidatorStatisticsProcessorStub) ProcessRatingsEndOfEpoch added in v1.7.0

func (vsp *ValidatorStatisticsProcessorStub) ProcessRatingsEndOfEpoch(validatorInfos state.ShardValidatorsInfoMapHandler, epoch uint32) error

ProcessRatingsEndOfEpoch -

func (*ValidatorStatisticsProcessorStub) ResetValidatorStatisticsAtNewEpoch added in v1.7.0

func (vsp *ValidatorStatisticsProcessorStub) ResetValidatorStatisticsAtNewEpoch(vInfos state.ShardValidatorsInfoMapHandler) error

ResetValidatorStatisticsAtNewEpoch -

func (*ValidatorStatisticsProcessorStub) RevertPeerState added in v1.7.0

func (vsp *ValidatorStatisticsProcessorStub) RevertPeerState(header data.MetaHeaderHandler) error

RevertPeerState -

func (*ValidatorStatisticsProcessorStub) RootHash added in v1.7.0

func (vsp *ValidatorStatisticsProcessorStub) RootHash() ([]byte, error)

RootHash -

func (*ValidatorStatisticsProcessorStub) SaveNodesCoordinatorUpdates added in v1.7.0

func (vsp *ValidatorStatisticsProcessorStub) SaveNodesCoordinatorUpdates(epoch uint32) (bool, error)

SaveNodesCoordinatorUpdates -

func (*ValidatorStatisticsProcessorStub) SetLastFinalizedRootHash added in v1.7.0

func (vsp *ValidatorStatisticsProcessorStub) SetLastFinalizedRootHash(_ []byte)

SetLastFinalizedRootHash -

func (*ValidatorStatisticsProcessorStub) UpdatePeerState added in v1.7.0

func (vsp *ValidatorStatisticsProcessorStub) UpdatePeerState(header data.MetaHeaderHandler, _ map[string]data.HeaderHandler) ([]byte, error)

UpdatePeerState -

type VersionedHeaderFactoryStub

type VersionedHeaderFactoryStub struct {
	CreateCalled func(epoch uint32) data.HeaderHandler
}

VersionedHeaderFactoryStub -

func (*VersionedHeaderFactoryStub) Create

Create -

func (*VersionedHeaderFactoryStub) IsInterfaceNil

func (vhfs *VersionedHeaderFactoryStub) IsInterfaceNil() bool

IsInterfaceNil -

type WatchdogMock

type WatchdogMock struct {
}

WatchdogMock -

func (*WatchdogMock) IsInterfaceNil

func (w *WatchdogMock) IsInterfaceNil() bool

IsInterfaceNil -

func (*WatchdogMock) Reset

func (w *WatchdogMock) Reset(_ string)

Reset -

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 -

func (*WatchdogMock) Stop

func (w *WatchdogMock) Stop(_ string)

Stop -

type WhiteListHandlerStub

type WhiteListHandlerStub struct {
	RemoveCalled                  func(keys [][]byte)
	AddCalled                     func(keys [][]byte)
	IsWhiteListedCalled           func(interceptedData process.InterceptedData) bool
	IsWhiteListedAtLeastOneCalled func(identifiers [][]byte) bool
	IsForCurrentShardCalled       func(interceptedData process.InterceptedData) bool
}

WhiteListHandlerStub -

func (*WhiteListHandlerStub) Add

func (w *WhiteListHandlerStub) Add(keys [][]byte)

Add -

func (*WhiteListHandlerStub) IsForCurrentShard

func (w *WhiteListHandlerStub) IsForCurrentShard(interceptedData process.InterceptedData) bool

IsForCurrentShard -

func (*WhiteListHandlerStub) IsInterfaceNil

func (w *WhiteListHandlerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*WhiteListHandlerStub) IsWhiteListed

func (w *WhiteListHandlerStub) IsWhiteListed(interceptedData process.InterceptedData) bool

IsWhiteListed -

func (*WhiteListHandlerStub) IsWhiteListedAtLeastOne

func (w *WhiteListHandlerStub) IsWhiteListedAtLeastOne(identifiers [][]byte) bool

IsWhiteListedAtLeastOne -

func (*WhiteListHandlerStub) Remove

func (w *WhiteListHandlerStub) Remove(keys [][]byte)

Remove -

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL