mock

package
v1.1.56 Latest Latest
Warning

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

Go to latest
Published: May 12, 2021 License: GPL-3.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMultiShardsCoordinatorMock

func NewMultiShardsCoordinatorMock(nrShard uint32) *multipleShardsCoordinatorMock

NewMultiShardsCoordinatorMock -

func NewMultipleShardsCoordinatorMock

func NewMultipleShardsCoordinatorMock() *multipleShardsCoordinatorMock

NewMultipleShardsCoordinatorMock -

func NewNilTxValidator

func NewNilTxValidator() (*nilTxValidator, error)

NewNilTxValidator creates a new nil tx handler validator instance

func NewNonceHashConverterMock

func NewNonceHashConverterMock() *nonceHashConverterMock

NewNonceHashConverterMock -

func NewOneShardCoordinatorMock

func NewOneShardCoordinatorMock() *oneShardCoordinatorMock

NewOneShardCoordinatorMock -

Types

type AccountWrapMock

type AccountWrapMock struct {
	MockValue int

	SetNonceWithJournalCalled    func(nonce uint64) error    `json:"-"`
	SetCodeHashWithJournalCalled func(codeHash []byte) error `json:"-"`
	SetCodeWithJournalCalled     func(codeHash []byte) error `json:"-"`
	// contains filtered or unexported fields
}

AccountWrapMock -

func NewAccountWrapMock

func NewAccountWrapMock(adr []byte) *AccountWrapMock

NewAccountWrapMock -

func (*AccountWrapMock) AddToBalance

func (awm *AccountWrapMock) AddToBalance(_ *big.Int) error

AddToBalance -

func (*AccountWrapMock) AddToDeveloperReward

func (awm *AccountWrapMock) AddToDeveloperReward(*big.Int)

AddToDeveloperReward -

func (*AccountWrapMock) AddressBytes added in v1.0.113

func (awm *AccountWrapMock) AddressBytes() []byte

AddressBytes -

func (*AccountWrapMock) ChangeOwnerAddress

func (awm *AccountWrapMock) ChangeOwnerAddress([]byte, []byte) error

ChangeOwnerAddress -

func (*AccountWrapMock) ClaimDeveloperRewards

func (awm *AccountWrapMock) ClaimDeveloperRewards([]byte) (*big.Int, error)

ClaimDeveloperRewards -

func (*AccountWrapMock) DataTrie

func (awm *AccountWrapMock) DataTrie() data.Trie

DataTrie -

func (*AccountWrapMock) DataTrieTracker

func (awm *AccountWrapMock) DataTrieTracker() state.DataTrieTracker

DataTrieTracker -

func (*AccountWrapMock) GetBalance

func (awm *AccountWrapMock) GetBalance() *big.Int

GetBalance -

func (*AccountWrapMock) GetCodeHash

func (awm *AccountWrapMock) GetCodeHash() []byte

GetCodeHash -

func (*AccountWrapMock) GetCodeMetadata added in v1.0.103

func (awm *AccountWrapMock) GetCodeMetadata() []byte

GetCodeMetadata -

func (*AccountWrapMock) GetDeveloperReward

func (awm *AccountWrapMock) GetDeveloperReward() *big.Int

GetDeveloperReward -

func (*AccountWrapMock) GetNonce

func (awm *AccountWrapMock) GetNonce() uint64

GetNonce -

func (*AccountWrapMock) GetOwnerAddress

func (awm *AccountWrapMock) GetOwnerAddress() []byte

GetOwnerAddress -

func (*AccountWrapMock) GetRootHash

func (awm *AccountWrapMock) GetRootHash() []byte

GetRootHash -

func (*AccountWrapMock) GetUserName added in v1.0.103

func (awm *AccountWrapMock) GetUserName() []byte

GetUserName -

func (*AccountWrapMock) HasNewCode added in v1.1.22

func (awm *AccountWrapMock) HasNewCode() bool

HasNewCode -

func (*AccountWrapMock) IncreaseNonce

func (awm *AccountWrapMock) IncreaseNonce(val uint64)

IncreaseNonce -

func (*AccountWrapMock) IsInterfaceNil

func (awm *AccountWrapMock) IsInterfaceNil() bool

IsInterfaceNil -

func (*AccountWrapMock) SetCode

func (awm *AccountWrapMock) SetCode(code []byte)

SetCode -

func (*AccountWrapMock) SetCodeHash

func (awm *AccountWrapMock) SetCodeHash(codeHash []byte)

SetCodeHash -

func (*AccountWrapMock) SetCodeMetadata added in v1.0.103

func (awm *AccountWrapMock) SetCodeMetadata(codeMetadata []byte)

SetCodeMetadata -

func (*AccountWrapMock) SetDataTrie

func (awm *AccountWrapMock) SetDataTrie(trie data.Trie)

SetDataTrie -

func (*AccountWrapMock) SetOwnerAddress

func (awm *AccountWrapMock) SetOwnerAddress([]byte)

SetOwnerAddress -

func (*AccountWrapMock) SetRootHash

func (awm *AccountWrapMock) SetRootHash(rootHash []byte)

SetRootHash -

func (*AccountWrapMock) SetUserName added in v1.0.103

func (awm *AccountWrapMock) SetUserName(_ []byte)

SetUserName -

func (*AccountWrapMock) SubFromBalance

func (awm *AccountWrapMock) SubFromBalance(_ *big.Int) error

SubFromBalance -

type AccountsStub

type AccountsStub struct {
	AddJournalEntryCalled    func(je state.JournalEntry)
	GetExistingAccountCalled func(address []byte) (state.AccountHandler, error)
	LoadAccountCalled        func(address []byte) (state.AccountHandler, error)
	SaveAccountCalled        func(account state.AccountHandler) error
	RemoveAccountCalled      func(address []byte) error
	CommitCalled             func() ([]byte, error)
	JournalLenCalled         func() int
	RevertToSnapshotCalled   func(snapshot int) error
	RootHashCalled           func() ([]byte, error)
	RecreateTrieCalled       func(rootHash []byte) error
	PruneTrieCalled          func(rootHash []byte, identifier data.TriePruningIdentifier)
	CancelPruneCalled        func(rootHash []byte, identifier data.TriePruningIdentifier)
	SnapshotStateCalled      func(rootHash []byte)
	SetStateCheckpointCalled func(rootHash []byte)
	IsPruningEnabledCalled   func() bool
	GetAllLeavesCalled       func(rootHash []byte) (chan core.KeyValueHolder, error)
	RecreateAllTriesCalled   func(rootHash []byte) (map[string]data.Trie, error)
	GetNumCheckpointsCalled  func() uint32
	GetCodeCalled            func([]byte) []byte
}

AccountsStub -

func (*AccountsStub) AddJournalEntry

func (as *AccountsStub) AddJournalEntry(je state.JournalEntry)

AddJournalEntry -

func (*AccountsStub) CancelPrune

func (as *AccountsStub) CancelPrune(rootHash []byte, identifier data.TriePruningIdentifier)

CancelPrune -

func (*AccountsStub) Commit

func (as *AccountsStub) Commit() ([]byte, error)

Commit -

func (*AccountsStub) GetAllLeaves

func (as *AccountsStub) GetAllLeaves(rootHash []byte, _ context.Context) (chan core.KeyValueHolder, error)

GetAllLeaves -

func (*AccountsStub) GetCode added in v1.1.22

func (as *AccountsStub) GetCode(codeHash []byte) []byte

GetCode -

func (*AccountsStub) GetExistingAccount

func (as *AccountsStub) GetExistingAccount(address []byte) (state.AccountHandler, error)

GetExistingAccount -

func (*AccountsStub) GetNumCheckpoints added in v1.0.149

func (as *AccountsStub) GetNumCheckpoints() uint32

GetNumCheckpoints -

func (*AccountsStub) IsInterfaceNil

func (as *AccountsStub) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*AccountsStub) IsPruningEnabled

func (as *AccountsStub) IsPruningEnabled() bool

IsPruningEnabled -

func (*AccountsStub) JournalLen

func (as *AccountsStub) JournalLen() int

JournalLen -

func (*AccountsStub) LoadAccount

func (as *AccountsStub) LoadAccount(address []byte) (state.AccountHandler, error)

LoadAccount -

func (*AccountsStub) PruneTrie

func (as *AccountsStub) PruneTrie(rootHash []byte, identifier data.TriePruningIdentifier)

PruneTrie -

func (*AccountsStub) RecreateAllTries added in v1.0.102

func (as *AccountsStub) RecreateAllTries(rootHash []byte, _ context.Context) (map[string]data.Trie, error)

RecreateAllTries -

func (*AccountsStub) RecreateTrie

func (as *AccountsStub) RecreateTrie(rootHash []byte) error

RecreateTrie -

func (*AccountsStub) RemoveAccount

func (as *AccountsStub) RemoveAccount(address []byte) error

RemoveAccount -

func (*AccountsStub) RevertToSnapshot

func (as *AccountsStub) RevertToSnapshot(snapshot int) error

RevertToSnapshot -

func (*AccountsStub) RootHash

func (as *AccountsStub) RootHash() ([]byte, error)

RootHash -

func (*AccountsStub) SaveAccount

func (as *AccountsStub) SaveAccount(account state.AccountHandler) error

SaveAccount -

func (*AccountsStub) SetStateCheckpoint

func (as *AccountsStub) SetStateCheckpoint(rootHash []byte, _ context.Context)

SetStateCheckpoint -

func (*AccountsStub) SnapshotState

func (as *AccountsStub) SnapshotState(rootHash []byte, _ context.Context)

SnapshotState -

type AntifloodDebuggerStub added in v1.0.132

type AntifloodDebuggerStub struct {
	AddDataCalled func(pid core.PeerID, topic string, numRejected uint32, sizeRejected uint64, sequence []byte, isBlacklisted bool)
	CloseCalled   func() error
}

AntifloodDebuggerStub -

func (*AntifloodDebuggerStub) AddData added in v1.0.132

func (ads *AntifloodDebuggerStub) AddData(pid core.PeerID, topic string, numRejected uint32, sizeRejected uint64, sequence []byte, isBlacklisted bool)

AddData -

func (*AntifloodDebuggerStub) Close added in v1.0.132

func (ads *AntifloodDebuggerStub) Close() error

Close -

func (*AntifloodDebuggerStub) IsInterfaceNil added in v1.0.132

func (ads *AntifloodDebuggerStub) IsInterfaceNil() bool

IsInterfaceNil -

type AppStatusHandlerStub

type AppStatusHandlerStub struct {
	AddUint64Handler      func(key string, value uint64)
	IncrementHandler      func(key string)
	DecrementHandler      func(key string)
	SetUInt64ValueHandler func(key string, value uint64)
	SetInt64ValueHandler  func(key string, value int64)
	SetStringValueHandler func(key string, value string)
	CloseHandler          func()
}

AppStatusHandlerStub is a stub implementation of AppStatusHandler

func (*AppStatusHandlerStub) AddUint64

func (ashs *AppStatusHandlerStub) AddUint64(key string, value uint64)

AddUint64 will call the handler of the stub for incrementing

func (*AppStatusHandlerStub) Close

func (ashs *AppStatusHandlerStub) Close()

Close will call the handler of the stub for closing

func (*AppStatusHandlerStub) Decrement

func (ashs *AppStatusHandlerStub) Decrement(key string)

Decrement will call the handler of the stub for decrementing

func (*AppStatusHandlerStub) Increment

func (ashs *AppStatusHandlerStub) Increment(key string)

Increment will call the handler of the stub for incrementing

func (*AppStatusHandlerStub) IsInterfaceNil

func (ashs *AppStatusHandlerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*AppStatusHandlerStub) SetInt64Value

func (ashs *AppStatusHandlerStub) SetInt64Value(key string, value int64)

SetInt64Value will call the handler of the stub for setting an int64 value

func (*AppStatusHandlerStub) SetStringValue

func (ashs *AppStatusHandlerStub) SetStringValue(key string, value string)

SetStringValue will call the handler of the stub for setting an string value

func (*AppStatusHandlerStub) SetUInt64Value

func (ashs *AppStatusHandlerStub) SetUInt64Value(key string, value uint64)

SetUInt64Value will call the handler of the stub for setting an uint64 value

type ArgumentParserMock

type ArgumentParserMock struct {
	ParseCallDataCalled               func(data string) (string, [][]byte, error)
	ParseDeployDataCalled             func(data string) (*parsers.DeployArgs, error)
	CreateDataFromStorageUpdateCalled func(storageUpdates []*vmcommon.StorageUpdate) string
	GetStorageUpdatesCalled           func(data string) ([]*vmcommon.StorageUpdate, error)
}

ArgumentParserMock -

func (*ArgumentParserMock) CreateDataFromStorageUpdate

func (ap *ArgumentParserMock) CreateDataFromStorageUpdate(storageUpdates []*vmcommon.StorageUpdate) string

CreateDataFromStorageUpdate -

func (*ArgumentParserMock) GetStorageUpdates

func (ap *ArgumentParserMock) GetStorageUpdates(data string) ([]*vmcommon.StorageUpdate, error)

GetStorageUpdates -

func (*ArgumentParserMock) IsInterfaceNil

func (ap *ArgumentParserMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*ArgumentParserMock) ParseCallData added in v1.0.133

func (ap *ArgumentParserMock) ParseCallData(data string) (string, [][]byte, error)

ParseCallData -

func (*ArgumentParserMock) ParseDeployData added in v1.0.133

func (ap *ArgumentParserMock) ParseDeployData(data string) (*parsers.DeployArgs, error)

ParseDeployData -

type BalanceComputationStub added in v1.0.106

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

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

AddBalanceToAddress -

func (*BalanceComputationStub) AddressHasEnoughBalance added in v1.0.106

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

AddressHasEnoughBalance -

func (*BalanceComputationStub) Init added in v1.0.106

func (bcs *BalanceComputationStub) Init()

Init -

func (*BalanceComputationStub) IsAddressSet added in v1.0.106

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

IsAddressSet -

func (*BalanceComputationStub) IsInterfaceNil added in v1.0.106

func (bcs *BalanceComputationStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*BalanceComputationStub) SetBalanceToAddress added in v1.0.106

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

SetBalanceToAddress -

func (*BalanceComputationStub) SubBalanceFromAddress added in v1.0.106

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

SubBalanceFromAddress -

type BelNevMock

type BelNevMock struct {
	VerifyMock               func(msg []byte, bitmap []byte) error
	CommitmentHashMock       func(index uint16) ([]byte, error)
	CreateCommitmentMock     func() ([]byte, []byte)
	AggregateCommitmentsMock func(bitmap []byte) error
	CreateSignatureShareMock func(msg []byte, bitmap []byte) ([]byte, error)
	VerifySignatureShareMock func(index uint16, sig []byte, msg []byte, bitmap []byte) error
	AggregateSigsMock        func(bitmap []byte) ([]byte, error)
	StoreCommitmentMock      func(index uint16, value []byte) error
	StoreCommitmentHashMock  func(uint16, []byte) error
	CommitmentMock           func(uint16) ([]byte, error)
	CreateMock               func(pubKeys []string, index uint16) (crypto.MultiSigner, error)
	// contains filtered or unexported fields
}

BelNevMock is used to mock belare neven multisignature scheme

func NewMultiSigner

func NewMultiSigner() *BelNevMock

NewMultiSigner -

func (*BelNevMock) AggregateCommitments

func (bnm *BelNevMock) AggregateCommitments(bitmap []byte) error

AggregateCommitments aggregates the list of commitments

func (*BelNevMock) AggregateSigs

func (bnm *BelNevMock) AggregateSigs(bitmap []byte) ([]byte, error)

AggregateSigs aggregates all collected partial signatures

func (*BelNevMock) Commitment

func (bnm *BelNevMock) Commitment(index uint16) ([]byte, error)

Commitment returns the commitment from the list with the specified position

func (*BelNevMock) CommitmentHash

func (bnm *BelNevMock) CommitmentHash(index uint16) ([]byte, error)

CommitmentHash returns the commitment hash from the list on the specified position

func (*BelNevMock) Create

func (bnm *BelNevMock) Create(pubKeys []string, index uint16) (crypto.MultiSigner, error)

Create resets the multiSigner and initializes corresponding fields with the given params

func (*BelNevMock) CreateCommitment

func (bnm *BelNevMock) CreateCommitment() (commSecret []byte, commitment []byte)

CreateCommitment creates a secret commitment and the corresponding public commitment point

func (*BelNevMock) CreateSignatureShare

func (bnm *BelNevMock) CreateSignatureShare(msg []byte, bitmap []byte) ([]byte, error)

CreateSignatureShare creates a partial signature

func (*BelNevMock) IsInterfaceNil

func (bnm *BelNevMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*BelNevMock) Reset

func (bnm *BelNevMock) Reset(pubKeys []string, index uint16) error

Reset -

func (*BelNevMock) SetAggregatedSig

func (bnm *BelNevMock) SetAggregatedSig(aggSig []byte) error

SetAggregatedSig sets the aggregated signature according to the given byte array

func (*BelNevMock) SetMessage

func (bnm *BelNevMock) SetMessage(msg []byte) error

SetMessage sets the message to be signed

func (*BelNevMock) SignatureShare

func (bnm *BelNevMock) SignatureShare(index uint16) ([]byte, error)

SignatureShare -

func (*BelNevMock) StoreCommitment

func (bnm *BelNevMock) StoreCommitment(index uint16, value []byte) error

StoreCommitment adds a commitment to the list on the specified position

func (*BelNevMock) StoreCommitmentHash

func (bnm *BelNevMock) StoreCommitmentHash(index uint16, commHash []byte) error

StoreCommitmentHash adds a commitment hash to the list on the specified position

func (*BelNevMock) StoreSignatureShare

func (bnm *BelNevMock) StoreSignatureShare(index uint16, sig []byte) error

StoreSignatureShare adds the partial signature of the signer with specified position

func (*BelNevMock) Verify

func (bnm *BelNevMock) Verify(msg []byte, bitmap []byte) error

Verify returns nil if the aggregateed signature is verified for the given public keys

func (*BelNevMock) VerifySignatureShare

func (bnm *BelNevMock) VerifySignatureShare(index uint16, sig []byte, msg []byte, bitmap []byte) error

VerifySignatureShare verifies the partial signature of the signer with specified position

type BlackListHandlerStub

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

BlackListHandlerStub -

func (*BlackListHandlerStub) Add

func (blhs *BlackListHandlerStub) Add(key string) error

Add -

func (*BlackListHandlerStub) Has

func (blhs *BlackListHandlerStub) Has(key string) bool

Has -

func (*BlackListHandlerStub) IsInterfaceNil

func (blhs *BlackListHandlerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*BlackListHandlerStub) Len added in v1.1.1

func (blhs *BlackListHandlerStub) Len() int

Len -

func (*BlackListHandlerStub) Sweep

func (blhs *BlackListHandlerStub) Sweep()

Sweep -

func (*BlackListHandlerStub) Upsert added in v1.0.133

func (blhs *BlackListHandlerStub) Upsert(key string, span time.Duration) error

Upsert -

type BlockChainHookHandlerMock

type BlockChainHookHandlerMock struct {
	SetCurrentHeaderCalled   func(hdr data.HeaderHandler)
	NewAddressCalled         func(creatorAddress []byte, creatorNonce uint64, vmType []byte) ([]byte, error)
	IsPayableCalled          func(address []byte) (bool, error)
	DeleteCompiledCodeCalled func(codeHash []byte)
}

BlockChainHookHandlerMock -

func (*BlockChainHookHandlerMock) DeleteCompiledCode added in v1.1.12

func (e *BlockChainHookHandlerMock) DeleteCompiledCode(codeHash []byte)

DeleteCompiledCode -

func (*BlockChainHookHandlerMock) GetBuiltInFunctions added in v1.0.103

GetBuiltInFunctions -

func (*BlockChainHookHandlerMock) IsInterfaceNil

func (e *BlockChainHookHandlerMock) IsInterfaceNil() bool

IsInterfaceNil -

func (*BlockChainHookHandlerMock) IsPayable added in v1.0.147

func (e *BlockChainHookHandlerMock) IsPayable(address []byte) (bool, error)

IsPayable -

func (*BlockChainHookHandlerMock) NewAddress added in v1.0.115

func (e *BlockChainHookHandlerMock) NewAddress(creatorAddress []byte, creatorNonce uint64, vmType []byte) ([]byte, error)

NewAddress -

func (*BlockChainHookHandlerMock) SetCurrentHeader

func (e *BlockChainHookHandlerMock) SetCurrentHeader(hdr data.HeaderHandler)

SetCurrentHeader -

type BlockChainMock

type BlockChainMock struct {
	GetGenesisHeaderCalled          func() data.HeaderHandler
	SetGenesisHeaderCalled          func(handler data.HeaderHandler) error
	GetGenesisHeaderHashCalled      func() []byte
	SetGenesisHeaderHashCalled      func([]byte)
	GetCurrentBlockHeaderCalled     func() data.HeaderHandler
	SetCurrentBlockHeaderCalled     func(data.HeaderHandler) error
	GetCurrentBlockHeaderHashCalled func() []byte
	SetCurrentBlockHeaderHashCalled func([]byte)
	GetLocalHeightCalled            func() int64
	SetLocalHeightCalled            func(int64)
	GetNetworkHeightCalled          func() int64
	SetNetworkHeightCalled          func(int64)
	HasBadBlockCalled               func([]byte) bool
	PutBadBlockCalled               func([]byte)
	CreateNewHeaderCalled           func() data.HeaderHandler
}

BlockChainMock is a mock implementation of the blockchain interface

func (*BlockChainMock) CreateNewHeader

func (bc *BlockChainMock) CreateNewHeader() data.HeaderHandler

CreateNewHeader -

func (*BlockChainMock) GetCurrentBlockHeader

func (bc *BlockChainMock) GetCurrentBlockHeader() data.HeaderHandler

GetCurrentBlockHeader returns current block header pointer

func (*BlockChainMock) GetCurrentBlockHeaderHash

func (bc *BlockChainMock) GetCurrentBlockHeaderHash() []byte

GetCurrentBlockHeaderHash returns the current block header hash

func (*BlockChainMock) GetGenesisHeader

func (bc *BlockChainMock) GetGenesisHeader() data.HeaderHandler

GetGenesisHeader returns the genesis block header pointer

func (*BlockChainMock) GetGenesisHeaderHash

func (bc *BlockChainMock) GetGenesisHeaderHash() []byte

GetGenesisHeaderHash returns the genesis block header hash

func (*BlockChainMock) IsInterfaceNil

func (bc *BlockChainMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*BlockChainMock) SetCurrentBlockHeader

func (bc *BlockChainMock) SetCurrentBlockHeader(header data.HeaderHandler) error

SetCurrentBlockHeader sets current block header pointer

func (*BlockChainMock) SetCurrentBlockHeaderHash

func (bc *BlockChainMock) SetCurrentBlockHeaderHash(hash []byte)

SetCurrentBlockHeaderHash returns the current block header hash

func (*BlockChainMock) SetGenesisHeader

func (bc *BlockChainMock) SetGenesisHeader(genesisBlock data.HeaderHandler) error

SetGenesisHeader sets the genesis block header pointer

func (*BlockChainMock) SetGenesisHeaderHash

func (bc *BlockChainMock) SetGenesisHeaderHash(hash []byte)

SetGenesisHeaderHash sets the genesis block header hash

type BlockNotarizerHandlerMock

type BlockNotarizerHandlerMock struct {
	AddNotarizedHeaderCalled                 func(shardID uint32, notarizedHeader data.HeaderHandler, notarizedHeaderHash []byte)
	CleanupNotarizedHeadersBehindNonceCalled func(shardID uint32, nonce uint64)
	DisplayNotarizedHeadersCalled            func(shardID uint32, message string)
	GetFirstNotarizedHeaderCalled            func(shardID uint32) (data.HeaderHandler, []byte, error)
	GetLastNotarizedHeaderCalled             func(shardID uint32) (data.HeaderHandler, []byte, error)
	GetLastNotarizedHeaderNonceCalled        func(shardID uint32) uint64
	GetNotarizedHeaderCalled                 func(shardID uint32, offset uint64) (data.HeaderHandler, []byte, error)
	InitNotarizedHeadersCalled               func(startHeaders map[uint32]data.HeaderHandler) error
	RemoveLastNotarizedHeaderCalled          func()
	RestoreNotarizedHeadersToGenesisCalled   func()
}

BlockNotarizerHandlerMock -

func (*BlockNotarizerHandlerMock) AddNotarizedHeader

func (bngm *BlockNotarizerHandlerMock) AddNotarizedHeader(shardID uint32, notarizedHeader data.HeaderHandler, notarizedHeaderHash []byte)

AddNotarizedHeader -

func (*BlockNotarizerHandlerMock) CleanupNotarizedHeadersBehindNonce

func (bngm *BlockNotarizerHandlerMock) CleanupNotarizedHeadersBehindNonce(shardID uint32, nonce uint64)

CleanupNotarizedHeadersBehindNonce -

func (*BlockNotarizerHandlerMock) DisplayNotarizedHeaders

func (bngm *BlockNotarizerHandlerMock) DisplayNotarizedHeaders(shardID uint32, message string)

DisplayNotarizedHeaders -

func (*BlockNotarizerHandlerMock) GetFirstNotarizedHeader

func (bngm *BlockNotarizerHandlerMock) GetFirstNotarizedHeader(shardID uint32) (data.HeaderHandler, []byte, error)

GetFirstNotarizedHeader -

func (*BlockNotarizerHandlerMock) GetLastNotarizedHeader

func (bngm *BlockNotarizerHandlerMock) GetLastNotarizedHeader(shardID uint32) (data.HeaderHandler, []byte, error)

GetLastNotarizedHeader -

func (*BlockNotarizerHandlerMock) GetLastNotarizedHeaderNonce

func (bngm *BlockNotarizerHandlerMock) GetLastNotarizedHeaderNonce(shardID uint32) uint64

GetLastNotarizedHeaderNonce -

func (*BlockNotarizerHandlerMock) GetNotarizedHeader

func (bngm *BlockNotarizerHandlerMock) GetNotarizedHeader(shardID uint32, offset uint64) (data.HeaderHandler, []byte, error)

GetNotarizedHeader -

func (*BlockNotarizerHandlerMock) InitNotarizedHeaders

func (bngm *BlockNotarizerHandlerMock) InitNotarizedHeaders(startHeaders map[uint32]data.HeaderHandler) error

InitNotarizedHeaders -

func (*BlockNotarizerHandlerMock) IsInterfaceNil

func (bngm *BlockNotarizerHandlerMock) IsInterfaceNil() bool

IsInterfaceNil -

func (*BlockNotarizerHandlerMock) RemoveLastNotarizedHeader

func (bngm *BlockNotarizerHandlerMock) RemoveLastNotarizedHeader()

RemoveLastNotarizedHeader -

func (*BlockNotarizerHandlerMock) RestoreNotarizedHeadersToGenesis

func (bngm *BlockNotarizerHandlerMock) RestoreNotarizedHeadersToGenesis()

RestoreNotarizedHeadersToGenesis -

type BlockNotifierHandlerStub added in v1.1.1

type BlockNotifierHandlerStub struct {
	CallHandlersCalled             func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte)
	RegisterHandlerCalled          func(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte))
	GetNumRegisteredHandlersCalled func() int
}

BlockNotifierHandlerStub -

func (*BlockNotifierHandlerStub) CallHandlers added in v1.1.1

func (bnhs *BlockNotifierHandlerStub) CallHandlers(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte)

CallHandlers -

func (*BlockNotifierHandlerStub) GetNumRegisteredHandlers added in v1.1.1

func (bnhs *BlockNotifierHandlerStub) GetNumRegisteredHandlers() int

GetNumRegisteredHandlers -

func (*BlockNotifierHandlerStub) IsInterfaceNil added in v1.1.1

func (bnhs *BlockNotifierHandlerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*BlockNotifierHandlerStub) RegisterHandler added in v1.1.1

func (bnhs *BlockNotifierHandlerStub) RegisterHandler(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte))

RegisterHandler -

type BlockProcessorMock

type BlockProcessorMock struct {
	ProcessBlockCalled               func(header data.HeaderHandler, body data.BodyHandler, haveTime func() time.Duration) error
	CommitBlockCalled                func(header data.HeaderHandler, body data.BodyHandler) error
	RevertAccountStateCalled         func(header data.HeaderHandler)
	CreateGenesisBlockCalled         func(balances map[string]*big.Int) (data.HeaderHandler, error)
	CreateBlockCalled                func(initialHdrData data.HeaderHandler, haveTime func() bool) (data.HeaderHandler, data.BodyHandler, error)
	RestoreBlockIntoPoolsCalled      func(header data.HeaderHandler, body data.BodyHandler) error
	SetOnRequestTransactionCalled    func(f func(destShardID uint32, txHash []byte))
	MarshalizedDataToBroadcastCalled func(header data.HeaderHandler, body data.BodyHandler) (map[uint32][]byte, map[string][][]byte, error)
	DecodeBlockBodyCalled            func(dta []byte) data.BodyHandler
	DecodeBlockHeaderCalled          func(dta []byte) data.HeaderHandler
	AddLastNotarizedHdrCalled        func(shardId uint32, processedHdr data.HeaderHandler)
	CreateNewHeaderCalled            func(round uint64, nonce uint64) data.HeaderHandler
	PruneStateOnRollbackCalled       func(currHeader data.HeaderHandler, prevHeader data.HeaderHandler)
	RevertStateToBlockCalled         func(header data.HeaderHandler) error
	RevertIndexedBlockCalled         func(header data.HeaderHandler)
}

BlockProcessorMock -

func (*BlockProcessorMock) AddLastNotarizedHdr

func (bpm *BlockProcessorMock) AddLastNotarizedHdr(shardId uint32, processedHdr data.HeaderHandler)

AddLastNotarizedHdr -

func (*BlockProcessorMock) ApplyProcessedMiniBlocks

func (bpm *BlockProcessorMock) ApplyProcessedMiniBlocks(*processedMb.ProcessedMiniBlockTracker)

ApplyProcessedMiniBlocks -

func (*BlockProcessorMock) CommitBlock

func (bpm *BlockProcessorMock) CommitBlock(header data.HeaderHandler, body data.BodyHandler) error

CommitBlock -

func (*BlockProcessorMock) CreateBlock

func (bpm *BlockProcessorMock) CreateBlock(initialHdrData data.HeaderHandler, haveTime func() bool) (data.HeaderHandler, data.BodyHandler, error)

CreateBlock -

func (*BlockProcessorMock) CreateGenesisBlock

func (bpm *BlockProcessorMock) CreateGenesisBlock(balances map[string]*big.Int) (data.HeaderHandler, error)

CreateGenesisBlock -

func (*BlockProcessorMock) CreateNewHeader

func (bpm *BlockProcessorMock) CreateNewHeader(round uint64, nonce uint64) data.HeaderHandler

CreateNewHeader -

func (*BlockProcessorMock) DecodeBlockBody

func (bpm *BlockProcessorMock) DecodeBlockBody(dta []byte) data.BodyHandler

DecodeBlockBody -

func (*BlockProcessorMock) DecodeBlockHeader

func (bpm *BlockProcessorMock) DecodeBlockHeader(dta []byte) data.HeaderHandler

DecodeBlockHeader -

func (*BlockProcessorMock) IsInterfaceNil

func (bpm *BlockProcessorMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*BlockProcessorMock) MarshalizedDataToBroadcast

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

MarshalizedDataToBroadcast -

func (*BlockProcessorMock) ProcessBlock

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

ProcessBlock -

func (*BlockProcessorMock) PruneStateOnRollback

func (bpm *BlockProcessorMock) PruneStateOnRollback(currHeader data.HeaderHandler, prevHeader data.HeaderHandler)

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

func (*BlockProcessorMock) RestoreBlockIntoPools

func (bpm *BlockProcessorMock) RestoreBlockIntoPools(header data.HeaderHandler, body data.BodyHandler) error

RestoreBlockIntoPools -

func (*BlockProcessorMock) RestoreLastNotarizedHrdsToGenesis

func (bpm *BlockProcessorMock) RestoreLastNotarizedHrdsToGenesis()

RestoreLastNotarizedHrdsToGenesis -

func (*BlockProcessorMock) RevertAccountState

func (bpm *BlockProcessorMock) RevertAccountState(header data.HeaderHandler)

RevertAccountState -

func (*BlockProcessorMock) RevertIndexedBlock added in v1.1.6

func (bpm *BlockProcessorMock) RevertIndexedBlock(header data.HeaderHandler)

RevertIndexedBlock -

func (*BlockProcessorMock) RevertStateToBlock

func (bpm *BlockProcessorMock) RevertStateToBlock(header data.HeaderHandler) error

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

func (*BlockProcessorMock) SetNumProcessedObj

func (bpm *BlockProcessorMock) SetNumProcessedObj(_ uint64)

SetNumProcessedObj -

type BlockSizeComputationStub

type BlockSizeComputationStub struct {
	InitCalled                                 func()
	AddNumMiniBlocksCalled                     func(int)
	AddNumTxsCalled                            func(int)
	IsMaxBlockSizeReachedCalled                func(int, int) bool
	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 added in v1.0.103

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

IsMaxBlockSizeWithoutThrottleReached -

type BlockSizeThrottlerStub

type BlockSizeThrottlerStub struct {
	GetCurrentMaxSizeCalled     func() uint32
	AddCalled                   func(round uint64, size uint32)
	SucceedCalled               func(round uint64)
	ComputeCurrentMaxSizeCalled func()
}

BlockSizeThrottlerStub -

func (*BlockSizeThrottlerStub) Add

func (bsts *BlockSizeThrottlerStub) Add(round uint64, size uint32)

Add -

func (*BlockSizeThrottlerStub) ComputeCurrentMaxSize

func (bsts *BlockSizeThrottlerStub) ComputeCurrentMaxSize()

ComputeCurrentMaxSize -

func (*BlockSizeThrottlerStub) GetCurrentMaxSize

func (bsts *BlockSizeThrottlerStub) GetCurrentMaxSize() uint32

GetCurrentMaxSize -

func (*BlockSizeThrottlerStub) IsInterfaceNil

func (bsts *BlockSizeThrottlerStub) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*BlockSizeThrottlerStub) Succeed

func (bsts *BlockSizeThrottlerStub) Succeed(round uint64)

Succeed -

type BlockTrackerHandlerMock

type BlockTrackerHandlerMock struct {
	GetSelfHeadersCalled          func(headerHandler data.HeaderHandler) []*track.HeaderInfo
	ComputeCrossInfoCalled        func(headers []data.HeaderHandler)
	ComputeLongestSelfChainCalled func() (data.HeaderHandler, []byte, []data.HeaderHandler, [][]byte)
	SortHeadersFromNonceCalled    func(shardID uint32, nonce uint64) ([]data.HeaderHandler, [][]byte)
	AddHeaderFromPoolCalled       func(shardID uint32, nonce uint64)
}

BlockTrackerHandlerMock -

func (*BlockTrackerHandlerMock) AddHeaderFromPool added in v1.1.2

func (bthm *BlockTrackerHandlerMock) AddHeaderFromPool(shardID uint32, nonce uint64)

AddHeaderFromPool -

func (*BlockTrackerHandlerMock) ComputeCrossInfo added in v1.0.104

func (bthm *BlockTrackerHandlerMock) ComputeCrossInfo(headers []data.HeaderHandler)

ComputeCrossInfo -

func (*BlockTrackerHandlerMock) ComputeLongestSelfChain

func (bthm *BlockTrackerHandlerMock) ComputeLongestSelfChain() (data.HeaderHandler, []byte, []data.HeaderHandler, [][]byte)

ComputeLongestSelfChain -

func (*BlockTrackerHandlerMock) GetSelfHeaders

func (bthm *BlockTrackerHandlerMock) GetSelfHeaders(headerHandler data.HeaderHandler) []*track.HeaderInfo

GetSelfHeaders -

func (*BlockTrackerHandlerMock) IsInterfaceNil

func (bthm *BlockTrackerHandlerMock) IsInterfaceNil() bool

IsInterfaceNil -

func (*BlockTrackerHandlerMock) SortHeadersFromNonce

func (bthm *BlockTrackerHandlerMock) SortHeadersFromNonce(shardID uint32, nonce uint64) ([]data.HeaderHandler, [][]byte)

SortHeadersFromNonce -

type BlockTrackerMock

type BlockTrackerMock struct {
	AddTrackedHeaderCalled                             func(header data.HeaderHandler, hash []byte)
	AddCrossNotarizedHeaderCalled                      func(shardID uint32, crossNotarizedHeader data.HeaderHandler, crossNotarizedHeaderHash []byte)
	AddSelfNotarizedHeaderCalled                       func(shardID uint32, selfNotarizedHeader data.HeaderHandler, selfNotarizedHeaderHash []byte)
	CheckBlockAgainstFinalCalled                       func(headerHandler data.HeaderHandler) error
	CheckBlockAgainstRounderCalled                     func(headerHandler data.HeaderHandler) error
	CheckBlockAgainstWhitelistCalled                   func(interceptedData process.InterceptedData) bool
	CleanupHeadersBehindNonceCalled                    func(shardID uint32, selfNotarizedNonce uint64, crossNotarizedNonce uint64)
	ComputeLongestChainCalled                          func(shardID uint32, header data.HeaderHandler) ([]data.HeaderHandler, [][]byte)
	ComputeLongestMetaChainFromLastNotarizedCalled     func() ([]data.HeaderHandler, [][]byte, error)
	ComputeLongestShardsChainsFromLastNotarizedCalled  func() ([]data.HeaderHandler, [][]byte, map[uint32][]data.HeaderHandler, error)
	DisplayTrackedHeadersCalled                        func()
	GetCrossNotarizedHeaderCalled                      func(shardID uint32, offset uint64) (data.HeaderHandler, []byte, error)
	GetLastCrossNotarizedHeaderCalled                  func(shardID uint32) (data.HeaderHandler, []byte, error)
	GetLastCrossNotarizedHeadersForAllShardsCalled     func() (map[uint32]data.HeaderHandler, error)
	GetLastSelfNotarizedHeaderCalled                   func(shardID uint32) (data.HeaderHandler, []byte, error)
	GetSelfNotarizedHeaderCalled                       func(shardID uint32, offset uint64) (data.HeaderHandler, []byte, error)
	GetTrackedHeadersCalled                            func(shardID uint32) ([]data.HeaderHandler, [][]byte)
	GetTrackedHeadersForAllShardsCalled                func() map[uint32][]data.HeaderHandler
	GetTrackedHeadersWithNonceCalled                   func(shardID uint32, nonce uint64) ([]data.HeaderHandler, [][]byte)
	IsShardStuckCalled                                 func(shardId uint32) bool
	RegisterCrossNotarizedHeadersHandlerCalled         func(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte))
	RegisterSelfNotarizedFromCrossHeadersHandlerCalled func(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte))
	RegisterSelfNotarizedHeadersHandlerCalled          func(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte))
	RegisterFinalMetachainHeadersHandlerCalled         func(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte))
	RemoveLastNotarizedHeadersCalled                   func()
	RestoreToGenesisCalled                             func()
	ShouldAddHeaderCalled                              func(headerHandler data.HeaderHandler) bool
	// contains filtered or unexported fields
}

BlockTrackerMock -

func NewBlockTrackerMock

func NewBlockTrackerMock(shardCoordinator sharding.Coordinator, startHeaders map[uint32]data.HeaderHandler) *BlockTrackerMock

NewBlockTrackerMock -

func (*BlockTrackerMock) AddCrossNotarizedHeader

func (btm *BlockTrackerMock) AddCrossNotarizedHeader(shardID uint32, crossNotarizedHeader data.HeaderHandler, crossNotarizedHeaderHash []byte)

AddCrossNotarizedHeader -

func (*BlockTrackerMock) AddSelfNotarizedHeader

func (btm *BlockTrackerMock) AddSelfNotarizedHeader(shardID uint32, selfNotarizedHeader data.HeaderHandler, selfNotarizedHeaderHash []byte)

AddSelfNotarizedHeader -

func (*BlockTrackerMock) AddTrackedHeader

func (btm *BlockTrackerMock) AddTrackedHeader(header data.HeaderHandler, hash []byte)

AddTrackedHeader -

func (*BlockTrackerMock) CheckBlockAgainstFinal

func (btm *BlockTrackerMock) CheckBlockAgainstFinal(headerHandler data.HeaderHandler) error

CheckBlockAgainstFinal -

func (*BlockTrackerMock) CheckBlockAgainstRounder

func (btm *BlockTrackerMock) CheckBlockAgainstRounder(headerHandler data.HeaderHandler) error

CheckBlockAgainstRounder -

func (*BlockTrackerMock) CheckBlockAgainstWhitelist added in v1.0.138

func (btm *BlockTrackerMock) CheckBlockAgainstWhitelist(interceptedData process.InterceptedData) bool

CheckBlockAgainstWhitelist -

func (*BlockTrackerMock) CleanupHeadersBehindNonce

func (btm *BlockTrackerMock) CleanupHeadersBehindNonce(shardID uint32, selfNotarizedNonce uint64, crossNotarizedNonce uint64)

CleanupHeadersBehindNonce -

func (*BlockTrackerMock) CleanupInvalidCrossHeaders

func (btm *BlockTrackerMock) CleanupInvalidCrossHeaders(_ uint32, _ uint64)

CleanupInvalidCrossHeaders -

func (*BlockTrackerMock) ComputeLongestChain

func (btm *BlockTrackerMock) ComputeLongestChain(shardID uint32, header data.HeaderHandler) ([]data.HeaderHandler, [][]byte)

ComputeLongestChain -

func (*BlockTrackerMock) ComputeLongestMetaChainFromLastNotarized

func (btm *BlockTrackerMock) ComputeLongestMetaChainFromLastNotarized() ([]data.HeaderHandler, [][]byte, error)

ComputeLongestMetaChainFromLastNotarized -

func (*BlockTrackerMock) ComputeLongestShardsChainsFromLastNotarized

func (btm *BlockTrackerMock) ComputeLongestShardsChainsFromLastNotarized() ([]data.HeaderHandler, [][]byte, map[uint32][]data.HeaderHandler, error)

ComputeLongestShardsChainsFromLastNotarized -

func (*BlockTrackerMock) DisplayTrackedHeaders

func (btm *BlockTrackerMock) DisplayTrackedHeaders()

DisplayTrackedHeaders -

func (*BlockTrackerMock) GetCrossNotarizedHeader

func (btm *BlockTrackerMock) GetCrossNotarizedHeader(shardID uint32, offset uint64) (data.HeaderHandler, []byte, error)

GetCrossNotarizedHeader -

func (*BlockTrackerMock) GetLastCrossNotarizedHeader

func (btm *BlockTrackerMock) GetLastCrossNotarizedHeader(shardID uint32) (data.HeaderHandler, []byte, error)

GetLastCrossNotarizedHeader -

func (*BlockTrackerMock) GetLastCrossNotarizedHeadersForAllShards

func (btm *BlockTrackerMock) GetLastCrossNotarizedHeadersForAllShards() (map[uint32]data.HeaderHandler, error)

GetLastCrossNotarizedHeadersForAllShards -

func (*BlockTrackerMock) GetLastSelfNotarizedHeader

func (btm *BlockTrackerMock) GetLastSelfNotarizedHeader(shardID uint32) (data.HeaderHandler, []byte, error)

GetLastSelfNotarizedHeader -

func (*BlockTrackerMock) GetSelfNotarizedHeader added in v1.0.104

func (btm *BlockTrackerMock) GetSelfNotarizedHeader(shardID uint32, offset uint64) (data.HeaderHandler, []byte, error)

GetSelfNotarizedHeader -

func (*BlockTrackerMock) GetTrackedHeaders

func (btm *BlockTrackerMock) GetTrackedHeaders(shardID uint32) ([]data.HeaderHandler, [][]byte)

GetTrackedHeaders -

func (*BlockTrackerMock) GetTrackedHeadersForAllShards

func (btm *BlockTrackerMock) GetTrackedHeadersForAllShards() map[uint32][]data.HeaderHandler

GetTrackedHeadersForAllShards -

func (*BlockTrackerMock) GetTrackedHeadersWithNonce

func (btm *BlockTrackerMock) GetTrackedHeadersWithNonce(shardID uint32, nonce uint64) ([]data.HeaderHandler, [][]byte)

GetTrackedHeadersWithNonce -

func (*BlockTrackerMock) InitNotarizedHeaders

func (btm *BlockTrackerMock) InitNotarizedHeaders(startHeaders map[uint32]data.HeaderHandler) error

InitNotarizedHeaders -

func (*BlockTrackerMock) IsInterfaceNil

func (btm *BlockTrackerMock) IsInterfaceNil() bool

IsInterfaceNil -

func (*BlockTrackerMock) IsShardStuck

func (btm *BlockTrackerMock) IsShardStuck(shardId uint32) bool

IsShardStuck -

func (*BlockTrackerMock) RegisterCrossNotarizedHeadersHandler

func (btm *BlockTrackerMock) RegisterCrossNotarizedHeadersHandler(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte))

RegisterCrossNotarizedHeadersHandler -

func (*BlockTrackerMock) RegisterFinalMetachainHeadersHandler added in v1.1.1

func (btm *BlockTrackerMock) RegisterFinalMetachainHeadersHandler(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte))

RegisterFinalMetachainHeadersHandler -

func (*BlockTrackerMock) RegisterSelfNotarizedFromCrossHeadersHandler added in v1.1.1

func (btm *BlockTrackerMock) RegisterSelfNotarizedFromCrossHeadersHandler(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte))

RegisterSelfNotarizedFromCrossHeadersHandler -

func (*BlockTrackerMock) RegisterSelfNotarizedHeadersHandler

func (btm *BlockTrackerMock) RegisterSelfNotarizedHeadersHandler(handler func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte))

RegisterSelfNotarizedHeadersHandler -

func (*BlockTrackerMock) RemoveLastNotarizedHeaders

func (btm *BlockTrackerMock) RemoveLastNotarizedHeaders()

RemoveLastNotarizedHeaders -

func (*BlockTrackerMock) RestoreToGenesis

func (btm *BlockTrackerMock) RestoreToGenesis()

RestoreToGenesis -

func (*BlockTrackerMock) ShouldAddHeader

func (btm *BlockTrackerMock) ShouldAddHeader(headerHandler data.HeaderHandler) bool

ShouldAddHeader -

type BoostrapStorerMock

type BoostrapStorerMock struct {
	PutCalled             func(round int64, bootData bootstrapStorage.BootstrapData) error
	GetCalled             func(round int64) (bootstrapStorage.BootstrapData, error)
	GetHighestRoundCalled func() int64
}

BoostrapStorerMock -

func (*BoostrapStorerMock) Get

Get -

func (*BoostrapStorerMock) GetHighestRound

func (bsm *BoostrapStorerMock) GetHighestRound() int64

GetHighestRound -

func (*BoostrapStorerMock) IsInterfaceNil

func (bsm *BoostrapStorerMock) IsInterfaceNil() bool

IsInterfaceNil -

func (*BoostrapStorerMock) Put

func (bsm *BoostrapStorerMock) Put(round int64, bootData bootstrapStorage.BootstrapData) error

Put -

func (*BoostrapStorerMock) SaveLastRound

func (bsm *BoostrapStorerMock) SaveLastRound(_ int64) error

SaveLastRound -

type BuiltInCostHandlerStub added in v1.1.46

type BuiltInCostHandlerStub struct {
}

BuiltInCostHandlerStub -

func (*BuiltInCostHandlerStub) ComputeBuiltInCost added in v1.1.46

ComputeBuiltInCost -

func (*BuiltInCostHandlerStub) IsBuiltInFuncCall added in v1.1.46

IsBuiltInFuncCall -

func (*BuiltInCostHandlerStub) IsInterfaceNil added in v1.1.46

func (b *BuiltInCostHandlerStub) IsInterfaceNil() bool

IsInterfaceNil -

type BuiltInFunctionStub added in v1.0.103

type BuiltInFunctionStub struct {
	ProcessBuiltinFunctionCalled func(acntSnd, acntDst state.UserAccountHandler, vmInput *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error)
	SetNewGasConfigCalled        func(gasCost *process.GasCost)
}

BuiltInFunctionStub -

func (*BuiltInFunctionStub) IsInterfaceNil added in v1.0.103

func (b *BuiltInFunctionStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*BuiltInFunctionStub) ProcessBuiltinFunction added in v1.0.103

func (b *BuiltInFunctionStub) ProcessBuiltinFunction(acntSnd, acntDst state.UserAccountHandler, vmInput *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error)

ProcessBuiltinFunction -

func (*BuiltInFunctionStub) SetNewGasConfig added in v1.1.12

func (b *BuiltInFunctionStub) SetNewGasConfig(gasCost *process.GasCost)

SetNewGasConfig -

type ChainStorerMock

type ChainStorerMock struct {
	AddStorerCalled func(key dataRetriever.UnitType, s storage.Storer)
	GetStorerCalled func(unitType dataRetriever.UnitType) storage.Storer
	HasCalled       func(unitType dataRetriever.UnitType, key []byte) error
	GetCalled       func(unitType dataRetriever.UnitType, key []byte) ([]byte, error)
	PutCalled       func(unitType dataRetriever.UnitType, key []byte, value []byte) error
	GetAllCalled    func(unitType dataRetriever.UnitType, keys [][]byte) (map[string][]byte, error)
	DestroyCalled   func() error
	CloseAllCalled  func() error
}

ChainStorerMock is a mock implementation of the ChainStorer interface

func (*ChainStorerMock) AddStorer

func (csm *ChainStorerMock) AddStorer(key dataRetriever.UnitType, s storage.Storer)

AddStorer will add a new storer to the chain map

func (*ChainStorerMock) CloseAll

func (csm *ChainStorerMock) CloseAll() error

CloseAll -

func (*ChainStorerMock) Destroy

func (csm *ChainStorerMock) Destroy() error

Destroy removes the underlying files/resources used by the storage service

func (*ChainStorerMock) Get

func (csm *ChainStorerMock) Get(unitType dataRetriever.UnitType, key []byte) ([]byte, error)

Get returns the value for the given key if found in the selected storage unit, nil otherwise. It can return an error if the provided unit type is not supported or if the storage unit underlying implementation reports an error

func (*ChainStorerMock) GetAll

func (csm *ChainStorerMock) GetAll(unitType dataRetriever.UnitType, keys [][]byte) (map[string][]byte, error)

GetAll gets all the elements with keys in the keys array, from the selected storage unit It can report an error if the provided unit type is not supported, if there is a missing key in the unit, or if the underlying implementation of the storage unit reports an error.

func (*ChainStorerMock) GetStorer

func (csm *ChainStorerMock) GetStorer(unitType dataRetriever.UnitType) storage.Storer

GetStorer returns the storer from the chain map or nil if the storer was not found

func (*ChainStorerMock) Has

func (csm *ChainStorerMock) Has(unitType dataRetriever.UnitType, key []byte) error

Has returns true if the key is found in the selected Unit or false otherwise It can return an error if the provided unit type is not supported or if the underlying implementation of the storage unit reports an error.

func (*ChainStorerMock) IsInterfaceNil

func (csm *ChainStorerMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*ChainStorerMock) Put

func (csm *ChainStorerMock) Put(unitType dataRetriever.UnitType, key []byte, value []byte) error

Put stores the key, value pair in the selected storage unit It can return an error if the provided unit type is not supported or if the storage unit underlying implementation reports an error

func (*ChainStorerMock) SetEpochForPutOperation added in v1.0.109

func (csm *ChainStorerMock) SetEpochForPutOperation(_ uint32)

SetEpochForPutOperation won't do anything

type CoordinatorStub

type CoordinatorStub struct {
	NumberOfShardsCalled          func() uint32
	ComputeIdCalled               func(address []byte) uint32
	SelfIdCalled                  func() uint32
	SameShardCalled               func(firstAddress, secondAddress []byte) bool
	CommunicationIdentifierCalled func(destShardID uint32) string
}

CoordinatorStub -

func (*CoordinatorStub) CommunicationIdentifier

func (coordinator *CoordinatorStub) CommunicationIdentifier(destShardID uint32) string

CommunicationIdentifier -

func (*CoordinatorStub) ComputeId

func (coordinator *CoordinatorStub) ComputeId(address []byte) uint32

ComputeId -

func (*CoordinatorStub) IsInterfaceNil

func (coordinator *CoordinatorStub) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*CoordinatorStub) NumberOfShards

func (coordinator *CoordinatorStub) NumberOfShards() uint32

NumberOfShards -

func (*CoordinatorStub) SameShard

func (coordinator *CoordinatorStub) SameShard(firstAddress, secondAddress []byte) bool

SameShard -

func (*CoordinatorStub) SelfId

func (coordinator *CoordinatorStub) SelfId() uint32

SelfId -

type DataTrieTrackerStub

type DataTrieTrackerStub struct {
	ClearDataCachesCalled func()
	DirtyDataCalled       func() map[string][]byte
	RetrieveValueCalled   func(key []byte) ([]byte, error)
	SaveKeyValueCalled    func(key []byte, value []byte) error
	SetDataTrieCalled     func(tr data.Trie)
	DataTrieCalled        func() data.Trie
}

DataTrieTrackerStub -

func (*DataTrieTrackerStub) ClearDataCaches

func (dtts *DataTrieTrackerStub) ClearDataCaches()

ClearDataCaches -

func (*DataTrieTrackerStub) DataTrie

func (dtts *DataTrieTrackerStub) DataTrie() data.Trie

DataTrie -

func (*DataTrieTrackerStub) DirtyData

func (dtts *DataTrieTrackerStub) DirtyData() map[string][]byte

DirtyData -

func (*DataTrieTrackerStub) IsInterfaceNil

func (dtts *DataTrieTrackerStub) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*DataTrieTrackerStub) RetrieveValue

func (dtts *DataTrieTrackerStub) RetrieveValue(key []byte) ([]byte, error)

RetrieveValue -

func (*DataTrieTrackerStub) SaveKeyValue

func (dtts *DataTrieTrackerStub) SaveKeyValue(key []byte, value []byte) error

SaveKeyValue -

func (*DataTrieTrackerStub) SetDataTrie

func (dtts *DataTrieTrackerStub) SetDataTrie(tr data.Trie)

SetDataTrie -

type ESDTRoleHandlerStub added in v1.1.39

type ESDTRoleHandlerStub struct {
	CheckAllowedToExecuteCalled func(account state.UserAccountHandler, tokenID []byte, action []byte) error
}

ESDTRoleHandlerStub -

func (*ESDTRoleHandlerStub) CheckAllowedToExecute added in v1.1.39

func (e *ESDTRoleHandlerStub) CheckAllowedToExecute(account state.UserAccountHandler, tokenID []byte, action []byte) error

CheckAllowedToExecute -

func (*ESDTRoleHandlerStub) IsInterfaceNil added in v1.1.39

func (e *ESDTRoleHandlerStub) IsInterfaceNil() bool

IsInterfaceNil -

type EpochEconomicsStub

type EpochEconomicsStub struct {
	ComputeEndOfEpochEconomicsCalled func(metaBlock *block.MetaBlock) (*block.Economics, error)
	VerifyRewardsPerBlockCalled      func(
		metaBlock *block.MetaBlock, correctedProtocolSustainability *big.Int, computedEconomics *block.Economics,
	) error
}

EpochEconomicsStub -

func (*EpochEconomicsStub) ComputeEndOfEpochEconomics

func (e *EpochEconomicsStub) ComputeEndOfEpochEconomics(metaBlock *block.MetaBlock) (*block.Economics, error)

ComputeEndOfEpochEconomics -

func (*EpochEconomicsStub) IsInterfaceNil

func (e *EpochEconomicsStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*EpochEconomicsStub) VerifyRewardsPerBlock

func (e *EpochEconomicsStub) VerifyRewardsPerBlock(
	metaBlock *block.MetaBlock,
	correctedProtocolSustainability *big.Int,
	computedEconomics *block.Economics,
) error

VerifyRewardsPerBlock -

type EpochNotifierStub added in v1.1.1

type EpochNotifierStub struct {
	CheckEpochCalled            func(epoch uint32)
	CurrentEpochCalled          func() uint32
	RegisterNotifyHandlerCalled func(handler core.EpochSubscriberHandler)
}

EpochNotifierStub -

func (*EpochNotifierStub) CheckEpoch added in v1.1.1

func (ens *EpochNotifierStub) CheckEpoch(epoch uint32)

CheckEpoch -

func (*EpochNotifierStub) CurrentEpoch added in v1.1.1

func (ens *EpochNotifierStub) CurrentEpoch() uint32

CurrentEpoch -

func (*EpochNotifierStub) IsInterfaceNil added in v1.1.1

func (ens *EpochNotifierStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*EpochNotifierStub) RegisterNotifyHandler added in v1.1.1

func (ens *EpochNotifierStub) RegisterNotifyHandler(handler core.EpochSubscriberHandler)

RegisterNotifyHandler -

type EpochRewardsCreatorStub

type EpochRewardsCreatorStub struct {
	CreateRewardsMiniBlocksCalled func(
		metaBlock *block.MetaBlock, validatorsInfo map[uint32][]*state.ValidatorInfo, computedEconomics *block.Economics,
	) (block.MiniBlockSlice, error)
	VerifyRewardsMiniBlocksCalled func(
		metaBlock *block.MetaBlock, validatorsInfo map[uint32][]*state.ValidatorInfo, computedEconomics *block.Economics,
	) error
	CreateMarshalizedDataCalled    func(body *block.Body) map[string][][]byte
	SaveTxBlockToStorageCalled     func(metaBlock *block.MetaBlock, body *block.Body)
	DeleteTxsFromStorageCalled     func(metaBlock *block.MetaBlock, body *block.Body)
	RemoveBlockDataFromPoolsCalled func(metaBlock *block.MetaBlock, body *block.Body)
	GetRewardsTxsCalled            func(body *block.Body) map[string]data.TransactionHandler
	GetProtocolSustainCalled       func() *big.Int
	GetLocalTxCacheCalled          func() epochStart.TransactionCacher
}

EpochRewardsCreatorStub -

func (*EpochRewardsCreatorStub) CreateMarshalizedData

func (e *EpochRewardsCreatorStub) CreateMarshalizedData(body *block.Body) map[string][][]byte

CreateMarshalizedData -

func (*EpochRewardsCreatorStub) CreateRewardsMiniBlocks

func (e *EpochRewardsCreatorStub) CreateRewardsMiniBlocks(
	metaBlock *block.MetaBlock,
	validatorsInfo map[uint32][]*state.ValidatorInfo,
	computedEconomics *block.Economics,
) (block.MiniBlockSlice, error)

CreateRewardsMiniBlocks -

func (*EpochRewardsCreatorStub) DeleteTxsFromStorage

func (e *EpochRewardsCreatorStub) DeleteTxsFromStorage(metaBlock *block.MetaBlock, body *block.Body)

DeleteTxsFromStorage -

func (*EpochRewardsCreatorStub) GetLocalTxCache added in v1.1.15

GetLocalTxCache -

func (*EpochRewardsCreatorStub) GetProtocolSustainabilityRewards added in v1.0.147

func (e *EpochRewardsCreatorStub) GetProtocolSustainabilityRewards() *big.Int

GetProtocolSustainabilityRewards -

func (*EpochRewardsCreatorStub) GetRewardsTxs added in v1.0.102

func (e *EpochRewardsCreatorStub) GetRewardsTxs(body *block.Body) map[string]data.TransactionHandler

GetRewardsTxs --

func (*EpochRewardsCreatorStub) IsInterfaceNil

func (e *EpochRewardsCreatorStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*EpochRewardsCreatorStub) RemoveBlockDataFromPools added in v0.0.5

func (e *EpochRewardsCreatorStub) RemoveBlockDataFromPools(metaBlock *block.MetaBlock, body *block.Body)

RemoveBlockDataFromPools -

func (*EpochRewardsCreatorStub) SaveTxBlockToStorage

func (e *EpochRewardsCreatorStub) SaveTxBlockToStorage(metaBlock *block.MetaBlock, body *block.Body)

SaveTxBlockToStorage -

func (*EpochRewardsCreatorStub) VerifyRewardsMiniBlocks

func (e *EpochRewardsCreatorStub) VerifyRewardsMiniBlocks(
	metaBlock *block.MetaBlock,
	validatorsInfo map[uint32][]*state.ValidatorInfo,
	computedEconomics *block.Economics,
) error

VerifyRewardsMiniBlocks -

type EpochStartDataCreatorStub

type EpochStartDataCreatorStub struct {
	CreateEpochStartDataCalled             func() (*block.EpochStart, error)
	VerifyEpochStartDataForMetablockCalled func(metaBlock *block.MetaBlock) error
}

EpochStartDataCreatorStub -

func (*EpochStartDataCreatorStub) CreateEpochStartData

func (e *EpochStartDataCreatorStub) CreateEpochStartData() (*block.EpochStart, error)

CreateEpochStartData -

func (*EpochStartDataCreatorStub) IsInterfaceNil

func (e *EpochStartDataCreatorStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*EpochStartDataCreatorStub) VerifyEpochStartDataForMetablock

func (e *EpochStartDataCreatorStub) VerifyEpochStartDataForMetablock(metaBlock *block.MetaBlock) error

VerifyEpochStartDataForMetablock -

type EpochStartNotifierStub added in v1.0.117

type EpochStartNotifierStub struct {
	RegisterHandlerCalled   func(handler epochStart.ActionHandler)
	UnregisterHandlerCalled func(handler epochStart.ActionHandler)
	NotifyAllCalled         func(hdr data.HeaderHandler)
	NotifyAllPrepareCalled  func(hdr data.HeaderHandler, body data.BodyHandler)
	// contains filtered or unexported fields
}

EpochStartNotifierStub -

func (*EpochStartNotifierStub) IsInterfaceNil added in v1.0.117

func (esnm *EpochStartNotifierStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*EpochStartNotifierStub) NotifyAll added in v1.0.117

func (esnm *EpochStartNotifierStub) NotifyAll(hdr data.HeaderHandler)

NotifyAll -

func (*EpochStartNotifierStub) NotifyAllPrepare added in v1.0.117

func (esnm *EpochStartNotifierStub) NotifyAllPrepare(metaHdr data.HeaderHandler, body data.BodyHandler)

NotifyAllPrepare -

func (*EpochStartNotifierStub) RegisterHandler added in v1.0.117

func (esnm *EpochStartNotifierStub) RegisterHandler(handler epochStart.ActionHandler)

RegisterHandler -

func (*EpochStartNotifierStub) UnregisterHandler added in v1.0.117

func (esnm *EpochStartNotifierStub) UnregisterHandler(handler epochStart.ActionHandler)

UnregisterHandler -

type EpochStartSystemSCStub added in v1.1.1

type EpochStartSystemSCStub struct {
	ProcessSystemSmartContractCalled func(validatorInfos map[uint32][]*state.ValidatorInfo, nonce uint64, epoch uint32) error
	ProcessDelegationRewardsCalled   func(miniBlocks block.MiniBlockSlice, txCache epochStart.TransactionCacher) error
	ToggleUnStakeUnBondCalled        func(value bool) error
}

EpochStartSystemSCStub -

func (*EpochStartSystemSCStub) IsInterfaceNil added in v1.1.1

func (e *EpochStartSystemSCStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*EpochStartSystemSCStub) ProcessDelegationRewards added in v1.1.15

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

ProcessDelegationRewards -

func (*EpochStartSystemSCStub) ProcessSystemSmartContract added in v1.1.1

func (e *EpochStartSystemSCStub) ProcessSystemSmartContract(validatorInfos map[uint32][]*state.ValidatorInfo, nonce uint64, epoch uint32) error

ProcessSystemSmartContract -

func (*EpochStartSystemSCStub) ToggleUnStakeUnBond added in v1.1.15

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

ToggleUnStakeUnBond -

type EpochStartTriggerStub

type EpochStartTriggerStub struct {
	ForceEpochStartCalled             func() error
	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 added in v1.0.116

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() error

ForceEpochStart -

func (*EpochStartTriggerStub) GetSavedStateKey

func (e *EpochStartTriggerStub) GetSavedStateKey() []byte

GetSavedStateKey -

func (*EpochStartTriggerStub) IsEpochStart

func (e *EpochStartTriggerStub) IsEpochStart() bool

IsEpochStart -

func (*EpochStartTriggerStub) IsInterfaceNil

func (e *EpochStartTriggerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*EpochStartTriggerStub) LoadState

func (e *EpochStartTriggerStub) LoadState(_ []byte) error

LoadState -

func (*EpochStartTriggerStub) MetaEpoch added in v1.0.104

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 added in v0.0.5

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

type EpochValidatorInfoCreatorStub struct {
	CreateValidatorInfoMiniBlocksCalled func(validatorsInfo map[uint32][]*state.ValidatorInfo) (block.MiniBlockSlice, error)
	VerifyValidatorInfoMiniBlocksCalled func(miniblocks []*block.MiniBlock, validatorsInfo map[uint32][]*state.ValidatorInfo) error
	CreateMarshalizedDataCalled         func(body block.Body) map[string][][]byte
	SaveTxBlockToStorageCalled          func(metaBlock *block.MetaBlock, body *block.Body)
	DeleteTxsFromStorageCalled          func(metaBlock *block.MetaBlock)
	RemoveBlockDataFromPoolsCalled      func(metaBlock *block.MetaBlock, body *block.Body)
}

EpochValidatorInfoCreatorStub -

func (*EpochValidatorInfoCreatorStub) CreateValidatorInfoMiniBlocks

func (e *EpochValidatorInfoCreatorStub) CreateValidatorInfoMiniBlocks(validatorInfo map[uint32][]*state.ValidatorInfo) (block.MiniBlockSlice, error)

CreateValidatorInfoMiniBlocks -

func (*EpochValidatorInfoCreatorStub) DeleteValidatorInfoBlocksFromStorage

func (e *EpochValidatorInfoCreatorStub) DeleteValidatorInfoBlocksFromStorage(metaBlock *block.MetaBlock)

DeleteValidatorInfoBlocksFromStorage -

func (*EpochValidatorInfoCreatorStub) IsInterfaceNil

func (e *EpochValidatorInfoCreatorStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*EpochValidatorInfoCreatorStub) RemoveBlockDataFromPools added in v0.0.5

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

RemoveBlockDataFromPools -

func (*EpochValidatorInfoCreatorStub) SaveValidatorInfoBlocksToStorage

func (e *EpochValidatorInfoCreatorStub) SaveValidatorInfoBlocksToStorage(metaBlock *block.MetaBlock, body *block.Body)

SaveValidatorInfoBlocksToStorage -

func (*EpochValidatorInfoCreatorStub) VerifyValidatorInfoMiniBlocks

func (e *EpochValidatorInfoCreatorStub) VerifyValidatorInfoMiniBlocks(miniblocks []*block.MiniBlock, validatorsInfo map[uint32][]*state.ValidatorInfo) error

VerifyValidatorInfoMiniBlocks -

type FeeAccumulatorStub

type FeeAccumulatorStub struct {
	CreateBlockStartedCalled    func()
	GetAccumulatedFeesCalled    func() *big.Int
	GetDeveloperFeesCalled      func() *big.Int
	ProcessTransactionFeeCalled func(cost *big.Int, devFee *big.Int, hash []byte)
	RevertFeesCalled            func(txHashes [][]byte)
}

FeeAccumulatorStub is a stub which implements TransactionFeeHandler interface

func (*FeeAccumulatorStub) CreateBlockStarted

func (f *FeeAccumulatorStub) CreateBlockStarted()

CreateBlockStarted -

func (*FeeAccumulatorStub) GetAccumulatedFees

func (f *FeeAccumulatorStub) GetAccumulatedFees() *big.Int

GetAccumulatedFees -

func (*FeeAccumulatorStub) GetDeveloperFees added in v1.0.114

func (f *FeeAccumulatorStub) GetDeveloperFees() *big.Int

GetDeveloperFees -

func (*FeeAccumulatorStub) IsInterfaceNil

func (f *FeeAccumulatorStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*FeeAccumulatorStub) ProcessTransactionFee

func (f *FeeAccumulatorStub) ProcessTransactionFee(cost *big.Int, devFee *big.Int, txHash []byte)

ProcessTransactionFee -

func (*FeeAccumulatorStub) RevertFees

func (f *FeeAccumulatorStub) RevertFees(txHashes [][]byte)

RevertFees -

type FeeHandlerStub

type FeeHandlerStub struct {
	SetMaxGasLimitPerBlockCalled  func(maxGasLimitPerBlock uint64)
	SetMinGasPriceCalled          func(minGasPrice uint64)
	SetMinGasLimitCalled          func(minGasLimit uint64)
	MaxGasLimitPerBlockCalled     func() uint64
	ComputeGasLimitCalled         func(tx process.TransactionWithFeeHandler) uint64
	ComputeMoveBalanceFeeCalled   func(tx process.TransactionWithFeeHandler) *big.Int
	ComputeTxFeeCalled            func(tx process.TransactionWithFeeHandler) *big.Int
	CheckValidityTxValuesCalled   func(tx process.TransactionWithFeeHandler) error
	DeveloperPercentageCalled     func() float64
	MinGasPriceCalled             func() uint64
	GasPriceModifierCalled        func() float64
	ComputeFeeForProcessingCalled func(tx process.TransactionWithFeeHandler, gasToUse uint64) *big.Int
	GenesisTotalSupplyCalled      func() *big.Int
}

FeeHandlerStub -

func (*FeeHandlerStub) CheckValidityTxValues

func (fhs *FeeHandlerStub) CheckValidityTxValues(tx process.TransactionWithFeeHandler) error

CheckValidityTxValues -

func (*FeeHandlerStub) ComputeFeeForProcessing added in v1.1.15

func (fhs *FeeHandlerStub) ComputeFeeForProcessing(tx process.TransactionWithFeeHandler, gasToUse uint64) *big.Int

ComputeFeeForProcessing -

func (*FeeHandlerStub) ComputeGasLimit

func (fhs *FeeHandlerStub) ComputeGasLimit(tx process.TransactionWithFeeHandler) uint64

ComputeGasLimit -

func (*FeeHandlerStub) ComputeMoveBalanceFee added in v1.1.1

func (fhs *FeeHandlerStub) ComputeMoveBalanceFee(tx process.TransactionWithFeeHandler) *big.Int

ComputeMoveBalanceFee -

func (*FeeHandlerStub) ComputeTxFee added in v1.1.1

func (fhs *FeeHandlerStub) ComputeTxFee(tx process.TransactionWithFeeHandler) *big.Int

ComputeTxFee -

func (*FeeHandlerStub) DeveloperPercentage

func (fhs *FeeHandlerStub) DeveloperPercentage() float64

DeveloperPercentage -

func (*FeeHandlerStub) GasPriceModifier added in v1.1.15

func (fhs *FeeHandlerStub) GasPriceModifier() float64

GasPriceModifier -

func (*FeeHandlerStub) GenesisTotalSupply added in v1.1.22

func (fhs *FeeHandlerStub) GenesisTotalSupply() *big.Int

GenesisTotalSupply -

func (*FeeHandlerStub) IsInterfaceNil

func (fhs *FeeHandlerStub) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*FeeHandlerStub) MaxGasLimitPerBlock

func (fhs *FeeHandlerStub) MaxGasLimitPerBlock(uint32) uint64

MaxGasLimitPerBlock -

func (*FeeHandlerStub) MinGasPrice

func (fhs *FeeHandlerStub) MinGasPrice() uint64

MinGasPrice -

func (*FeeHandlerStub) SetMaxGasLimitPerBlock

func (fhs *FeeHandlerStub) SetMaxGasLimitPerBlock(maxGasLimitPerBlock uint64)

SetMaxGasLimitPerBlock -

func (*FeeHandlerStub) SetMinGasLimit

func (fhs *FeeHandlerStub) SetMinGasLimit(minGasLimit uint64)

SetMinGasLimit -

func (*FeeHandlerStub) SetMinGasPrice

func (fhs *FeeHandlerStub) SetMinGasPrice(minGasPrice uint64)

SetMinGasPrice -

type FloodPreventerStub

type FloodPreventerStub struct {
	IncreaseLoadCalled       func(pid core.PeerID, size uint64) error
	ApplyConsensusSizeCalled func(size int)
	ResetCalled              func()
}

FloodPreventerStub -

func (*FloodPreventerStub) ApplyConsensusSize added in v1.0.123

func (fps *FloodPreventerStub) ApplyConsensusSize(size int)

ApplyConsensusSize -

func (*FloodPreventerStub) IncreaseLoad added in v1.0.106

func (fps *FloodPreventerStub) IncreaseLoad(pid core.PeerID, size uint64) error

IncreaseLoad -

func (*FloodPreventerStub) IsInterfaceNil

func (fps *FloodPreventerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*FloodPreventerStub) Reset

func (fps *FloodPreventerStub) Reset()

Reset -

type ForkDetectorMock

type ForkDetectorMock struct {
	AddHeaderCalled                 func(header data.HeaderHandler, hash []byte, state process.BlockHeaderState, selfNotarizedHeaders []data.HeaderHandler, selfNotarizedHeadersHashes [][]byte) error
	RemoveHeaderCalled              func(nonce uint64, hash []byte)
	CheckForkCalled                 func() *process.ForkInfo
	GetHighestFinalBlockNonceCalled func() uint64
	GetHighestFinalBlockHashCalled  func() []byte
	ProbableHighestNonceCalled      func() uint64
	ResetForkCalled                 func()
	GetNotarizedHeaderHashCalled    func(nonce uint64) []byte
	SetRollBackNonceCalled          func(nonce uint64)
	RestoreToGenesisCalled          func()
	ResetProbableHighestNonceCalled func()
	SetFinalToLastCheckpointCalled  func()
}

ForkDetectorMock -

func (*ForkDetectorMock) AddHeader

func (fdm *ForkDetectorMock) AddHeader(header data.HeaderHandler, hash []byte, state process.BlockHeaderState, selfNotarizedHeaders []data.HeaderHandler, selfNotarizedHeadersHashes [][]byte) error

AddHeader -

func (*ForkDetectorMock) CheckFork

func (fdm *ForkDetectorMock) CheckFork() *process.ForkInfo

CheckFork -

func (*ForkDetectorMock) GetHighestFinalBlockHash

func (fdm *ForkDetectorMock) GetHighestFinalBlockHash() []byte

GetHighestFinalBlockHash -

func (*ForkDetectorMock) GetHighestFinalBlockNonce

func (fdm *ForkDetectorMock) GetHighestFinalBlockNonce() uint64

GetHighestFinalBlockNonce -

func (*ForkDetectorMock) GetNotarizedHeaderHash

func (fdm *ForkDetectorMock) GetNotarizedHeaderHash(nonce uint64) []byte

GetNotarizedHeaderHash -

func (*ForkDetectorMock) IsInterfaceNil

func (fdm *ForkDetectorMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*ForkDetectorMock) ProbableHighestNonce

func (fdm *ForkDetectorMock) ProbableHighestNonce() uint64

ProbableHighestNonce -

func (*ForkDetectorMock) RemoveHeader

func (fdm *ForkDetectorMock) RemoveHeader(nonce uint64, hash []byte)

RemoveHeader -

func (*ForkDetectorMock) ResetFork

func (fdm *ForkDetectorMock) ResetFork()

ResetFork -

func (*ForkDetectorMock) ResetProbableHighestNonce

func (fdm *ForkDetectorMock) ResetProbableHighestNonce()

ResetProbableHighestNonce -

func (*ForkDetectorMock) RestoreToGenesis

func (fdm *ForkDetectorMock) RestoreToGenesis()

RestoreToGenesis -

func (*ForkDetectorMock) SetFinalToLastCheckpoint added in v1.1.1

func (fdm *ForkDetectorMock) SetFinalToLastCheckpoint()

SetFinalToLastCheckpoint -

func (*ForkDetectorMock) SetRollBackNonce

func (fdm *ForkDetectorMock) SetRollBackNonce(nonce uint64)

SetRollBackNonce -

type GasHandlerMock

type GasHandlerMock struct {
	InitCalled                          func()
	SetGasConsumedCalled                func(gasConsumed uint64, hash []byte)
	SetGasRefundedCalled                func(gasRefunded uint64, hash []byte)
	GasConsumedCalled                   func(hash []byte) uint64
	GasRefundedCalled                   func(hash []byte) uint64
	TotalGasConsumedCalled              func() uint64
	TotalGasRefundedCalled              func() uint64
	RemoveGasConsumedCalled             func(hashes [][]byte)
	RemoveGasRefundedCalled             func(hashes [][]byte)
	ComputeGasConsumedByMiniBlockCalled func(miniBlock *block.MiniBlock, mapHashTx map[string]data.TransactionHandler) (uint64, uint64, error)
	ComputeGasConsumedByTxCalled        func(txSenderShardId uint32, txReceiverSharedId uint32, txHandler data.TransactionHandler) (uint64, uint64, error)
}

GasHandlerMock -

func (*GasHandlerMock) ComputeGasConsumedByMiniBlock

func (ghm *GasHandlerMock) ComputeGasConsumedByMiniBlock(miniBlock *block.MiniBlock, mapHashTx map[string]data.TransactionHandler) (uint64, uint64, error)

ComputeGasConsumedByMiniBlock -

func (*GasHandlerMock) ComputeGasConsumedByTx

func (ghm *GasHandlerMock) ComputeGasConsumedByTx(txSenderShardId uint32, txReceiverShardId uint32, txHandler data.TransactionHandler) (uint64, uint64, error)

ComputeGasConsumedByTx -

func (*GasHandlerMock) GasConsumed

func (ghm *GasHandlerMock) GasConsumed(hash []byte) uint64

GasConsumed -

func (*GasHandlerMock) GasRefunded

func (ghm *GasHandlerMock) GasRefunded(hash []byte) uint64

GasRefunded -

func (*GasHandlerMock) Init

func (ghm *GasHandlerMock) Init()

Init -

func (*GasHandlerMock) IsInterfaceNil

func (ghm *GasHandlerMock) IsInterfaceNil() bool

IsInterfaceNil -

func (*GasHandlerMock) RemoveGasConsumed

func (ghm *GasHandlerMock) RemoveGasConsumed(hashes [][]byte)

RemoveGasConsumed -

func (*GasHandlerMock) RemoveGasRefunded

func (ghm *GasHandlerMock) RemoveGasRefunded(hashes [][]byte)

RemoveGasRefunded -

func (*GasHandlerMock) SetGasConsumed

func (ghm *GasHandlerMock) SetGasConsumed(gasConsumed uint64, hash []byte)

SetGasConsumed -

func (*GasHandlerMock) SetGasRefunded

func (ghm *GasHandlerMock) SetGasRefunded(gasRefunded uint64, hash []byte)

SetGasRefunded -

func (*GasHandlerMock) TotalGasConsumed

func (ghm *GasHandlerMock) TotalGasConsumed() uint64

TotalGasConsumed -

func (*GasHandlerMock) TotalGasRefunded

func (ghm *GasHandlerMock) TotalGasRefunded() uint64

TotalGasRefunded -

type GasScheduleNotifierMock added in v1.1.12

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

GasScheduleNotifierMock -

func NewGasScheduleNotifierMock added in v1.1.12

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

NewGasScheduleNotifierMock -

func (*GasScheduleNotifierMock) IsInterfaceNil added in v1.1.12

func (g *GasScheduleNotifierMock) IsInterfaceNil() bool

IsInterfaceNil -

func (*GasScheduleNotifierMock) LatestGasSchedule added in v1.1.12

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

LatestGasSchedule -

func (*GasScheduleNotifierMock) RegisterNotifyHandler added in v1.1.12

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

RegisterNotifyHandler -

func (*GasScheduleNotifierMock) UnRegisterAll added in v1.1.12

func (g *GasScheduleNotifierMock) UnRegisterAll()

UnRegisterAll -

type GetHdrHandlerStub

type GetHdrHandlerStub struct {
	HeaderHandlerCalled func() data.HeaderHandler
}

GetHdrHandlerStub -

func (*GetHdrHandlerStub) HeaderHandler

func (ghhs *GetHdrHandlerStub) HeaderHandler() data.HeaderHandler

HeaderHandler -

type HasherMock

type HasherMock struct {
}

HasherMock that will be used for testing

func (HasherMock) Compute

func (sha HasherMock) Compute(s string) []byte

Compute will output the SHA's equivalent of the input string

func (HasherMock) EmptyHash

func (sha HasherMock) EmptyHash() []byte

EmptyHash will return the equivalent of empty string SHA's

func (HasherMock) IsInterfaceNil

func (sha HasherMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (HasherMock) Size

func (HasherMock) Size() int

Size returns the required size in bytes

type HasherStub

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

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 {
	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
	GetAccumulatedFeesCalled               func() *big.Int
	GetDeveloperFeesCalled                 func() *big.Int
	GetReservedCalled                      func() []byte
}

HeaderHandlerStub -

func (*HeaderHandlerStub) Clone

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

Clone -

func (*HeaderHandlerStub) GetAccumulatedFees

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

GetAccumulatedFees -

func (*HeaderHandlerStub) GetChainID

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

GetChainID -

func (*HeaderHandlerStub) GetDeveloperFees added in v1.0.114

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

GetDeveloperFees -

func (*HeaderHandlerStub) GetEpoch

func (hhs *HeaderHandlerStub) GetEpoch() uint32

GetEpoch -

func (*HeaderHandlerStub) GetEpochStartMetaHash

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

GetEpochStartMetaHash -

func (*HeaderHandlerStub) GetLeaderSignature

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

GetLeaderSignature -

func (*HeaderHandlerStub) GetMiniBlockHeadersHashes added in v1.1.1

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

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

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

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

GetSignature -

func (*HeaderHandlerStub) GetSoftwareVersion added in v1.0.117

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

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

SetAccumulatedFees -

func (*HeaderHandlerStub) SetChainID

func (hhs *HeaderHandlerStub) SetChainID(_ []byte)

SetChainID -

func (*HeaderHandlerStub) SetDeveloperFees added in v1.0.114

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

SetDeveloperFees -

func (*HeaderHandlerStub) SetEpoch

func (hhs *HeaderHandlerStub) SetEpoch(_ uint32)

SetEpoch -

func (*HeaderHandlerStub) SetLeaderSignature

func (hhs *HeaderHandlerStub) SetLeaderSignature(_ []byte)

SetLeaderSignature -

func (*HeaderHandlerStub) SetNonce

func (hhs *HeaderHandlerStub) SetNonce(_ uint64)

SetNonce -

func (*HeaderHandlerStub) SetPrevHash

func (hhs *HeaderHandlerStub) SetPrevHash(_ []byte)

SetPrevHash -

func (*HeaderHandlerStub) SetPrevRandSeed

func (hhs *HeaderHandlerStub) SetPrevRandSeed(_ []byte)

SetPrevRandSeed -

func (*HeaderHandlerStub) SetPubKeysBitmap

func (hhs *HeaderHandlerStub) SetPubKeysBitmap(_ []byte)

SetPubKeysBitmap -

func (*HeaderHandlerStub) SetRandSeed

func (hhs *HeaderHandlerStub) SetRandSeed(_ []byte)

SetRandSeed -

func (*HeaderHandlerStub) SetRootHash

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

SetRootHash -

func (*HeaderHandlerStub) SetRound

func (hhs *HeaderHandlerStub) SetRound(_ uint64)

SetRound -

func (*HeaderHandlerStub) SetShardID

func (hhs *HeaderHandlerStub) SetShardID(_ uint32)

SetShardID -

func (*HeaderHandlerStub) SetSignature

func (hhs *HeaderHandlerStub) SetSignature(_ []byte)

SetSignature -

func (*HeaderHandlerStub) SetSoftwareVersion added in v1.0.117

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

SetSoftwareVersion -

func (*HeaderHandlerStub) SetTimeStamp

func (hhs *HeaderHandlerStub) SetTimeStamp(_ uint64)

SetTimeStamp -

func (*HeaderHandlerStub) SetTxCount

func (hhs *HeaderHandlerStub) SetTxCount(_ uint32)

SetTxCount -

func (*HeaderHandlerStub) SetValidatorStatsRootHash

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

SetValidatorStatsRootHash -

type HeaderIntegrityVerifierStub added in v1.0.117

type HeaderIntegrityVerifierStub struct {
	VerifyCalled     func(header data.HeaderHandler) error
	GetVersionCalled func(epoch uint32) string
}

HeaderIntegrityVerifierStub -

func (*HeaderIntegrityVerifierStub) GetVersion added in v1.1.1

func (h *HeaderIntegrityVerifierStub) GetVersion(epoch uint32) string

GetVersion -

func (*HeaderIntegrityVerifierStub) IsInterfaceNil added in v1.0.117

func (h *HeaderIntegrityVerifierStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*HeaderIntegrityVerifierStub) Verify added in v1.0.117

Verify -

type HeaderResolverMock

type HeaderResolverMock struct {
	RequestDataFromHashCalled    func(hash []byte, epoch uint32) error
	ProcessReceivedMessageCalled func(message p2p.MessageP2P) error
	RequestDataFromNonceCalled   func(nonce uint64, epoch uint32) error
	RequestDataFromEpochCalled   func(identifier []byte) error
	SetEpochHandlerCalled        func(epochHandler dataRetriever.EpochHandler) error
}

HeaderResolverMock -

func (*HeaderResolverMock) IsInterfaceNil

func (hrm *HeaderResolverMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*HeaderResolverMock) ProcessReceivedMessage

func (hrm *HeaderResolverMock) ProcessReceivedMessage(message p2p.MessageP2P, _ core.PeerID) error

ProcessReceivedMessage -

func (*HeaderResolverMock) RequestDataFromEpoch

func (hrm *HeaderResolverMock) RequestDataFromEpoch(identifier []byte) error

RequestDataFromEpoch -

func (*HeaderResolverMock) RequestDataFromHash

func (hrm *HeaderResolverMock) RequestDataFromHash(hash []byte, epoch uint32) error

RequestDataFromHash -

func (*HeaderResolverMock) RequestDataFromNonce

func (hrm *HeaderResolverMock) RequestDataFromNonce(nonce uint64, epoch uint32) error

RequestDataFromNonce -

func (*HeaderResolverMock) SetEpochHandler

func (hrm *HeaderResolverMock) SetEpochHandler(epochHandler dataRetriever.EpochHandler) error

SetEpochHandler -

type HeaderSigVerifierStub

type HeaderSigVerifierStub struct {
	VerifyRandSeedAndLeaderSignatureCalled func(header data.HeaderHandler) error
	VerifySignatureCalled                  func(header data.HeaderHandler) error
}

HeaderSigVerifierStub -

func (*HeaderSigVerifierStub) IsInterfaceNil

func (hsvm *HeaderSigVerifierStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*HeaderSigVerifierStub) VerifyRandSeedAndLeaderSignature

func (hsvm *HeaderSigVerifierStub) VerifyRandSeedAndLeaderSignature(header data.HeaderHandler) error

VerifyRandSeedAndLeaderSignature -

func (*HeaderSigVerifierStub) VerifySignature

func (hsvm *HeaderSigVerifierStub) VerifySignature(header data.HeaderHandler) error

VerifySignature -

type HeaderValidatorStub

type HeaderValidatorStub struct {
	HeaderValidForProcessingCalled func(headerHandler process.HdrValidatorHandler) error
}

HeaderValidatorStub -

func (*HeaderValidatorStub) HeaderValidForProcessing

func (h *HeaderValidatorStub) HeaderValidForProcessing(headerHandler process.HdrValidatorHandler) error

HeaderValidForProcessing -

func (*HeaderValidatorStub) IsInterfaceNil

func (h *HeaderValidatorStub) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

type HeadersCacherStub

type HeadersCacherStub struct {
	AddCalled                           func(headerHash []byte, header data.HeaderHandler)
	RemoveHeaderByHashCalled            func(headerHash []byte)
	RemoveHeaderByNonceAndShardIdCalled func(hdrNonce uint64, shardId uint32)
	GetHeaderByNonceAndShardIdCalled    func(hdrNonce uint64, shardId uint32) ([]data.HeaderHandler, [][]byte, error)
	GetHeaderByHashCalled               func(hash []byte) (data.HeaderHandler, error)
	ClearCalled                         func()
	RegisterHandlerCalled               func(handler func(header data.HeaderHandler, shardHeaderHash []byte))
	NoncesCalled                        func(shardId uint32) []uint64
	LenCalled                           func() int
	MaxSizeCalled                       func() int
	GetNumHeadersCalled                 func(shardId uint32) int
}

HeadersCacherStub -

func (*HeadersCacherStub) AddHeader

func (hcs *HeadersCacherStub) AddHeader(headerHash []byte, header data.HeaderHandler)

AddHeader -

func (*HeadersCacherStub) Clear

func (hcs *HeadersCacherStub) Clear()

Clear -

func (*HeadersCacherStub) GetHeaderByHash

func (hcs *HeadersCacherStub) GetHeaderByHash(hash []byte) (data.HeaderHandler, error)

GetHeaderByHash -

func (*HeadersCacherStub) GetHeadersByNonceAndShardId

func (hcs *HeadersCacherStub) GetHeadersByNonceAndShardId(hdrNonce uint64, shardId uint32) ([]data.HeaderHandler, [][]byte, error)

GetHeadersByNonceAndShardId -

func (*HeadersCacherStub) GetNumHeaders

func (hcs *HeadersCacherStub) GetNumHeaders(shardId uint32) int

GetNumHeaders -

func (*HeadersCacherStub) IsInterfaceNil

func (hcs *HeadersCacherStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*HeadersCacherStub) Len

func (hcs *HeadersCacherStub) Len() int

Len -

func (*HeadersCacherStub) MaxSize

func (hcs *HeadersCacherStub) MaxSize() int

MaxSize -

func (*HeadersCacherStub) Nonces

func (hcs *HeadersCacherStub) Nonces(shardId uint32) []uint64

Nonces -

func (*HeadersCacherStub) RegisterHandler

func (hcs *HeadersCacherStub) RegisterHandler(handler func(header data.HeaderHandler, shardHeaderHash []byte))

RegisterHandler -

func (*HeadersCacherStub) RemoveHeaderByHash

func (hcs *HeadersCacherStub) RemoveHeaderByHash(headerHash []byte)

RemoveHeaderByHash -

func (*HeadersCacherStub) RemoveHeaderByNonceAndShardId

func (hcs *HeadersCacherStub) RemoveHeaderByNonceAndShardId(hdrNonce uint64, shardId uint32)

RemoveHeaderByNonceAndShardId -

type IndexerMock

type IndexerMock struct {
	SaveBlockCalled func(args *indexer.ArgsSaveBlockData)
}

IndexerMock is a mock implementation fot the Indexer interface

func (*IndexerMock) Close added in v1.1.6

func (im *IndexerMock) Close() error

Close will do nothing

func (*IndexerMock) IsInterfaceNil

func (im *IndexerMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*IndexerMock) IsNilIndexer

func (im *IndexerMock) IsNilIndexer() bool

IsNilIndexer -

func (*IndexerMock) RevertIndexedBlock added in v1.1.6

func (im *IndexerMock) RevertIndexedBlock(_ data.HeaderHandler, _ data.BodyHandler)

RevertIndexedBlock -

func (*IndexerMock) SaveAccounts added in v1.1.6

func (im *IndexerMock) SaveAccounts(_ uint64, _ []state.UserAccountHandler)

SaveAccounts -

func (*IndexerMock) SaveBlock

func (im *IndexerMock) SaveBlock(args *indexer.ArgsSaveBlockData)

SaveBlock -

func (*IndexerMock) SaveMetaBlock

func (im *IndexerMock) SaveMetaBlock(_ data.HeaderHandler, _ []uint64)

SaveMetaBlock -

func (*IndexerMock) SaveRoundsInfo added in v1.1.6

func (im *IndexerMock) SaveRoundsInfo(_ []*indexer.RoundInfo)

SaveRoundsInfo -

func (*IndexerMock) SaveValidatorsPubKeys

func (im *IndexerMock) SaveValidatorsPubKeys(_ map[uint32][][]byte, _ uint32)

SaveValidatorsPubKeys -

func (*IndexerMock) SaveValidatorsRating added in v0.0.5

func (im *IndexerMock) SaveValidatorsRating(_ string, _ []*indexer.ValidatorRatingInfo)

SaveValidatorsRating --

func (*IndexerMock) SetTxLogsProcessor added in v1.0.114

func (im *IndexerMock) SetTxLogsProcessor(_ process.TransactionLogProcessorDatabase)

SetTxLogsProcessor will do nothing

func (*IndexerMock) UpdateTPS

func (im *IndexerMock) UpdateTPS(_ statistics.TPSBenchmark)

UpdateTPS -

type InterceptedDataFactoryStub

type InterceptedDataFactoryStub struct {
	CreateCalled func(buff []byte) (process.InterceptedData, error)
}

InterceptedDataFactoryStub -

func (*InterceptedDataFactoryStub) Create

Create -

func (*InterceptedDataFactoryStub) IsInterfaceNil

func (idfs *InterceptedDataFactoryStub) IsInterfaceNil() bool

IsInterfaceNil -

type InterceptedDataStub

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

InterceptedDataStub -

func (*InterceptedDataStub) CheckValidity

func (ids *InterceptedDataStub) CheckValidity() error

CheckValidity -

func (*InterceptedDataStub) Hash

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

Hash -

func (*InterceptedDataStub) Identifiers added in v1.0.110

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 added in v0.0.5

func (ids *InterceptedDataStub) String() string

String -

func (*InterceptedDataStub) Type

func (ids *InterceptedDataStub) Type() string

Type -

type InterceptedDataVerifierMock added in v1.0.102

type InterceptedDataVerifierMock struct {
}

InterceptedDataVerifierMock -

func (*InterceptedDataVerifierMock) IsForCurrentShard added in v1.0.102

func (i *InterceptedDataVerifierMock) IsForCurrentShard(_ process.InterceptedData) bool

IsForCurrentShard -

func (*InterceptedDataVerifierMock) IsInterfaceNil added in v1.0.102

func (i *InterceptedDataVerifierMock) IsInterfaceNil() bool

IsInterfaceNil returns true if underlying object is

type InterceptedDebugHandlerStub added in v1.0.110

type InterceptedDebugHandlerStub struct {
	LogReceivedHashesCalled  func(topic string, hashes [][]byte)
	LogProcessedHashesCalled func(topic string, hashes [][]byte, err error)
}

InterceptedDebugHandlerStub -

func (*InterceptedDebugHandlerStub) IsInterfaceNil added in v1.0.110

func (idhs *InterceptedDebugHandlerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*InterceptedDebugHandlerStub) LogProcessedHashes added in v1.0.110

func (idhs *InterceptedDebugHandlerStub) LogProcessedHashes(topic string, hashes [][]byte, err error)

LogProcessedHashes -

func (*InterceptedDebugHandlerStub) LogReceivedHashes added in v1.0.110

func (idhs *InterceptedDebugHandlerStub) LogReceivedHashes(topic string, hashes [][]byte)

LogReceivedHashes -

type InterceptedTrieNodeStub added in v1.1.45

type InterceptedTrieNodeStub struct {
	CheckValidityCalled     func() error
	IsForCurrentShardCalled func() bool
	SizeInBytesCalled       func() int
	HashField               []byte
	StringField             string
	IdentifiersField        [][]byte
	TypeField               string
}

InterceptedTrieNodeStub -

func (*InterceptedTrieNodeStub) CheckValidity added in v1.1.45

func (ins *InterceptedTrieNodeStub) CheckValidity() error

CheckValidity -

func (*InterceptedTrieNodeStub) Hash added in v1.1.45

func (ins *InterceptedTrieNodeStub) Hash() []byte

Hash -

func (*InterceptedTrieNodeStub) Identifiers added in v1.1.45

func (ins *InterceptedTrieNodeStub) Identifiers() [][]byte

Identifiers -

func (*InterceptedTrieNodeStub) IsForCurrentShard added in v1.1.45

func (ins *InterceptedTrieNodeStub) IsForCurrentShard() bool

IsForCurrentShard -

func (*InterceptedTrieNodeStub) IsInterfaceNil added in v1.1.45

func (ins *InterceptedTrieNodeStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*InterceptedTrieNodeStub) SizeInBytes added in v1.1.45

func (ins *InterceptedTrieNodeStub) SizeInBytes() int

SizeInBytes -

func (*InterceptedTrieNodeStub) String added in v1.1.45

func (ins *InterceptedTrieNodeStub) String() string

String -

func (*InterceptedTrieNodeStub) Type added in v1.1.45

func (ins *InterceptedTrieNodeStub) Type() string

Type -

type InterceptedTxHandlerStub

type InterceptedTxHandlerStub struct {
	SenderShardIdCalled   func() uint32
	ReceiverShardIdCalled func() uint32
	NonceCalled           func() uint64
	SenderAddressCalled   func() []byte
	FeeCalled             func() *big.Int
	TransactionCalled     func() data.TransactionHandler
}

InterceptedTxHandlerStub -

func (*InterceptedTxHandlerStub) Fee

func (iths *InterceptedTxHandlerStub) Fee() *big.Int

Fee -

func (*InterceptedTxHandlerStub) Nonce

func (iths *InterceptedTxHandlerStub) Nonce() uint64

Nonce -

func (*InterceptedTxHandlerStub) ReceiverShardId

func (iths *InterceptedTxHandlerStub) ReceiverShardId() uint32

ReceiverShardId -

func (*InterceptedTxHandlerStub) SenderAddress

func (iths *InterceptedTxHandlerStub) SenderAddress() []byte

SenderAddress -

func (*InterceptedTxHandlerStub) SenderShardId

func (iths *InterceptedTxHandlerStub) SenderShardId() uint32

SenderShardId -

func (*InterceptedTxHandlerStub) Transaction

func (iths *InterceptedTxHandlerStub) Transaction() data.TransactionHandler

Transaction -

type InterceptorProcessorStub

type InterceptorProcessorStub struct {
	ValidateCalled        func(data process.InterceptedData) error
	SaveCalled            func(data process.InterceptedData) error
	RegisterHandlerCalled func(handler func(topic string, hash []byte, data interface{}))
}

InterceptorProcessorStub -

func (*InterceptorProcessorStub) IsInterfaceNil

func (ips *InterceptorProcessorStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*InterceptorProcessorStub) RegisterHandler added in v1.0.133

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

RegisterHandler -

func (*InterceptorProcessorStub) Save

Save -

func (*InterceptorProcessorStub) Validate

Validate -

type InterceptorStub

type InterceptorStub struct {
	ProcessReceivedMessageCalled func(message p2p.MessageP2P) error
}

InterceptorStub -

func (*InterceptorStub) IsInterfaceNil

func (is *InterceptorStub) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*InterceptorStub) ProcessReceivedMessage

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

ProcessReceivedMessage -

func (*InterceptorStub) RegisterHandler added in v1.0.133

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

RegisterHandler -

func (*InterceptorStub) SetInterceptedDebugHandler added in v1.0.110

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

SetInterceptedDebugHandler -

type InterceptorThrottlerStub

type InterceptorThrottlerStub struct {
	CanProcessCalled func() bool
	// contains filtered or unexported fields
}

InterceptorThrottlerStub -

func (*InterceptorThrottlerStub) CanProcess

func (its *InterceptorThrottlerStub) CanProcess() bool

CanProcess -

func (*InterceptorThrottlerStub) EndProcessing

func (its *InterceptorThrottlerStub) EndProcessing()

EndProcessing -

func (*InterceptorThrottlerStub) EndProcessingCount

func (its *InterceptorThrottlerStub) EndProcessingCount() int32

EndProcessingCount -

func (*InterceptorThrottlerStub) IsInterfaceNil

func (its *InterceptorThrottlerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*InterceptorThrottlerStub) StartProcessing

func (its *InterceptorThrottlerStub) StartProcessing()

StartProcessing -

func (*InterceptorThrottlerStub) StartProcessingCount

func (its *InterceptorThrottlerStub) StartProcessingCount() int32

StartProcessingCount -

type InterimProcessorContainerMock

type InterimProcessorContainerMock struct {
	GetCalled  func(key block.Type) (process.IntermediateTransactionHandler, error)
	KeysCalled func() []block.Type
}

InterimProcessorContainerMock -

func (*InterimProcessorContainerMock) Add

Add -

func (*InterimProcessorContainerMock) AddMultiple

AddMultiple -

func (*InterimProcessorContainerMock) Get

Get -

func (*InterimProcessorContainerMock) IsInterfaceNil

func (ipcm *InterimProcessorContainerMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*InterimProcessorContainerMock) Keys

func (ipcm *InterimProcessorContainerMock) Keys() []block.Type

Keys -

func (*InterimProcessorContainerMock) Len

func (ipcm *InterimProcessorContainerMock) Len() int

Len -

func (*InterimProcessorContainerMock) Remove

func (ipcm *InterimProcessorContainerMock) Remove(_ block.Type)

Remove -

func (*InterimProcessorContainerMock) Replace

Replace -

type IntermediateTransactionHandlerMock

type IntermediateTransactionHandlerMock struct {
	AddIntermediateTransactionsCalled        func(txs []data.TransactionHandler) error
	GetNumOfCrossInterMbsAndTxsCalled        func() (int, int)
	CreateAllInterMiniBlocksCalled           func() []*block.MiniBlock
	VerifyInterMiniBlocksCalled              func(body *block.Body) error
	SaveCurrentIntermediateTxToStorageCalled func() error
	CreateBlockStartedCalled                 func()
	CreateMarshalizedDataCalled              func(txHashes [][]byte) ([][]byte, error)
	GetAllCurrentFinishedTxsCalled           func() map[string]data.TransactionHandler
	RemoveProcessedResultsForCalled          func(txHashes [][]byte)
	GetCreatedInShardMiniBlockCalled         func() *block.MiniBlock
	// contains filtered or unexported fields
}

IntermediateTransactionHandlerMock -

func (*IntermediateTransactionHandlerMock) AddIntermediateTransactions

func (ith *IntermediateTransactionHandlerMock) AddIntermediateTransactions(txs []data.TransactionHandler) error

AddIntermediateTransactions -

func (*IntermediateTransactionHandlerMock) CreateAllInterMiniBlocks

func (ith *IntermediateTransactionHandlerMock) CreateAllInterMiniBlocks() []*block.MiniBlock

CreateAllInterMiniBlocks -

func (*IntermediateTransactionHandlerMock) CreateBlockStarted

func (ith *IntermediateTransactionHandlerMock) CreateBlockStarted()

CreateBlockStarted -

func (*IntermediateTransactionHandlerMock) CreateMarshalizedData

func (ith *IntermediateTransactionHandlerMock) CreateMarshalizedData(txHashes [][]byte) ([][]byte, error)

CreateMarshalizedData -

func (*IntermediateTransactionHandlerMock) GetAllCurrentFinishedTxs

func (ith *IntermediateTransactionHandlerMock) GetAllCurrentFinishedTxs() map[string]data.TransactionHandler

GetAllCurrentFinishedTxs -

func (*IntermediateTransactionHandlerMock) GetCreatedInShardMiniBlock

func (ith *IntermediateTransactionHandlerMock) GetCreatedInShardMiniBlock() *block.MiniBlock

GetCreatedInShardMiniBlock -

func (*IntermediateTransactionHandlerMock) GetIntermediateTransactions added in v1.0.103

func (ith *IntermediateTransactionHandlerMock) GetIntermediateTransactions() []data.TransactionHandler

GetIntermediateTransactions -

func (*IntermediateTransactionHandlerMock) GetNumOfCrossInterMbsAndTxs added in v1.1.1

func (ith *IntermediateTransactionHandlerMock) GetNumOfCrossInterMbsAndTxs() (int, int)

GetNumOfCrossInterMbsAndTxs -

func (*IntermediateTransactionHandlerMock) IsInterfaceNil

func (ith *IntermediateTransactionHandlerMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*IntermediateTransactionHandlerMock) RemoveProcessedResultsFor

func (ith *IntermediateTransactionHandlerMock) RemoveProcessedResultsFor(txHashes [][]byte)

RemoveProcessedResultsFor -

func (*IntermediateTransactionHandlerMock) SaveCurrentIntermediateTxToStorage

func (ith *IntermediateTransactionHandlerMock) SaveCurrentIntermediateTxToStorage() error

SaveCurrentIntermediateTxToStorage -

func (*IntermediateTransactionHandlerMock) VerifyInterMiniBlocks

func (ith *IntermediateTransactionHandlerMock) VerifyInterMiniBlocks(body *block.Body) error

VerifyInterMiniBlocks -

type MarshalizerMock

type MarshalizerMock struct {
	Fail bool
}

MarshalizerMock that will be used for testing

func (*MarshalizerMock) IsInterfaceNil

func (mm *MarshalizerMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*MarshalizerMock) Marshal

func (mm *MarshalizerMock) Marshal(obj interface{}) ([]byte, error)

Marshal converts the input object in a slice of bytes

func (*MarshalizerMock) Unmarshal

func (mm *MarshalizerMock) Unmarshal(obj interface{}, buff []byte) error

Unmarshal applies the serialized values over an instantiated object

type MarshalizerStub

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

MarshalizerStub -

func (*MarshalizerStub) IsInterfaceNil

func (ms *MarshalizerStub) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*MarshalizerStub) Marshal

func (ms *MarshalizerStub) Marshal(obj interface{}) ([]byte, error)

Marshal -

func (*MarshalizerStub) Unmarshal

func (ms *MarshalizerStub) Unmarshal(obj interface{}, buff []byte) error

Unmarshal -

type MessageHandlerStub

type MessageHandlerStub struct {
	ConnectedPeersOnTopicCalled func(topic string) []core.PeerID
	SendToConnectedPeerCalled   func(topic string, buff []byte, peerID core.PeerID) error
}

MessageHandlerStub -

func (*MessageHandlerStub) ConnectedPeersOnTopic

func (mhs *MessageHandlerStub) ConnectedPeersOnTopic(topic string) []core.PeerID

ConnectedPeersOnTopic -

func (*MessageHandlerStub) IsInterfaceNil

func (mhs *MessageHandlerStub) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*MessageHandlerStub) SendToConnectedPeer

func (mhs *MessageHandlerStub) SendToConnectedPeer(topic string, buff []byte, peerID core.PeerID) error

SendToConnectedPeer -

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 MessengerStub

type MessengerStub struct {
	CloseCalled                       func() error
	IDCalled                          func() core.PeerID
	PeersCalled                       func() []core.PeerID
	AddressesCalled                   func() []string
	ConnectToPeerCalled               func(address string) error
	TrimConnectionsCalled             func()
	IsConnectedCalled                 func(peerID core.PeerID) bool
	ConnectedPeersCalled              func() []core.PeerID
	CreateTopicCalled                 func(name string, createChannelForTopic bool) error
	HasTopicCalled                    func(name string) bool
	HasTopicValidatorCalled           func(name string) bool
	BroadcastOnChannelCalled          func(channel string, topic string, buff []byte)
	BroadcastCalled                   func(topic string, buff []byte)
	RegisterMessageProcessorCalled    func(topic string, handler p2p.MessageProcessor) error
	UnregisterMessageProcessorCalled  func(topic string) error
	SendToConnectedPeerCalled         func(topic string, buff []byte, peerID core.PeerID) error
	OutgoingChannelLoadBalancerCalled func() p2p.ChannelLoadBalancer
	BootstrapCalled                   func() error
}

MessengerStub -

func (*MessengerStub) Addresses

func (ms *MessengerStub) Addresses() []string

Addresses -

func (*MessengerStub) Bootstrap

func (ms *MessengerStub) Bootstrap() error

Bootstrap -

func (*MessengerStub) Broadcast

func (ms *MessengerStub) Broadcast(topic string, buff []byte)

Broadcast -

func (*MessengerStub) BroadcastOnChannel

func (ms *MessengerStub) BroadcastOnChannel(channel string, topic string, buff []byte)

BroadcastOnChannel -

func (*MessengerStub) Close

func (ms *MessengerStub) Close() error

Close -

func (*MessengerStub) ConnectToPeer

func (ms *MessengerStub) ConnectToPeer(address string) error

ConnectToPeer -

func (*MessengerStub) ConnectedPeers

func (ms *MessengerStub) ConnectedPeers() []core.PeerID

ConnectedPeers -

func (*MessengerStub) CreateTopic

func (ms *MessengerStub) CreateTopic(name string, createChannelForTopic bool) error

CreateTopic -

func (*MessengerStub) HasTopic

func (ms *MessengerStub) HasTopic(name string) bool

HasTopic -

func (*MessengerStub) HasTopicValidator

func (ms *MessengerStub) HasTopicValidator(name string) bool

HasTopicValidator -

func (*MessengerStub) ID

func (ms *MessengerStub) ID() core.PeerID

ID -

func (*MessengerStub) IsConnected

func (ms *MessengerStub) IsConnected(peerID core.PeerID) bool

IsConnected -

func (*MessengerStub) IsInterfaceNil

func (ms *MessengerStub) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*MessengerStub) OutgoingChannelLoadBalancer

func (ms *MessengerStub) OutgoingChannelLoadBalancer() p2p.ChannelLoadBalancer

OutgoingChannelLoadBalancer -

func (*MessengerStub) Peers

func (ms *MessengerStub) Peers() []core.PeerID

Peers -

func (*MessengerStub) RegisterMessageProcessor

func (ms *MessengerStub) RegisterMessageProcessor(topic string, handler p2p.MessageProcessor) error

RegisterMessageProcessor -

func (*MessengerStub) SendToConnectedPeer

func (ms *MessengerStub) SendToConnectedPeer(topic string, buff []byte, peerID core.PeerID) error

SendToConnectedPeer -

func (*MessengerStub) TrimConnections

func (ms *MessengerStub) TrimConnections()

TrimConnections -

func (*MessengerStub) UnregisterMessageProcessor

func (ms *MessengerStub) UnregisterMessageProcessor(topic string) error

UnregisterMessageProcessor -

type MiniBlocksProviderStub added in v1.0.104

type MiniBlocksProviderStub struct {
	GetMiniBlocksCalled         func(hashes [][]byte) ([]*process.MiniblockAndHash, [][]byte)
	GetMiniBlocksFromPoolCalled func(hashes [][]byte) ([]*process.MiniblockAndHash, [][]byte)
}

MiniBlocksProviderStub -

func (*MiniBlocksProviderStub) GetMiniBlocks added in v1.0.104

func (mbps *MiniBlocksProviderStub) GetMiniBlocks(hashes [][]byte) ([]*process.MiniblockAndHash, [][]byte)

GetMiniBlocks -

func (*MiniBlocksProviderStub) GetMiniBlocksFromPool added in v1.0.104

func (mbps *MiniBlocksProviderStub) GetMiniBlocksFromPool(hashes [][]byte) ([]*process.MiniblockAndHash, [][]byte)

GetMiniBlocksFromPool -

func (*MiniBlocksProviderStub) IsInterfaceNil added in v1.0.104

func (mbps *MiniBlocksProviderStub) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

type NetworkConnectionWatcherStub

type NetworkConnectionWatcherStub struct {
	IsConnectedToTheNetworkCalled func() bool
}

NetworkConnectionWatcherStub -

func (*NetworkConnectionWatcherStub) IsConnectedToTheNetwork

func (cws *NetworkConnectionWatcherStub) IsConnectedToTheNetwork() bool

IsConnectedToTheNetwork -

func (*NetworkConnectionWatcherStub) IsInterfaceNil

func (cws *NetworkConnectionWatcherStub) IsInterfaceNil() bool

IsInterfaceNil -

type NodeInfoMock added in v1.0.102

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

NodeInfoMock -

func NewNodeInfo added in v1.0.102

func NewNodeInfo(address []byte, pubKey []byte, shardId uint32, initialRating uint32) *NodeInfoMock

NewNodeInfo -

func (*NodeInfoMock) AddressBytes added in v1.0.115

func (n *NodeInfoMock) AddressBytes() []byte

AddressBytes -

func (*NodeInfoMock) AssignedShard added in v1.0.102

func (n *NodeInfoMock) AssignedShard() uint32

AssignedShard -

func (*NodeInfoMock) GetInitialRating added in v1.0.149

func (n *NodeInfoMock) GetInitialRating() uint32

GetInitialRating -

func (*NodeInfoMock) IsInterfaceNil added in v1.0.102

func (n *NodeInfoMock) IsInterfaceNil() bool

IsInterfaceNil -

func (*NodeInfoMock) PubKeyBytes added in v1.0.115

func (n *NodeInfoMock) PubKeyBytes() []byte

PubKeyBytes -

type NodesConfigProviderStub added in v1.0.110

type NodesConfigProviderStub struct {
	MinNumberOfNodesCalled               func() uint32
	MinNumberOfNodesWithHysteresisCalled func() uint32
}

NodesConfigProviderStub -

func (*NodesConfigProviderStub) IsInterfaceNil added in v1.0.110

func (n *NodesConfigProviderStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*NodesConfigProviderStub) MinNumberOfNodes added in v1.0.110

func (n *NodesConfigProviderStub) MinNumberOfNodes() uint32

MinNumberOfNodes -

func (*NodesConfigProviderStub) MinNumberOfNodesWithHysteresis added in v1.1.3

func (n *NodesConfigProviderStub) MinNumberOfNodesWithHysteresis() uint32

MinNumberOfNodesWithHysteresis -

type NodesCoordinatorMock

type NodesCoordinatorMock struct {
	Validators                               map[uint32][]sharding.Validator
	ShardConsensusSize                       uint32
	MetaConsensusSize                        uint32
	ShardId                                  uint32
	NbShards                                 uint32
	GetSelectedPublicKeysCalled              func(selection []byte, shardId uint32, epoch uint32) (publicKeys []string, err error)
	GetValidatorsPublicKeysCalled            func(randomness []byte, round uint64, shardId uint32, epoch uint32) ([]string, error)
	GetValidatorsRewardsAddressesCalled      func(randomness []byte, round uint64, shardId uint32, epoch uint32) ([]string, error)
	SetNodesPerShardsCalled                  func(nodes map[uint32][]sharding.Validator, epoch uint32) error
	ComputeValidatorsGroupCalled             func(randomness []byte, round uint64, shardId uint32, epoch uint32) (validatorsGroup []sharding.Validator, err error)
	GetValidatorWithPublicKeyCalled          func(publicKey []byte) (validator sharding.Validator, shardId uint32, err error)
	GetAllEligibleValidatorsPublicKeysCalled func() (map[uint32][][]byte, error)
	GetAllWaitingValidatorsPublicKeysCalled  func() (map[uint32][][]byte, error)
	GetAllLeavingValidatorsPublicKeysCalled  func() (map[uint32][][]byte, error)
	ConsensusGroupSizeCalled                 func(uint32) int
}

NodesCoordinatorMock defines the behaviour of a struct able to do validator group selection

func NewNodesCoordinatorMock

func NewNodesCoordinatorMock() *NodesCoordinatorMock

NewNodesCoordinatorMock -

func (*NodesCoordinatorMock) ComputeAdditionalLeaving added in v1.0.115

func (ncm *NodesCoordinatorMock) ComputeAdditionalLeaving([]*state.ShardValidatorInfo) (map[uint32][]sharding.Validator, error)

ComputeAdditionalLeaving -

func (*NodesCoordinatorMock) ComputeConsensusGroup

func (ncm *NodesCoordinatorMock) ComputeConsensusGroup(
	randomess []byte,
	round uint64,
	shardId uint32,
	epoch uint32,
) ([]sharding.Validator, error)

ComputeConsensusGroup -

func (*NodesCoordinatorMock) ConsensusGroupSize

func (ncm *NodesCoordinatorMock) ConsensusGroupSize(shardId uint32) int

ConsensusGroupSize -

func (*NodesCoordinatorMock) GetAllEligibleValidatorsPublicKeys

func (ncm *NodesCoordinatorMock) GetAllEligibleValidatorsPublicKeys(_ uint32) (map[uint32][][]byte, error)

GetAllEligibleValidatorsPublicKeys -

func (*NodesCoordinatorMock) GetAllLeavingValidatorsPublicKeys added in v1.0.102

func (ncm *NodesCoordinatorMock) GetAllLeavingValidatorsPublicKeys(_ uint32) (map[uint32][][]byte, error)

GetAllLeavingValidatorsPublicKeys -

func (*NodesCoordinatorMock) GetAllWaitingValidatorsPublicKeys

func (ncm *NodesCoordinatorMock) GetAllWaitingValidatorsPublicKeys(_ uint32) (map[uint32][][]byte, error)

GetAllWaitingValidatorsPublicKeys -

func (*NodesCoordinatorMock) GetChance added in v1.0.102

func (ncm *NodesCoordinatorMock) GetChance(uint32) uint32

GetChance -

func (*NodesCoordinatorMock) GetConsensusValidatorsPublicKeys

func (ncm *NodesCoordinatorMock) GetConsensusValidatorsPublicKeys(
	randomness []byte,
	round uint64,
	shardId uint32,
	epoch uint32,
) ([]string, error)

GetConsensusValidatorsPublicKeys -

func (*NodesCoordinatorMock) GetConsensusWhitelistedNodes

func (ncm *NodesCoordinatorMock) GetConsensusWhitelistedNodes(
	_ uint32,
) (map[string]struct{}, error)

GetConsensusWhitelistedNodes return the whitelisted nodes allowed to send consensus messages, for each of the shards

func (*NodesCoordinatorMock) GetNumTotalEligible

func (ncm *NodesCoordinatorMock) GetNumTotalEligible() uint64

GetNumTotalEligible -

func (*NodesCoordinatorMock) GetOwnPublicKey

func (ncm *NodesCoordinatorMock) GetOwnPublicKey() []byte

GetOwnPublicKey -

func (*NodesCoordinatorMock) GetSavedStateKey

func (ncm *NodesCoordinatorMock) GetSavedStateKey() []byte

GetSavedStateKey -

func (*NodesCoordinatorMock) GetSelectedPublicKeys

func (ncm *NodesCoordinatorMock) GetSelectedPublicKeys(selection []byte, shardId uint32, epoch uint32) (publicKeys []string, err error)

GetSelectedPublicKeys -

func (*NodesCoordinatorMock) GetValidatorWithPublicKey

func (ncm *NodesCoordinatorMock) GetValidatorWithPublicKey(publicKey []byte) (sharding.Validator, uint32, error)

GetValidatorWithPublicKey -

func (*NodesCoordinatorMock) GetValidatorsIndexes

func (ncm *NodesCoordinatorMock) GetValidatorsIndexes(_ []string, _ uint32) ([]uint64, error)

GetValidatorsIndexes -

func (*NodesCoordinatorMock) IsInterfaceNil

func (ncm *NodesCoordinatorMock) IsInterfaceNil() bool

IsInterfaceNil -

func (*NodesCoordinatorMock) LoadState

func (ncm *NodesCoordinatorMock) LoadState(_ []byte) error

LoadState -

func (*NodesCoordinatorMock) SetNodesPerShards

func (ncm *NodesCoordinatorMock) SetNodesPerShards(
	eligible map[uint32][]sharding.Validator,
	_ map[uint32][]sharding.Validator,
	epoch uint32,
) error

SetNodesPerShards -

func (*NodesCoordinatorMock) ShardIdForEpoch

func (ncm *NodesCoordinatorMock) ShardIdForEpoch(_ uint32) (uint32, error)

ShardIdForEpoch returns the nodesCoordinator configured ShardId for specified epoch if epoch configuration exists, otherwise error

func (*NodesCoordinatorMock) ShuffleOutForEpoch added in v1.0.111

func (ncm *NodesCoordinatorMock) ShuffleOutForEpoch(_ uint32)

ShuffleOutForEpoch verifies if the shards changed in the new epoch and calls the shuffleOutHandler

func (*NodesCoordinatorMock) ValidatorsWeights added in v0.0.5

func (ncm *NodesCoordinatorMock) ValidatorsWeights(validators []sharding.Validator) ([]uint32, error)

ValidatorsWeights -

type NodesSetupStub added in v1.0.102

type NodesSetupStub struct {
	InitialNodesInfoForShardCalled       func(shardId uint32) ([]sharding.GenesisNodeInfoHandler, []sharding.GenesisNodeInfoHandler, error)
	InitialNodesInfoCalled               func() (map[uint32][]sharding.GenesisNodeInfoHandler, map[uint32][]sharding.GenesisNodeInfoHandler)
	GetStartTimeCalled                   func() int64
	GetRoundDurationCalled               func() uint64
	GetChainIdCalled                     func() string
	GetMinTransactionVersionCalled       func() uint32
	GetShardConsensusGroupSizeCalled     func() uint32
	GetMetaConsensusGroupSizeCalled      func() uint32
	NumberOfShardsCalled                 func() uint32
	MinNumberOfNodesCalled               func() uint32
	MinNumberOfNodesWithHysteresisCalled func() uint32
}

NodesSetupStub -

func (*NodesSetupStub) GetChainId added in v1.0.102

func (n *NodesSetupStub) GetChainId() string

GetChainId -

func (*NodesSetupStub) GetMetaConsensusGroupSize added in v1.0.102

func (n *NodesSetupStub) GetMetaConsensusGroupSize() uint32

GetMetaConsensusGroupSize -

func (*NodesSetupStub) GetMinTransactionVersion added in v1.0.137

func (n *NodesSetupStub) GetMinTransactionVersion() uint32

GetMinTransactionVersion -

func (*NodesSetupStub) GetRoundDuration added in v1.0.102

func (n *NodesSetupStub) GetRoundDuration() uint64

GetRoundDuration -

func (*NodesSetupStub) GetShardConsensusGroupSize added in v1.0.102

func (n *NodesSetupStub) GetShardConsensusGroupSize() uint32

GetShardConsensusGroupSize -

func (*NodesSetupStub) GetStartTime added in v1.0.102

func (n *NodesSetupStub) GetStartTime() int64

GetStartTime -

func (*NodesSetupStub) InitialNodesInfo added in v1.0.102

InitialNodesInfo -

func (*NodesSetupStub) InitialNodesInfoForShard added in v1.0.102

func (n *NodesSetupStub) InitialNodesInfoForShard(shardId uint32) ([]sharding.GenesisNodeInfoHandler, []sharding.GenesisNodeInfoHandler, error)

InitialNodesInfoForShard -

func (*NodesSetupStub) IsInterfaceNil added in v1.0.102

func (n *NodesSetupStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*NodesSetupStub) MinNumberOfNodes added in v1.0.110

func (n *NodesSetupStub) MinNumberOfNodes() uint32

MinNumberOfNodes -

func (*NodesSetupStub) MinNumberOfNodesWithHysteresis added in v1.1.3

func (n *NodesSetupStub) MinNumberOfNodesWithHysteresis() uint32

MinNumberOfNodesWithHysteresis -

func (*NodesSetupStub) NumberOfShards added in v1.0.102

func (n *NodesSetupStub) NumberOfShards() uint32

NumberOfShards -

type ObjectsContainerStub

type ObjectsContainerStub struct {
	GetCalled     func(key string) (interface{}, error)
	AddCalled     func(key string, val interface{}) error
	ReplaceCalled func(key string, val interface{}) error
	RemoveCalled  func(key string)
	LenCalled     func() int
}

ObjectsContainerStub -

func (*ObjectsContainerStub) Add

func (ocs *ObjectsContainerStub) Add(key string, val interface{}) error

Add -

func (*ObjectsContainerStub) Get

func (ocs *ObjectsContainerStub) Get(key string) (interface{}, error)

Get -

func (*ObjectsContainerStub) Len

func (ocs *ObjectsContainerStub) Len() int

Len -

func (*ObjectsContainerStub) Remove

func (ocs *ObjectsContainerStub) Remove(key string)

Remove -

func (*ObjectsContainerStub) Replace

func (ocs *ObjectsContainerStub) Replace(key string, val interface{}) error

Replace -

type P2PAntifloodHandlerStub

type P2PAntifloodHandlerStub struct {
	CanProcessMessageCalled            func(message p2p.MessageP2P, fromConnectedPeer core.PeerID) error
	CanProcessMessagesOnTopicCalled    func(peer core.PeerID, topic string, numMessages uint32, totalSize uint64, sequence []byte) error
	ApplyConsensusSizeCalled           func(size int)
	SetDebuggerCalled                  func(debugger process.AntifloodDebugger) error
	BlacklistPeerCalled                func(peer core.PeerID, reason string, duration time.Duration)
	IsOriginatorEligibleForTopicCalled func(pid core.PeerID, topic string) error
}

P2PAntifloodHandlerStub -

func (*P2PAntifloodHandlerStub) ApplyConsensusSize added in v1.0.123

func (p2pahs *P2PAntifloodHandlerStub) ApplyConsensusSize(size int)

ApplyConsensusSize -

func (*P2PAntifloodHandlerStub) BlacklistPeer added in v1.0.132

func (p2pahs *P2PAntifloodHandlerStub) BlacklistPeer(peer core.PeerID, reason string, duration time.Duration)

BlacklistPeer -

func (*P2PAntifloodHandlerStub) CanProcessMessage

func (p2pahs *P2PAntifloodHandlerStub) CanProcessMessage(message p2p.MessageP2P, fromConnectedPeer core.PeerID) error

CanProcessMessage -

func (*P2PAntifloodHandlerStub) CanProcessMessagesOnTopic added in v1.0.106

func (p2pahs *P2PAntifloodHandlerStub) CanProcessMessagesOnTopic(peer core.PeerID, topic string, numMessages uint32, totalSize uint64, sequence []byte) error

CanProcessMessagesOnTopic -

func (*P2PAntifloodHandlerStub) IsInterfaceNil

func (p2pahs *P2PAntifloodHandlerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*P2PAntifloodHandlerStub) IsOriginatorEligibleForTopic added in v1.0.133

func (p2pahs *P2PAntifloodHandlerStub) IsOriginatorEligibleForTopic(pid core.PeerID, topic string) error

IsOriginatorEligibleForTopic -

func (*P2PAntifloodHandlerStub) SetDebugger added in v1.0.127

func (p2pahs *P2PAntifloodHandlerStub) SetDebugger(debugger process.AntifloodDebugger) error

SetDebugger -

type P2PMessageMock

type P2PMessageMock struct {
	FromField      []byte
	DataField      []byte
	SeqNoField     []byte
	TopicField     string
	SignatureField []byte
	KeyField       []byte
	PeerField      core.PeerID
	PayloadField   []byte
	TimestampField int64
}

P2PMessageMock -

func (*P2PMessageMock) Data

func (msg *P2PMessageMock) Data() []byte

Data -

func (*P2PMessageMock) From

func (msg *P2PMessageMock) From() []byte

From -

func (*P2PMessageMock) IsInterfaceNil

func (msg *P2PMessageMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*P2PMessageMock) Key

func (msg *P2PMessageMock) Key() []byte

Key -

func (*P2PMessageMock) Payload added in v1.0.133

func (msg *P2PMessageMock) Payload() []byte

Payload -

func (*P2PMessageMock) Peer

func (msg *P2PMessageMock) Peer() core.PeerID

Peer -

func (*P2PMessageMock) SeqNo

func (msg *P2PMessageMock) SeqNo() []byte

SeqNo -

func (*P2PMessageMock) Signature

func (msg *P2PMessageMock) Signature() []byte

Signature -

func (*P2PMessageMock) Timestamp added in v1.0.133

func (msg *P2PMessageMock) Timestamp() int64

Timestamp -

func (*P2PMessageMock) Topic added in v1.1.28

func (msg *P2PMessageMock) Topic() string

Topic -

type PauseHandlerStub added in v1.1.3

type PauseHandlerStub struct {
	IsPausedCalled func(token []byte) bool
}

PauseHandlerStub -

func (*PauseHandlerStub) IsInterfaceNil added in v1.1.3

func (p *PauseHandlerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*PauseHandlerStub) IsPaused added in v1.1.3

func (p *PauseHandlerStub) IsPaused(token []byte) bool

IsPaused -

type PayableHandlerStub added in v1.1.3

type PayableHandlerStub struct {
	IsPayableCalled func(address []byte) (bool, error)
}

PayableHandlerStub -

func (*PayableHandlerStub) IsInterfaceNil added in v1.1.3

func (p *PayableHandlerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*PayableHandlerStub) IsPayable added in v1.1.3

func (p *PayableHandlerStub) IsPayable(address []byte) (bool, error)

IsPayable -

type PeerAccountHandlerMock

type PeerAccountHandlerMock struct {
	IncreaseLeaderSuccessRateValue          uint32
	DecreaseLeaderSuccessRateValue          uint32
	IncreaseValidatorSuccessRateValue       uint32
	DecreaseValidatorSuccessRateValue       uint32
	IncreaseValidatorIgnoredSignaturesValue uint32

	IncreaseLeaderSuccessRateCalled              func(uint32)
	DecreaseLeaderSuccessRateCalled              func(uint32)
	IncreaseValidatorSuccessRateCalled           func(uint32)
	DecreaseValidatorSuccessRateCalled           func(uint32)
	IncreaseValidatorIgnoredSignaturesRateCalled func(uint32)
	SetTempRatingCalled                          func(uint32)
	GetTempRatingCalled                          func() uint32
	SetAccumulatedFeesCalled                     func(*big.Int)
	GetAccumulatedFeesCalled                     func() *big.Int
	GetConsecutiveProposerMissesCalled           func() uint32
	SetConsecutiveProposerMissesCalled           func(rating uint32)
	SetListAndIndexCalled                        func(shardID uint32, list string, index uint32)
	GetListCalled                                func() string
	GetUnStakedEpochCalled                       func() uint32
}

PeerAccountHandlerMock -

func (*PeerAccountHandlerMock) AddToAccumulatedFees added in v1.0.89

func (p *PeerAccountHandlerMock) AddToAccumulatedFees(val *big.Int)

AddToAccumulatedFees -

func (*PeerAccountHandlerMock) AddressBytes added in v1.0.113

func (p *PeerAccountHandlerMock) AddressBytes() []byte

AddressBytes -

func (*PeerAccountHandlerMock) DataTrie

func (p *PeerAccountHandlerMock) DataTrie() data.Trie

DataTrie -

func (*PeerAccountHandlerMock) DataTrieTracker

func (p *PeerAccountHandlerMock) DataTrieTracker() state.DataTrieTracker

DataTrieTracker -

func (*PeerAccountHandlerMock) DecreaseLeaderSuccessRate

func (p *PeerAccountHandlerMock) DecreaseLeaderSuccessRate(val uint32)

DecreaseLeaderSuccessRate -

func (*PeerAccountHandlerMock) DecreaseValidatorSuccessRate

func (p *PeerAccountHandlerMock) DecreaseValidatorSuccessRate(val uint32)

DecreaseValidatorSuccessRate -

func (*PeerAccountHandlerMock) GetAccumulatedFees

func (p *PeerAccountHandlerMock) GetAccumulatedFees() *big.Int

GetAccumulatedFees -

func (*PeerAccountHandlerMock) GetBLSPublicKey

func (p *PeerAccountHandlerMock) GetBLSPublicKey() []byte

GetBLSPublicKey -

func (*PeerAccountHandlerMock) GetCode

func (p *PeerAccountHandlerMock) GetCode() []byte

GetCode -

func (*PeerAccountHandlerMock) GetCodeHash

func (p *PeerAccountHandlerMock) GetCodeHash() []byte

GetCodeHash -

func (*PeerAccountHandlerMock) GetConsecutiveProposerMisses added in v0.0.5

func (p *PeerAccountHandlerMock) GetConsecutiveProposerMisses() uint32

GetConsecutiveProposerMisses -

func (*PeerAccountHandlerMock) GetIndexInList added in v1.0.110

func (p *PeerAccountHandlerMock) GetIndexInList() uint32

GetIndexInList -

func (*PeerAccountHandlerMock) GetLeaderSuccessRate

func (p *PeerAccountHandlerMock) GetLeaderSuccessRate() state.SignRate

GetLeaderSuccessRate -

func (*PeerAccountHandlerMock) GetList added in v1.0.102

func (p *PeerAccountHandlerMock) GetList() string

GetList -

func (*PeerAccountHandlerMock) GetNonce

func (p *PeerAccountHandlerMock) GetNonce() uint64

GetNonce -

func (*PeerAccountHandlerMock) GetNumSelectedInSuccessBlocks

func (p *PeerAccountHandlerMock) GetNumSelectedInSuccessBlocks() uint32

GetNumSelectedInSuccessBlocks -

func (*PeerAccountHandlerMock) GetRating

func (p *PeerAccountHandlerMock) GetRating() uint32

GetRating -

func (*PeerAccountHandlerMock) GetRewardAddress

func (p *PeerAccountHandlerMock) GetRewardAddress() []byte

GetRewardAddress -

func (*PeerAccountHandlerMock) GetRootHash

func (p *PeerAccountHandlerMock) GetRootHash() []byte

GetRootHash -

func (*PeerAccountHandlerMock) GetShardId added in v1.0.110

func (p *PeerAccountHandlerMock) GetShardId() uint32

GetShardId -

func (*PeerAccountHandlerMock) GetStake

func (p *PeerAccountHandlerMock) GetStake() *big.Int

GetStake -

func (*PeerAccountHandlerMock) GetTempRating

func (p *PeerAccountHandlerMock) GetTempRating() uint32

GetTempRating -

func (*PeerAccountHandlerMock) GetTotalLeaderSuccessRate added in v0.0.5

func (p *PeerAccountHandlerMock) GetTotalLeaderSuccessRate() state.SignRate

GetTotalLeaderSuccessRate -

func (*PeerAccountHandlerMock) GetTotalValidatorIgnoredSignaturesRate added in v1.0.149

func (p *PeerAccountHandlerMock) GetTotalValidatorIgnoredSignaturesRate() uint32

GetTotalValidatorIgnoredSignaturesRate -

func (*PeerAccountHandlerMock) GetTotalValidatorSuccessRate added in v0.0.5

func (p *PeerAccountHandlerMock) GetTotalValidatorSuccessRate() state.SignRate

GetTotalValidatorSuccessRate -

func (*PeerAccountHandlerMock) GetUnStakedEpoch added in v1.0.110

func (p *PeerAccountHandlerMock) GetUnStakedEpoch() uint32

GetUnStakedEpoch -

func (*PeerAccountHandlerMock) GetValidatorIgnoredSignaturesRate added in v1.0.149

func (p *PeerAccountHandlerMock) GetValidatorIgnoredSignaturesRate() uint32

GetValidatorIgnoredSignaturesRate -

func (*PeerAccountHandlerMock) GetValidatorSuccessRate

func (p *PeerAccountHandlerMock) GetValidatorSuccessRate() state.SignRate

GetValidatorSuccessRate -

func (*PeerAccountHandlerMock) IncreaseLeaderSuccessRate

func (p *PeerAccountHandlerMock) IncreaseLeaderSuccessRate(val uint32)

IncreaseLeaderSuccessRate -

func (*PeerAccountHandlerMock) IncreaseNonce

func (p *PeerAccountHandlerMock) IncreaseNonce(_ uint64)

IncreaseNonce -

func (*PeerAccountHandlerMock) IncreaseNumSelectedInSuccessBlocks

func (p *PeerAccountHandlerMock) IncreaseNumSelectedInSuccessBlocks()

IncreaseNumSelectedInSuccessBlocks -

func (*PeerAccountHandlerMock) IncreaseValidatorIgnoredSignaturesRate added in v1.0.149

func (p *PeerAccountHandlerMock) IncreaseValidatorIgnoredSignaturesRate(val uint32)

IncreaseValidatorIgnoredSignaturesRate -

func (*PeerAccountHandlerMock) IncreaseValidatorSuccessRate

func (p *PeerAccountHandlerMock) IncreaseValidatorSuccessRate(val uint32)

IncreaseValidatorSuccessRate -

func (*PeerAccountHandlerMock) IsInterfaceNil

func (p *PeerAccountHandlerMock) IsInterfaceNil() bool

IsInterfaceNil -

func (*PeerAccountHandlerMock) ResetAtNewEpoch

func (p *PeerAccountHandlerMock) ResetAtNewEpoch()

ResetAtNewEpoch -

func (*PeerAccountHandlerMock) SetBLSPublicKey

func (p *PeerAccountHandlerMock) SetBLSPublicKey([]byte) error

SetBLSPublicKey -

func (*PeerAccountHandlerMock) SetCode

func (p *PeerAccountHandlerMock) SetCode(_ []byte)

SetCode -

func (*PeerAccountHandlerMock) SetCodeHash

func (p *PeerAccountHandlerMock) SetCodeHash(_ []byte)

SetCodeHash -

func (*PeerAccountHandlerMock) SetConsecutiveProposerMisses added in v0.0.5

func (p *PeerAccountHandlerMock) SetConsecutiveProposerMisses(consecutiveMisses uint32)

SetConsecutiveProposerMisses -

func (*PeerAccountHandlerMock) SetDataTrie

func (p *PeerAccountHandlerMock) SetDataTrie(_ data.Trie)

SetDataTrie -

func (*PeerAccountHandlerMock) SetListAndIndex added in v1.0.102

func (p *PeerAccountHandlerMock) SetListAndIndex(shardID uint32, list string, index uint32)

SetListAndIndex -

func (*PeerAccountHandlerMock) SetRating

func (p *PeerAccountHandlerMock) SetRating(uint32)

SetRating -

func (*PeerAccountHandlerMock) SetRewardAddress

func (p *PeerAccountHandlerMock) SetRewardAddress([]byte) error

SetRewardAddress -

func (*PeerAccountHandlerMock) SetRootHash

func (p *PeerAccountHandlerMock) SetRootHash([]byte)

SetRootHash -

func (*PeerAccountHandlerMock) SetStake

func (p *PeerAccountHandlerMock) SetStake(_ *big.Int) error

SetStake -

func (*PeerAccountHandlerMock) SetTempRating

func (p *PeerAccountHandlerMock) SetTempRating(val uint32)

SetTempRating -

func (*PeerAccountHandlerMock) SetUnStakedEpoch added in v1.0.110

func (p *PeerAccountHandlerMock) SetUnStakedEpoch(_ uint32)

SetUnStakedEpoch -

type PeerBlackListHandlerStub added in v1.0.127

type PeerBlackListHandlerStub struct {
	UpsertCalled func(pid core.PeerID, span time.Duration) error
	HasCalled    func(pid core.PeerID) bool
	SweepCalled  func()
}

PeerBlackListHandlerStub -

func (*PeerBlackListHandlerStub) Has added in v1.0.127

func (pblhs *PeerBlackListHandlerStub) Has(pid core.PeerID) bool

Has -

func (*PeerBlackListHandlerStub) IsInterfaceNil added in v1.0.127

func (pblhs *PeerBlackListHandlerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*PeerBlackListHandlerStub) Sweep added in v1.0.127

func (pblhs *PeerBlackListHandlerStub) Sweep()

Sweep -

func (*PeerBlackListHandlerStub) Upsert added in v1.0.133

func (pblhs *PeerBlackListHandlerStub) Upsert(pid core.PeerID, span time.Duration) error

Upsert -

type PeerChangesHandler

type PeerChangesHandler struct {
	PeerChangesCalled       func() []block.PeerData
	VerifyPeerChangesCalled func(peerChanges []block.PeerData) error
}

PeerChangesHandler -

func (*PeerChangesHandler) IsInterfaceNil

func (p *PeerChangesHandler) IsInterfaceNil() bool

IsInterfaceNil -

func (*PeerChangesHandler) PeerChanges

func (p *PeerChangesHandler) PeerChanges() []block.PeerData

PeerChanges -

func (*PeerChangesHandler) VerifyPeerChanges

func (p *PeerChangesHandler) VerifyPeerChanges(peerChanges []block.PeerData) error

VerifyPeerChanges -

type PeerShardMapperStub added in v1.0.133

type PeerShardMapperStub struct {
	GetPeerInfoCalled func(pid core.PeerID) core.P2PPeerInfo
}

PeerShardMapperStub -

func (*PeerShardMapperStub) GetPeerInfo added in v1.0.133

func (psms *PeerShardMapperStub) GetPeerInfo(pid core.PeerID) core.P2PPeerInfo

GetPeerInfo -

func (*PeerShardMapperStub) IsInterfaceNil added in v1.0.133

func (psms *PeerShardMapperStub) IsInterfaceNil() bool

IsInterfaceNil -

type PeerShardResolverStub added in v1.0.133

type PeerShardResolverStub struct {
	GetPeerInfoCalled func(pid core.PeerID) core.P2PPeerInfo
}

PeerShardResolverStub -

func (*PeerShardResolverStub) GetPeerInfo added in v1.0.133

func (psrs *PeerShardResolverStub) GetPeerInfo(pid core.PeerID) core.P2PPeerInfo

GetPeerInfo -

func (*PeerShardResolverStub) IsInterfaceNil added in v1.0.133

func (psrs *PeerShardResolverStub) IsInterfaceNil() bool

IsInterfaceNil -

type PendingMiniBlocksHandlerStub

type PendingMiniBlocksHandlerStub struct {
	AddProcessedHeaderCalled   func(handler data.HeaderHandler) error
	RevertHeaderCalled         func(handler data.HeaderHandler) error
	GetPendingMiniBlocksCalled func(shardID uint32) [][]byte
	SetPendingMiniBlocksCalled func(shardID uint32, mbHashes [][]byte)
}

PendingMiniBlocksHandlerStub -

func (*PendingMiniBlocksHandlerStub) AddProcessedHeader

func (p *PendingMiniBlocksHandlerStub) AddProcessedHeader(handler data.HeaderHandler) error

AddProcessedHeader -

func (*PendingMiniBlocksHandlerStub) GetPendingMiniBlocks

func (p *PendingMiniBlocksHandlerStub) GetPendingMiniBlocks(shardID uint32) [][]byte

GetPendingMiniBlocks -

func (*PendingMiniBlocksHandlerStub) IsInterfaceNil

func (p *PendingMiniBlocksHandlerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*PendingMiniBlocksHandlerStub) RevertHeader

func (p *PendingMiniBlocksHandlerStub) RevertHeader(handler data.HeaderHandler) error

RevertHeader -

func (*PendingMiniBlocksHandlerStub) SetPendingMiniBlocks

func (p *PendingMiniBlocksHandlerStub) SetPendingMiniBlocks(shardID uint32, mbHashes [][]byte)

SetPendingMiniBlocks -

type PreProcessorContainerMock

type PreProcessorContainerMock struct {
	GetCalled  func(key block.Type) (process.PreProcessor, error)
	KeysCalled func() []block.Type
}

PreProcessorContainerMock -

func (*PreProcessorContainerMock) Add

Add -

func (*PreProcessorContainerMock) AddMultiple

func (ppcm *PreProcessorContainerMock) AddMultiple(_ []block.Type, _ []process.PreProcessor) error

AddMultiple -

func (*PreProcessorContainerMock) Get

Get -

func (*PreProcessorContainerMock) IsInterfaceNil

func (ppcm *PreProcessorContainerMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*PreProcessorContainerMock) Keys

func (ppcm *PreProcessorContainerMock) Keys() []block.Type

Keys -

func (*PreProcessorContainerMock) Len

func (ppcm *PreProcessorContainerMock) Len() int

Len -

func (*PreProcessorContainerMock) Remove

func (ppcm *PreProcessorContainerMock) Remove(_ block.Type)

Remove -

func (*PreProcessorContainerMock) Replace

Replace -

type PreProcessorMock

type PreProcessorMock struct {
	CreateBlockStartedCalled              func()
	IsDataPreparedCalled                  func(requestedTxs int, haveTime func() time.Duration) error
	RemoveBlockDataFromPoolsCalled        func(body *block.Body, miniBlockPool storage.Cacher) error
	RemoveTxsFromPoolsCalled              func(body *block.Body) error
	RestoreBlockDataIntoPoolsCalled       func(body *block.Body, miniBlockPool storage.Cacher) (int, error)
	SaveTxsToStorageCalled                func(body *block.Body) error
	ProcessBlockTransactionsCalled        func(body *block.Body, haveTime func() bool) error
	RequestBlockTransactionsCalled        func(body *block.Body) int
	CreateMarshalizedDataCalled           func(txHashes [][]byte) ([][]byte, error)
	RequestTransactionsForMiniBlockCalled func(miniBlock *block.MiniBlock) int
	ProcessMiniBlockCalled                func(miniBlock *block.MiniBlock, haveTime func() bool, getNumOfCrossInterMbsAndTxs func() (int, int)) ([][]byte, int, error)
	CreateAndProcessMiniBlocksCalled      func(haveTime func() bool) (block.MiniBlockSlice, error)
	GetAllCurrentUsedTxsCalled            func() map[string]data.TransactionHandler
}

PreProcessorMock -

func (*PreProcessorMock) CreateAndProcessMiniBlocks

func (ppm *PreProcessorMock) CreateAndProcessMiniBlocks(haveTime func() bool) (block.MiniBlockSlice, error)

CreateAndProcessMiniBlocks creates miniblocks from storage and processes the reward transactions added into the miniblocks as long as it has time

func (*PreProcessorMock) CreateBlockStarted

func (ppm *PreProcessorMock) CreateBlockStarted()

CreateBlockStarted -

func (*PreProcessorMock) CreateMarshalizedData

func (ppm *PreProcessorMock) CreateMarshalizedData(txHashes [][]byte) ([][]byte, error)

CreateMarshalizedData -

func (*PreProcessorMock) GetAllCurrentUsedTxs

func (ppm *PreProcessorMock) GetAllCurrentUsedTxs() map[string]data.TransactionHandler

GetAllCurrentUsedTxs -

func (*PreProcessorMock) IsDataPrepared

func (ppm *PreProcessorMock) IsDataPrepared(requestedTxs int, haveTime func() time.Duration) error

IsDataPrepared -

func (*PreProcessorMock) IsInterfaceNil

func (ppm *PreProcessorMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*PreProcessorMock) ProcessBlockTransactions

func (ppm *PreProcessorMock) ProcessBlockTransactions(body *block.Body, haveTime func() bool) error

ProcessBlockTransactions -

func (*PreProcessorMock) ProcessMiniBlock

func (ppm *PreProcessorMock) ProcessMiniBlock(miniBlock *block.MiniBlock, haveTime func() bool, getNumOfCrossInterMbsAndTxs func() (int, int)) ([][]byte, int, error)

ProcessMiniBlock -

func (*PreProcessorMock) RemoveBlockDataFromPools added in v1.1.7

func (ppm *PreProcessorMock) RemoveBlockDataFromPools(body *block.Body, miniBlockPool storage.Cacher) error

RemoveBlockDataFromPools -

func (*PreProcessorMock) RemoveTxsFromPools added in v1.1.7

func (ppm *PreProcessorMock) RemoveTxsFromPools(body *block.Body) error

RemoveTxsFromPools -

func (*PreProcessorMock) RequestBlockTransactions

func (ppm *PreProcessorMock) RequestBlockTransactions(body *block.Body) int

RequestBlockTransactions -

func (*PreProcessorMock) RequestTransactionsForMiniBlock

func (ppm *PreProcessorMock) RequestTransactionsForMiniBlock(miniBlock *block.MiniBlock) int

RequestTransactionsForMiniBlock -

func (*PreProcessorMock) RestoreBlockDataIntoPools added in v1.1.7

func (ppm *PreProcessorMock) RestoreBlockDataIntoPools(body *block.Body, miniBlockPool storage.Cacher) (int, error)

RestoreBlockDataIntoPools -

func (*PreProcessorMock) SaveTxsToStorage added in v1.1.7

func (ppm *PreProcessorMock) SaveTxsToStorage(body *block.Body) error

SaveTxsToStorage -

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

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

PubkeyConverterMock -

func NewPubkeyConverterMock added in v1.0.104

func NewPubkeyConverterMock(addressLen int) *PubkeyConverterMock

NewPubkeyConverterMock -

func (*PubkeyConverterMock) Decode added in v1.0.104

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

Decode -

func (*PubkeyConverterMock) Encode added in v1.0.104

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

Encode -

func (*PubkeyConverterMock) IsInterfaceNil added in v1.0.104

func (pcm *PubkeyConverterMock) IsInterfaceNil() bool

IsInterfaceNil -

func (*PubkeyConverterMock) Len added in v1.0.104

func (pcm *PubkeyConverterMock) Len() int

Len -

type PubkeyConverterStub added in v1.0.104

type PubkeyConverterStub struct {
	LenCalled    func() int
	DecodeCalled func(humanReadable string) ([]byte, error)
	EncodeCalled func(pkBytes []byte) string
}

PubkeyConverterStub -

func (*PubkeyConverterStub) Decode added in v1.0.104

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

Decode -

func (*PubkeyConverterStub) Encode added in v1.0.104

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

Encode -

func (*PubkeyConverterStub) IsInterfaceNil added in v1.0.104

func (pcs *PubkeyConverterStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*PubkeyConverterStub) Len added in v1.0.104

func (pcs *PubkeyConverterStub) Len() int

Len -

type QuotaStatusHandlerStub

type QuotaStatusHandlerStub struct {
	ResetStatisticsCalled func()
	AddQuotaCalled        func(pid core.PeerID, numReceivedMessages uint32, sizeReceivedMessages uint64,
		numProcessedMessages uint32, sizeProcessedMessages uint64)
}

QuotaStatusHandlerStub -

func (*QuotaStatusHandlerStub) AddQuota

func (qshs *QuotaStatusHandlerStub) AddQuota(
	pid core.PeerID,
	numReceived uint32,
	sizeReceived uint64,
	numProcessed uint32,
	sizeProcessed uint64,
)

AddQuota -

func (*QuotaStatusHandlerStub) IsInterfaceNil

func (qshs *QuotaStatusHandlerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*QuotaStatusHandlerStub) ResetStatistics

func (qshs *QuotaStatusHandlerStub) ResetStatistics()

ResetStatistics -

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
	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 added in v0.0.5

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 added in v0.0.5

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

RevertIncreaseValidator -

type RatingReaderMock

type RatingReaderMock struct {
	GetRatingCalled func(string) uint32
	RatingsMap      map[string]uint32
}

RatingReaderMock -

func (*RatingReaderMock) GetRating

func (rrm *RatingReaderMock) GetRating(pk string) uint32

GetRating -

func (*RatingReaderMock) IsInterfaceNil

func (rrm *RatingReaderMock) IsInterfaceNil() bool

IsInterfaceNil -

type RatingStepMock added in v0.0.5

type RatingStepMock struct {
	ProposerIncreaseRatingStepProperty     int32
	ProposerDecreaseRatingStepProperty     int32
	ValidatorIncreaseRatingStepProperty    int32
	ValidatorDecreaseRatingStepProperty    int32
	ConsecutiveMissedBlocksPenaltyProperty float32
}

RatingStepMock will store information about ratingsComputation specific for a shard or metachain

func (*RatingStepMock) ConsecutiveMissedBlocksPenalty added in v0.0.5

func (rd *RatingStepMock) ConsecutiveMissedBlocksPenalty() float32

ConsecutiveMissedBlocksPenalty will return the penalty increase for consecutive block misses

func (*RatingStepMock) ProposerDecreaseRatingStep added in v0.0.5

func (rd *RatingStepMock) ProposerDecreaseRatingStep() int32

ProposerDecreaseRatingStep will return the rating step decrease for proposer

func (*RatingStepMock) ProposerIncreaseRatingStep added in v0.0.5

func (rd *RatingStepMock) ProposerIncreaseRatingStep() int32

ProposerIncreaseRatingStep will return the rating step increase for validator

func (*RatingStepMock) ValidatorDecreaseRatingStep added in v0.0.5

func (rd *RatingStepMock) ValidatorDecreaseRatingStep() int32

ValidatorDecreaseRatingStep will return the rating step decrease for validator

func (*RatingStepMock) ValidatorIncreaseRatingStep added in v0.0.5

func (rd *RatingStepMock) ValidatorIncreaseRatingStep() int32

ValidatorIncreaseRatingStep will return the rating step increase for validator

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

func (rd *RatingsInfoMock) IsInterfaceNil() bool

IsInterfaceNil -

func (*RatingsInfoMock) MaxRating

func (rd *RatingsInfoMock) MaxRating() uint32

MaxRating -

func (*RatingsInfoMock) MetaChainRatingsStepHandler added in v0.0.5

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 added in v0.0.5

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

ShardChainRatingsStepHandler -

func (*RatingsInfoMock) SignedBlocksThreshold added in v0.0.5

func (rd *RatingsInfoMock) SignedBlocksThreshold() float32

SignedBlocksThreshold -

func (*RatingsInfoMock) StartRating

func (rd *RatingsInfoMock) StartRating() uint32

StartRating -

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

RequestHandlerStub -

func (*RequestHandlerStub) GetNumPeersToQuery added in v1.0.102

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

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

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

RequestRewardTransactions -

func (*RequestHandlerStub) RequestShardHeader

func (rhs *RequestHandlerStub) RequestShardHeader(shardID uint32, hash []byte)

RequestShardHeader -

func (*RequestHandlerStub) RequestShardHeaderByNonce

func (rhs *RequestHandlerStub) RequestShardHeaderByNonce(shardID uint32, nonce uint64)

RequestShardHeaderByNonce -

func (*RequestHandlerStub) RequestStartOfEpochMetaBlock

func (rhs *RequestHandlerStub) RequestStartOfEpochMetaBlock(epoch uint32)

RequestStartOfEpochMetaBlock -

func (*RequestHandlerStub) RequestTransaction

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

RequestTransaction -

func (*RequestHandlerStub) RequestTrieNodes

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

RequestTrieNodes -

func (*RequestHandlerStub) RequestUnsignedTransactions

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

RequestUnsignedTransactions -

func (*RequestHandlerStub) SetEpoch

func (rhs *RequestHandlerStub) SetEpoch(_ uint32)

SetEpoch -

func (*RequestHandlerStub) SetNumPeersToQuery added in v1.0.102

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 ResolverStub

type ResolverStub struct {
	RequestDataFromHashCalled    func(hash []byte, epoch uint32) error
	ProcessReceivedMessageCalled func(message p2p.MessageP2P) error
}

ResolverStub -

func (*ResolverStub) IsInterfaceNil

func (rs *ResolverStub) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*ResolverStub) ProcessReceivedMessage

func (rs *ResolverStub) ProcessReceivedMessage(message p2p.MessageP2P, _ core.PeerID) error

ProcessReceivedMessage -

func (*ResolverStub) RequestDataFromHash

func (rs *ResolverStub) RequestDataFromHash(hash []byte, epoch uint32) error

RequestDataFromHash -

type ResolversContainerStub

type ResolversContainerStub struct {
	GetCalled     func(key string) (dataRetriever.Resolver, error)
	AddCalled     func(key string, val dataRetriever.Resolver) error
	ReplaceCalled func(key string, val dataRetriever.Resolver) error
	RemoveCalled  func(key string)
	LenCalled     func() int
}

ResolversContainerStub -

func (*ResolversContainerStub) Add

Add -

func (*ResolversContainerStub) AddMultiple

func (rcs *ResolversContainerStub) AddMultiple(_ []string, _ []dataRetriever.Resolver) error

AddMultiple -

func (*ResolversContainerStub) Get

Get -

func (*ResolversContainerStub) IsInterfaceNil

func (rcs *ResolversContainerStub) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*ResolversContainerStub) Len

func (rcs *ResolversContainerStub) Len() int

Len -

func (*ResolversContainerStub) Remove

func (rcs *ResolversContainerStub) Remove(key string)

Remove -

func (*ResolversContainerStub) Replace

func (rcs *ResolversContainerStub) Replace(key string, val dataRetriever.Resolver) error

Replace -

type ResolversFinderStub

type ResolversFinderStub struct {
	ResolversContainerStub
	IntraShardResolverCalled func(baseTopic string) (dataRetriever.Resolver, error)
	MetaChainResolverCalled  func(baseTopic string) (dataRetriever.Resolver, error)
	CrossShardResolverCalled func(baseTopic string, crossShard uint32) (dataRetriever.Resolver, error)
}

ResolversFinderStub -

func (*ResolversFinderStub) CrossShardResolver

func (rfs *ResolversFinderStub) CrossShardResolver(baseTopic string, crossShard uint32) (dataRetriever.Resolver, error)

CrossShardResolver -

func (*ResolversFinderStub) IntraShardResolver

func (rfs *ResolversFinderStub) IntraShardResolver(baseTopic string) (dataRetriever.Resolver, error)

IntraShardResolver -

func (*ResolversFinderStub) MetaChainResolver

func (rfs *ResolversFinderStub) MetaChainResolver(baseTopic string) (dataRetriever.Resolver, error)

MetaChainResolver -

type RewardTxProcessorMock

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

RewardTxProcessorMock -

func (*RewardTxProcessorMock) IsInterfaceNil

func (scrp *RewardTxProcessorMock) IsInterfaceNil() bool

IsInterfaceNil -

func (*RewardTxProcessorMock) ProcessRewardTransaction

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

ProcessRewardTransaction -

type RewardsHandlerMock

type RewardsHandlerMock struct {
	MaxInflationRateCalled                 func() float64
	MinInflationRateCalled                 func() float64
	LeaderPercentageCalled                 func() float64
	ProtocolSustainabilityPercentageCalled func() float64
	ProtocolSustainabilityAddressCalled    func() string
	RewardsTopUpGradientPointCalled        func() *big.Int
	RewardsTopUpFactorCalled               func() float64
}

RewardsHandlerMock -

func (*RewardsHandlerMock) IsInterfaceNil

func (rhm *RewardsHandlerMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*RewardsHandlerMock) LeaderPercentage

func (rhm *RewardsHandlerMock) LeaderPercentage() float64

LeaderPercentage -

func (*RewardsHandlerMock) MaxInflationRate

func (rhm *RewardsHandlerMock) MaxInflationRate(uint32) float64

MaxInflationRate -

func (*RewardsHandlerMock) MinInflationRate

func (rhm *RewardsHandlerMock) MinInflationRate() float64

MinInflationRate -

func (*RewardsHandlerMock) ProtocolSustainabilityAddress added in v1.0.147

func (rhm *RewardsHandlerMock) ProtocolSustainabilityAddress() string

ProtocolSustainabilityAddress will return the protocol sustainability address

func (*RewardsHandlerMock) ProtocolSustainabilityPercentage added in v1.0.147

func (rhm *RewardsHandlerMock) ProtocolSustainabilityPercentage() float64

ProtocolSustainabilityPercentage will return the protocol sustainability percentage value

func (*RewardsHandlerMock) RewardsTopUpFactor added in v1.1.15

func (rhm *RewardsHandlerMock) RewardsTopUpFactor() float64

RewardsTopUpFactor -

func (*RewardsHandlerMock) RewardsTopUpGradientPoint added in v1.1.15

func (rhm *RewardsHandlerMock) RewardsTopUpGradientPoint() *big.Int

RewardsTopUpGradientPoint -

type RoundStub

type RoundStub struct {
	IndexCalled         func() int64
	TimeDurationCalled  func() time.Duration
	TimeStampCalled     func() time.Time
	UpdateRoundCalled   func(time.Time, time.Time)
	RemainingTimeCalled func(time.Time, time.Duration) time.Duration
}

RoundStub -

func (*RoundStub) Index

func (rnds *RoundStub) Index() int64

Index -

func (*RoundStub) IsInterfaceNil added in v1.0.106

func (rnds *RoundStub) IsInterfaceNil() bool

IsInterfaceNil --

func (*RoundStub) RemainingTime

func (rnds *RoundStub) RemainingTime(startTime time.Time, maxTime time.Duration) time.Duration

RemainingTime -

func (*RoundStub) TimeDuration

func (rnds *RoundStub) TimeDuration() time.Duration

TimeDuration -

func (*RoundStub) TimeStamp

func (rnds *RoundStub) TimeStamp() time.Time

TimeStamp -

func (*RoundStub) UpdateRound

func (rnds *RoundStub) UpdateRound(genesisRoundTimeStamp time.Time, timeStamp time.Time)

UpdateRound -

type RounderMock

type RounderMock struct {
	RoundIndex          int64
	RoundTimeStamp      time.Time
	RoundTimeDuration   time.Duration
	BeforeGenesisCalled func() bool
}

RounderMock -

func (*RounderMock) BeforeGenesis added in v1.0.133

func (rndm *RounderMock) BeforeGenesis() bool

BeforeGenesis -

func (*RounderMock) Index

func (rndm *RounderMock) Index() int64

Index -

func (*RounderMock) IsInterfaceNil

func (rndm *RounderMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*RounderMock) RemainingTime

func (rndm *RounderMock) RemainingTime(_ time.Time, _ time.Duration) time.Duration

RemainingTime -

func (*RounderMock) TimeDuration

func (rndm *RounderMock) TimeDuration() time.Duration

TimeDuration -

func (*RounderMock) TimeStamp

func (rndm *RounderMock) TimeStamp() time.Time

TimeStamp -

func (*RounderMock) UpdateRound

func (rndm *RounderMock) UpdateRound(genesisRoundTimeStamp time.Time, timeStamp time.Time)

UpdateRound -

type SCProcessorMock

type SCProcessorMock struct {
	ComputeTransactionTypeCalled          func(tx data.TransactionHandler) (process.TransactionType, 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(address []byte) (bool, error)
}

SCProcessorMock -

func (*SCProcessorMock) ComputeTransactionType

ComputeTransactionType -

func (*SCProcessorMock) DeploySmartContract

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

DeploySmartContract -

func (*SCProcessorMock) ExecuteBuiltInFunction added in v1.1.3

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

func (sc *SCProcessorMock) IsPayable(address []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 SCToProtocolStub

type SCToProtocolStub struct {
	UpdateProtocolCalled func(body *block.Body, nonce uint64) error
}

SCToProtocolStub -

func (*SCToProtocolStub) IsInterfaceNil

func (s *SCToProtocolStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*SCToProtocolStub) UpdateProtocol

func (s *SCToProtocolStub) UpdateProtocol(body *block.Body, nonce uint64) error

UpdateProtocol -

type ScQueryStub

type ScQueryStub struct {
	ExecuteQueryCalled           func(query *process.SCQuery) (*vmcommon.VMOutput, error)
	ComputeScCallGasLimitHandler func(tx *transaction.Transaction) (uint64, error)
}

ScQueryStub -

func (*ScQueryStub) ComputeScCallGasLimit

func (s *ScQueryStub) ComputeScCallGasLimit(tx *transaction.Transaction) (uint64, error)

ComputeScCallGasLimit --

func (*ScQueryStub) ExecuteQuery

func (s *ScQueryStub) ExecuteQuery(query *process.SCQuery) (*vmcommon.VMOutput, error)

ExecuteQuery -

func (*ScQueryStub) IsInterfaceNil

func (s *ScQueryStub) IsInterfaceNil() bool

IsInterfaceNil -

type ShardCoordinatorStub added in v1.1.33

type ShardCoordinatorStub struct {
	NumberOfShardsCalled          func() uint32
	ComputeIdCalled               func(address []byte) uint32
	SelfIdCalled                  func() uint32
	SameShardCalled               func(firstAddress, secondAddress []byte) bool
	CommunicationIdentifierCalled func(destShardID uint32) string
}

ShardCoordinatorStub -

func (*ShardCoordinatorStub) CommunicationIdentifier added in v1.1.33

func (coordinator *ShardCoordinatorStub) CommunicationIdentifier(destShardID uint32) string

CommunicationIdentifier -

func (*ShardCoordinatorStub) ComputeId added in v1.1.33

func (coordinator *ShardCoordinatorStub) ComputeId(address []byte) uint32

ComputeId -

func (*ShardCoordinatorStub) IsInterfaceNil added in v1.1.33

func (coordinator *ShardCoordinatorStub) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*ShardCoordinatorStub) NumberOfShards added in v1.1.33

func (coordinator *ShardCoordinatorStub) NumberOfShards() uint32

NumberOfShards -

func (*ShardCoordinatorStub) SameShard added in v1.1.33

func (coordinator *ShardCoordinatorStub) SameShard(firstAddress, secondAddress []byte) bool

SameShard -

func (*ShardCoordinatorStub) SelfId added in v1.1.33

func (coordinator *ShardCoordinatorStub) SelfId() uint32

SelfId -

type ShardIdHasMapMock

type ShardIdHasMapMock struct {
	LoadCalled   func(shardId uint32) ([]byte, bool)
	StoreCalled  func(shardId uint32, hash []byte)
	RangeCalled  func(f func(shardId uint32, hash []byte) bool)
	DeleteCalled func(shardId uint32)
}

ShardIdHasMapMock -

func (*ShardIdHasMapMock) Delete

func (sihsm *ShardIdHasMapMock) Delete(shardId uint32)

Delete -

func (*ShardIdHasMapMock) IsInterfaceNil

func (sihsm *ShardIdHasMapMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*ShardIdHasMapMock) Load

func (sihsm *ShardIdHasMapMock) Load(shardId uint32) ([]byte, bool)

Load -

func (*ShardIdHasMapMock) Range

func (sihsm *ShardIdHasMapMock) Range(f func(shardId uint32, hash []byte) bool)

Range -

func (*ShardIdHasMapMock) Store

func (sihsm *ShardIdHasMapMock) Store(shardId uint32, hash []byte)

Store -

type SignerMock

type SignerMock struct {
	SignStub   func(private crypto.PrivateKey, msg []byte) ([]byte, error)
	VerifyStub func(public crypto.PublicKey, msg []byte, sig []byte) error
}

SignerMock -

func (*SignerMock) IsInterfaceNil

func (s *SignerMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*SignerMock) Sign

func (s *SignerMock) Sign(private crypto.PrivateKey, msg []byte) ([]byte, error)

Sign -

func (*SignerMock) Verify

func (s *SignerMock) Verify(public crypto.PublicKey, msg []byte, sig []byte) error

Verify -

type SingleSignKeyGenMock

type SingleSignKeyGenMock struct {
	PublicKeyFromByteArrayCalled func(b []byte) (crypto.PublicKey, error)
	SuiteCalled                  func() crypto.Suite
}

SingleSignKeyGenMock -

func (*SingleSignKeyGenMock) CheckPublicKeyValid added in v1.0.120

func (sskgm *SingleSignKeyGenMock) CheckPublicKeyValid(_ []byte) error

CheckPublicKeyValid -

func (*SingleSignKeyGenMock) GeneratePair

func (sskgm *SingleSignKeyGenMock) GeneratePair() (crypto.PrivateKey, crypto.PublicKey)

GeneratePair -

func (*SingleSignKeyGenMock) IsInterfaceNil

func (sskgm *SingleSignKeyGenMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*SingleSignKeyGenMock) PrivateKeyFromByteArray

func (sskgm *SingleSignKeyGenMock) PrivateKeyFromByteArray(_ []byte) (crypto.PrivateKey, error)

PrivateKeyFromByteArray -

func (*SingleSignKeyGenMock) PublicKeyFromByteArray

func (sskgm *SingleSignKeyGenMock) PublicKeyFromByteArray(b []byte) (crypto.PublicKey, error)

PublicKeyFromByteArray -

func (*SingleSignKeyGenMock) Suite

func (sskgm *SingleSignKeyGenMock) Suite() crypto.Suite

Suite -

type SingleSignPublicKey

type SingleSignPublicKey struct {
	SuiteCalled func() crypto.Suite
	PointCalled func() crypto.Point
}

SingleSignPublicKey -

func (*SingleSignPublicKey) IsInterfaceNil

func (sspk *SingleSignPublicKey) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*SingleSignPublicKey) Point

func (sspk *SingleSignPublicKey) Point() crypto.Point

Point -

func (*SingleSignPublicKey) Suite

func (sspk *SingleSignPublicKey) Suite() crypto.Suite

Suite -

func (*SingleSignPublicKey) ToByteArray

func (sspk *SingleSignPublicKey) ToByteArray() ([]byte, error)

ToByteArray -

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 StorageBootstrapperMock

type StorageBootstrapperMock struct {
	LoadFromStorageCalled func() error
}

StorageBootstrapperMock -

func (*StorageBootstrapperMock) GetHighestBlockNonce

func (sbm *StorageBootstrapperMock) GetHighestBlockNonce() uint64

GetHighestBlockNonce -

func (*StorageBootstrapperMock) IsInterfaceNil

func (sbm *StorageBootstrapperMock) IsInterfaceNil() bool

IsInterfaceNil -

func (*StorageBootstrapperMock) LoadFromStorage

func (sbm *StorageBootstrapperMock) LoadFromStorage() error

LoadFromStorage -

type StorerMock

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

StorerMock -

func NewStorerMock

func NewStorerMock() *StorerMock

NewStorerMock -

func (*StorerMock) ClearCache

func (sm *StorerMock) ClearCache()

ClearCache -

func (*StorerMock) Close

func (sm *StorerMock) Close() error

Close -

func (*StorerMock) DestroyUnit

func (sm *StorerMock) DestroyUnit() error

DestroyUnit -

func (*StorerMock) Get

func (sm *StorerMock) Get(key []byte) ([]byte, error)

Get -

func (*StorerMock) GetBulkFromEpoch added in v1.0.147

func (sm *StorerMock) GetBulkFromEpoch(keys [][]byte, _ uint32) (map[string][]byte, error)

GetBulkFromEpoch -

func (*StorerMock) GetFromEpoch

func (sm *StorerMock) GetFromEpoch(key []byte, _ uint32) ([]byte, error)

GetFromEpoch -

func (*StorerMock) Has

func (sm *StorerMock) Has(_ []byte) error

Has -

func (*StorerMock) HasInEpoch

func (sm *StorerMock) HasInEpoch(_ []byte, _ uint32) error

HasInEpoch -

func (*StorerMock) IsInterfaceNil

func (sm *StorerMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*StorerMock) Put

func (sm *StorerMock) Put(key, data []byte) error

Put -

func (*StorerMock) PutInEpoch added in v1.1.1

func (sm *StorerMock) PutInEpoch(key, data []byte, _ uint32) error

PutInEpoch -

func (*StorerMock) RangeKeys added in v1.0.138

func (sm *StorerMock) RangeKeys(_ func(key []byte, val []byte) bool)

RangeKeys -

func (*StorerMock) Remove

func (sm *StorerMock) Remove(key []byte) error

Remove -

func (*StorerMock) SearchFirst

func (sm *StorerMock) SearchFirst(_ []byte) ([]byte, error)

SearchFirst -

type StorerStub

type StorerStub struct {
	PutCalled              func(key, data []byte) error
	PutInEpochCalled       func(key, data []byte, epoch uint32) error
	GetCalled              func(key []byte) ([]byte, error)
	GetFromEpochCalled     func(key []byte, epoch uint32) ([]byte, error)
	HasCalled              func(key []byte) error
	HasInEpochCalled       func(key []byte, epoch uint32) error
	SearchFirstCalled      func(key []byte) ([]byte, error)
	RemoveCalled           func(key []byte) error
	ClearCacheCalled       func()
	DestroyUnitCalled      func() error
	RangeKeysCalled        func(handler func(key []byte, val []byte) bool)
	GetBulkFromEpochCalled func(keys [][]byte, epoch uint32) (map[string][]byte, error)
}

StorerStub -

func (*StorerStub) ClearCache

func (ss *StorerStub) ClearCache()

ClearCache -

func (*StorerStub) Close

func (ss *StorerStub) Close() error

Close -

func (*StorerStub) DestroyUnit

func (ss *StorerStub) DestroyUnit() error

DestroyUnit -

func (*StorerStub) Get

func (ss *StorerStub) Get(key []byte) ([]byte, error)

Get -

func (*StorerStub) GetBulkFromEpoch added in v1.0.147

func (ss *StorerStub) GetBulkFromEpoch(keys [][]byte, epoch uint32) (map[string][]byte, error)

GetBulkFromEpoch -

func (*StorerStub) GetFromEpoch

func (ss *StorerStub) GetFromEpoch(key []byte, epoch uint32) ([]byte, error)

GetFromEpoch -

func (*StorerStub) Has

func (ss *StorerStub) Has(key []byte) error

Has -

func (*StorerStub) HasInEpoch

func (ss *StorerStub) HasInEpoch(key []byte, epoch uint32) error

HasInEpoch -

func (*StorerStub) IsInterfaceNil

func (ss *StorerStub) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*StorerStub) Put

func (ss *StorerStub) Put(key, data []byte) error

Put -

func (*StorerStub) PutInEpoch added in v1.1.1

func (ss *StorerStub) PutInEpoch(key, data []byte, epoch uint32) error

PutInEpoch -

func (*StorerStub) RangeKeys added in v1.0.138

func (ss *StorerStub) RangeKeys(handler func(key []byte, val []byte) bool)

RangeKeys -

func (*StorerStub) Remove

func (ss *StorerStub) Remove(key []byte) error

Remove -

func (*StorerStub) SearchFirst

func (ss *StorerStub) SearchFirst(key []byte) ([]byte, error)

SearchFirst -

type SyncStarterStub

type SyncStarterStub struct {
	SyncBlockCalled func() error
}

SyncStarterStub -

func (*SyncStarterStub) SyncBlock

func (sss *SyncStarterStub) SyncBlock() error

SyncBlock -

type SyncTimerMock

type SyncTimerMock struct {
	ClockOffsetCalled func() time.Duration
	CurrentTimeCalled func() time.Time
}

SyncTimerMock mocks the implementation for a SyncTimer

func (SyncTimerMock) ClockOffset

func (stm SyncTimerMock) ClockOffset() time.Duration

ClockOffset method gets the current time offset

func (*SyncTimerMock) Close added in v1.0.116

func (stm *SyncTimerMock) Close() error

Close -

func (SyncTimerMock) CurrentTime

func (stm SyncTimerMock) CurrentTime() time.Time

CurrentTime method gets the current time on which is added the current offset

func (SyncTimerMock) FormattedCurrentTime

func (stm SyncTimerMock) FormattedCurrentTime() string

FormattedCurrentTime method gets the formatted current time on which is added a given offset

func (*SyncTimerMock) IsInterfaceNil

func (stm *SyncTimerMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (SyncTimerMock) StartSyncingTime added in v1.0.116

func (stm SyncTimerMock) StartSyncingTime()

StartSyncingTime method does the time synchronization at every syncPeriod time elapsed. This should be started as a go routine

type TimeCacheStub added in v1.0.133

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

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

Add -

func (*TimeCacheStub) Has added in v1.0.133

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

Has -

func (*TimeCacheStub) IsInterfaceNil added in v1.0.133

func (tcs *TimeCacheStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*TimeCacheStub) Len added in v1.1.1

func (tcs *TimeCacheStub) Len() int

Len -

func (*TimeCacheStub) Sweep added in v1.0.133

func (tcs *TimeCacheStub) Sweep()

Sweep -

func (*TimeCacheStub) Upsert added in v1.0.133

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

Upsert -

type TopicAntiFloodStub

type TopicAntiFloodStub struct {
	IncreaseLoadCalled           func(pid core.PeerID, topic string, numMessages uint32) error
	ResetForTopicCalled          func(topic string)
	SetMaxMessagesForTopicCalled func(topic string, num uint32)
}

TopicAntiFloodStub -

func (*TopicAntiFloodStub) IncreaseLoad added in v1.0.106

func (t *TopicAntiFloodStub) IncreaseLoad(pid core.PeerID, topic string, numMessages uint32) error

IncreaseLoad -

func (*TopicAntiFloodStub) IsInterfaceNil

func (t *TopicAntiFloodStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*TopicAntiFloodStub) ResetForNotRegisteredTopics added in v1.0.106

func (t *TopicAntiFloodStub) ResetForNotRegisteredTopics()

ResetForNotRegisteredTopics -

func (*TopicAntiFloodStub) ResetForTopic

func (t *TopicAntiFloodStub) ResetForTopic(topic string)

ResetForTopic -

func (*TopicAntiFloodStub) SetMaxMessagesForTopic

func (t *TopicAntiFloodStub) SetMaxMessagesForTopic(topic string, num uint32)

SetMaxMessagesForTopic -

type TopicHandlerStub

type TopicHandlerStub struct {
	HasTopicCalled                 func(name string) bool
	CreateTopicCalled              func(name string, createChannelForTopic bool) error
	RegisterMessageProcessorCalled func(topic string, handler p2p.MessageProcessor) error
	IDCalled                       func() core.PeerID
}

TopicHandlerStub -

func (*TopicHandlerStub) CreateTopic

func (ths *TopicHandlerStub) CreateTopic(name string, createChannelForTopic bool) error

CreateTopic -

func (*TopicHandlerStub) HasTopic

func (ths *TopicHandlerStub) HasTopic(name string) bool

HasTopic -

func (*TopicHandlerStub) ID added in v1.1.1

func (ths *TopicHandlerStub) ID() core.PeerID

ID -

func (*TopicHandlerStub) IsInterfaceNil

func (ths *TopicHandlerStub) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*TopicHandlerStub) RegisterMessageProcessor

func (ths *TopicHandlerStub) RegisterMessageProcessor(topic string, handler p2p.MessageProcessor) error

RegisterMessageProcessor -

type TransactionCoordinatorMock

type TransactionCoordinatorMock struct {
	ComputeTransactionTypeCalled                         func(tx data.TransactionHandler) (process.TransactionType, process.TransactionType)
	RequestMiniBlocksCalled                              func(header data.HeaderHandler)
	RequestBlockTransactionsCalled                       func(body *block.Body)
	IsDataPreparedForProcessingCalled                    func(haveTime func() time.Duration) error
	SaveTxsToStorageCalled                               func(body *block.Body) error
	RestoreBlockDataFromStorageCalled                    func(body *block.Body) (int, error)
	RemoveBlockDataFromPoolCalled                        func(body *block.Body) error
	RemoveTxsFromPoolCalled                              func(body *block.Body) error
	ProcessBlockTransactionCalled                        func(body *block.Body, haveTime func() time.Duration) error
	CreateBlockStartedCalled                             func()
	CreateMbsAndProcessCrossShardTransactionsDstMeCalled func(
		header data.HeaderHandler,
		processedMiniBlocksHashes map[string]struct{},

		haveTime func() bool) (block.MiniBlockSlice, uint32, bool, error)
	CreateMbsAndProcessTransactionsFromMeCalled func(haveTime func() bool) block.MiniBlockSlice
	CreateMarshalizedDataCalled                 func(body *block.Body) map[string][][]byte
	GetAllCurrentUsedTxsCalled                  func(blockType block.Type) map[string]data.TransactionHandler
	VerifyCreatedBlockTransactionsCalled        func(hdr data.HeaderHandler, body *block.Body) error
	CreatePostProcessMiniBlocksCalled           func() block.MiniBlockSlice
	CreateMarshalizedReceiptsCalled             func() ([]byte, error)
	VerifyCreatedMiniBlocksCalled               func(hdr data.HeaderHandler, body *block.Body) error
}

TransactionCoordinatorMock -

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) CreateMarshalizedReceipts added in v1.1.1

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

CreateMarshalizedReceipts -

func (*TransactionCoordinatorMock) CreateMbsAndProcessCrossShardTransactionsDstMe

func (tcm *TransactionCoordinatorMock) CreateMbsAndProcessCrossShardTransactionsDstMe(
	header data.HeaderHandler,
	processedMiniBlocksHashes map[string]struct{},

	haveTime func() bool,
) (block.MiniBlockSlice, uint32, bool, error)

CreateMbsAndProcessCrossShardTransactionsDstMe -

func (*TransactionCoordinatorMock) CreateMbsAndProcessTransactionsFromMe

func (tcm *TransactionCoordinatorMock) CreateMbsAndProcessTransactionsFromMe(haveTime func() bool) block.MiniBlockSlice

CreateMbsAndProcessTransactionsFromMe -

func (*TransactionCoordinatorMock) CreatePostProcessMiniBlocks added in v1.0.115

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

CreatePostProcessMiniBlocks -

func (*TransactionCoordinatorMock) CreateReceiptsHash

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

CreateReceiptsHash -

func (*TransactionCoordinatorMock) GetAllCurrentUsedTxs

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

GetAllCurrentUsedTxs -

func (*TransactionCoordinatorMock) IsDataPreparedForProcessing

func (tcm *TransactionCoordinatorMock) IsDataPreparedForProcessing(haveTime func() time.Duration) error

IsDataPreparedForProcessing -

func (*TransactionCoordinatorMock) IsInterfaceNil

func (tcm *TransactionCoordinatorMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*TransactionCoordinatorMock) ProcessBlockTransaction

func (tcm *TransactionCoordinatorMock) ProcessBlockTransaction(body *block.Body, haveTime func() time.Duration) error

ProcessBlockTransaction -

func (*TransactionCoordinatorMock) RemoveBlockDataFromPool

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

RemoveBlockDataFromPool -

func (*TransactionCoordinatorMock) RemoveTxsFromPool added in v1.1.7

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

RemoveTxsFromPool -

func (*TransactionCoordinatorMock) RequestBlockTransactions

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

RequestBlockTransactions -

func (*TransactionCoordinatorMock) RequestMiniBlocks

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

RequestMiniBlocks -

func (*TransactionCoordinatorMock) RestoreBlockDataFromStorage

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

RestoreBlockDataFromStorage -

func (*TransactionCoordinatorMock) SaveTxsToStorage added in v1.1.7

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

SaveTxsToStorage -

func (*TransactionCoordinatorMock) VerifyCreatedBlockTransactions

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

VerifyCreatedBlockTransactions -

func (*TransactionCoordinatorMock) VerifyCreatedMiniBlocks added in v1.1.28

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

VerifyCreatedMiniBlocks -

type TransactionInterceptorMock

type TransactionInterceptorMock struct {
	IsChecked                   bool
	IsVerified                  bool
	RcvShardVal                 uint32
	SndShardVal                 uint32
	IsAddressedToOtherShardsVal bool

	Tx *transaction.Transaction
	// contains filtered or unexported fields
}

TransactionInterceptorMock -

func (*TransactionInterceptorMock) Check

func (tim *TransactionInterceptorMock) Check() bool

Check -

func (*TransactionInterceptorMock) GetTransaction

func (tim *TransactionInterceptorMock) GetTransaction() *transaction.Transaction

GetTransaction -

func (*TransactionInterceptorMock) Hash

func (tim *TransactionInterceptorMock) Hash() []byte

Hash -

func (*TransactionInterceptorMock) ID

ID -

func (*TransactionInterceptorMock) IsAddressedToOtherShards

func (tim *TransactionInterceptorMock) IsAddressedToOtherShards() bool

IsAddressedToOtherShards -

func (*TransactionInterceptorMock) IsInterfaceNil

func (tim *TransactionInterceptorMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*TransactionInterceptorMock) PubkeyConverter added in v1.0.104

func (tim *TransactionInterceptorMock) PubkeyConverter() core.PubkeyConverter

PubkeyConverter -

func (*TransactionInterceptorMock) RcvShard

func (tim *TransactionInterceptorMock) RcvShard() uint32

RcvShard -

func (*TransactionInterceptorMock) SetHash

func (tim *TransactionInterceptorMock) SetHash(hash []byte)

SetHash -

func (*TransactionInterceptorMock) SetPubkeyConverter added in v1.0.104

func (tim *TransactionInterceptorMock) SetPubkeyConverter(converter core.PubkeyConverter)

SetPubkeyConverter -

func (*TransactionInterceptorMock) SndShard

func (tim *TransactionInterceptorMock) SndShard() uint32

SndShard -

func (*TransactionInterceptorMock) VerifySig

func (tim *TransactionInterceptorMock) VerifySig() bool

VerifySig -

type TransactionPoolMock

type TransactionPoolMock struct {
	RegisterTransactionHandlerCalled func(transactionHandler func(txHash []byte))
	RemoveTransactionsFromPoolCalled func(txHashes [][]byte, destShardID uint32)
	MiniPoolTxStoreCalled            func(shardID uint32) (c storage.Cacher)
}

TransactionPoolMock -

func (*TransactionPoolMock) MiniPoolTxStore

func (tpm *TransactionPoolMock) MiniPoolTxStore(shardID uint32) (c storage.Cacher)

MiniPoolTxStore -

func (*TransactionPoolMock) RegisterTransactionHandler

func (tpm *TransactionPoolMock) RegisterTransactionHandler(transactionHandler func(txHash []byte))

RegisterTransactionHandler -

func (*TransactionPoolMock) RemoveTransactionsFromPool

func (tpm *TransactionPoolMock) RemoveTransactionsFromPool(txHashes [][]byte, destShardID uint32)

RemoveTransactionsFromPool -

type TrieStub

type TrieStub struct {
	GetCalled                   func(key []byte) ([]byte, error)
	UpdateCalled                func(key, value []byte) error
	DeleteCalled                func(key []byte) error
	RootCalled                  func() ([]byte, error)
	CommitCalled                func() error
	RecreateCalled              func(root []byte) (data.Trie, error)
	ResetOldHashesCalled        func() [][]byte
	AppendToOldHashesCalled     func([][]byte)
	GetSerializedNodesCalled    func([]byte, uint64) ([][]byte, uint64, error)
	GetAllHashesCalled          func() ([][]byte, error)
	GetAllLeavesOnChannelCalled func(rootHash []byte) (chan core.KeyValueHolder, error)
	GetProofCalled              func(key []byte) ([][]byte, error)
	VerifyProofCalled           func(key []byte, proof [][]byte) (bool, error)
	GetStorageManagerCalled     func() data.StorageManager
	GetSerializedNodeCalled     func(bytes []byte) ([]byte, error)
	GetNumNodesCalled           func() data.NumNodesDTO
}

TrieStub -

func (*TrieStub) AppendToOldHashes

func (ts *TrieStub) AppendToOldHashes(hashes [][]byte)

AppendToOldHashes appends the given hashes to the trie's oldHashes variable

func (*TrieStub) ClosePersister

func (ts *TrieStub) ClosePersister() error

ClosePersister -

func (*TrieStub) Commit

func (ts *TrieStub) Commit() error

Commit -

func (*TrieStub) Delete

func (ts *TrieStub) Delete(key []byte) error

Delete -

func (*TrieStub) Get

func (ts *TrieStub) Get(key []byte) ([]byte, error)

Get -

func (*TrieStub) GetAllHashes added in v1.0.137

func (ts *TrieStub) GetAllHashes() ([][]byte, error)

GetAllHashes -

func (*TrieStub) GetAllLeavesOnChannel added in v1.0.137

func (ts *TrieStub) GetAllLeavesOnChannel(rootHash []byte, _ context.Context) (chan core.KeyValueHolder, error)

GetAllLeavesOnChannel -

func (*TrieStub) GetDirtyHashes added in v1.0.111

func (ts *TrieStub) GetDirtyHashes() (data.ModifiedHashes, error)

GetDirtyHashes -

func (*TrieStub) GetNumNodes added in v1.1.45

func (ts *TrieStub) GetNumNodes() data.NumNodesDTO

GetNumNodes -

func (*TrieStub) GetProof added in v1.1.28

func (ts *TrieStub) GetProof(key []byte) ([][]byte, error)

GetProof -

func (*TrieStub) GetSerializedNode added in v1.1.45

func (ts *TrieStub) GetSerializedNode(bytes []byte) ([]byte, error)

GetSerializedNode -

func (*TrieStub) GetSerializedNodes

func (ts *TrieStub) GetSerializedNodes(hash []byte, maxBuffToSend uint64) ([][]byte, uint64, error)

GetSerializedNodes -

func (*TrieStub) GetStorageManager added in v1.1.28

func (ts *TrieStub) GetStorageManager() data.StorageManager

GetStorageManager -

func (*TrieStub) IsInterfaceNil

func (ts *TrieStub) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*TrieStub) Recreate

func (ts *TrieStub) Recreate(root []byte) (data.Trie, error)

Recreate -

func (*TrieStub) ResetOldHashes

func (ts *TrieStub) ResetOldHashes() [][]byte

ResetOldHashes resets the oldHashes and oldRoot variables and returns the old hashes

func (*TrieStub) RootHash added in v1.1.28

func (ts *TrieStub) RootHash() ([]byte, error)

RootHash -

func (*TrieStub) SetNewHashes added in v1.0.111

func (ts *TrieStub) SetNewHashes(_ data.ModifiedHashes)

SetNewHashes -

func (*TrieStub) String

func (ts *TrieStub) String() string

String -

func (*TrieStub) Update

func (ts *TrieStub) Update(key, value []byte) error

Update -

func (*TrieStub) VerifyProof added in v1.0.77

func (ts *TrieStub) VerifyProof(key []byte, proof [][]byte) (bool, error)

VerifyProof -

type TxForCurrentBlockStub

type TxForCurrentBlockStub struct {
	CleanCalled func()
	GetTxCalled func(txHash []byte) (data.TransactionHandler, error)
	AddTxCalled func(txHash []byte, tx data.TransactionHandler)
}

TxForCurrentBlockStub -

func (*TxForCurrentBlockStub) AddTx

func (t *TxForCurrentBlockStub) AddTx(txHash []byte, tx data.TransactionHandler)

AddTx -

func (*TxForCurrentBlockStub) Clean

func (t *TxForCurrentBlockStub) Clean()

Clean -

func (*TxForCurrentBlockStub) GetTx

func (t *TxForCurrentBlockStub) GetTx(txHash []byte) (data.TransactionHandler, error)

GetTx -

func (*TxForCurrentBlockStub) IsInterfaceNil

func (t *TxForCurrentBlockStub) IsInterfaceNil() bool

IsInterfaceNil -

type TxLogsProcessorStub added in v1.0.104

type TxLogsProcessorStub struct {
	GetLogCalled  func(txHash []byte) (data.LogHandler, error)
	SaveLogCalled func(txHash []byte, tx data.TransactionHandler, vmLogs []*vmcommon.LogEntry) error
}

TxLogsProcessorStub -

func (*TxLogsProcessorStub) GetLog added in v1.0.104

func (txls *TxLogsProcessorStub) GetLog(txHash []byte) (data.LogHandler, error)

GetLog -

func (*TxLogsProcessorStub) IsInterfaceNil added in v1.0.104

func (txls *TxLogsProcessorStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*TxLogsProcessorStub) SaveLog added in v1.0.104

func (txls *TxLogsProcessorStub) SaveLog(txHash []byte, tx data.TransactionHandler, vmLogs []*vmcommon.LogEntry) error

SaveLog -

type TxProcessorMock

type TxProcessorMock struct {
	ProcessTransactionCalled         func(transaction *transaction.Transaction) (vmcommon.ReturnCode, 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 (tp *TxProcessorMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*TxProcessorMock) ProcessSmartContractResult

func (tp *TxProcessorMock) ProcessSmartContractResult(scr *smartContractResult.SmartContractResult) (vmcommon.ReturnCode, error)

ProcessSmartContractResult -

func (*TxProcessorMock) ProcessTransaction

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

ProcessTransaction -

func (*TxProcessorMock) SetBalancesToTrie

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

SetBalancesToTrie -

type TxTypeHandlerMock

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

TxTypeHandlerMock -

func (*TxTypeHandlerMock) ComputeTransactionType

ComputeTransactionType -

func (*TxTypeHandlerMock) IsInterfaceNil

func (th *TxTypeHandlerMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

type TxValidatorHandlerStub

type TxValidatorHandlerStub struct {
	SenderShardIdCalled   func() uint32
	ReceiverShardIdCalled func() uint32
	NonceCalled           func() uint64
	SenderAddressCalled   func() []byte
	FeeCalled             func() *big.Int
}

TxValidatorHandlerStub -

func (*TxValidatorHandlerStub) Fee

func (tvhs *TxValidatorHandlerStub) Fee() *big.Int

Fee -

func (*TxValidatorHandlerStub) Nonce

func (tvhs *TxValidatorHandlerStub) Nonce() uint64

Nonce -

func (*TxValidatorHandlerStub) ReceiverShardId

func (tvhs *TxValidatorHandlerStub) ReceiverShardId() uint32

ReceiverShardId -

func (*TxValidatorHandlerStub) SenderAddress

func (tvhs *TxValidatorHandlerStub) SenderAddress() []byte

SenderAddress -

func (*TxValidatorHandlerStub) SenderShardId

func (tvhs *TxValidatorHandlerStub) SenderShardId() uint32

SenderShardId -

type TxValidatorStub

type TxValidatorStub struct {
	CheckTxValidityCalled  func(txValidatorHandler process.TxValidatorHandler) error
	CheckTxWhiteListCalled func(data process.InterceptedData) error
	RejectedTxsCalled      func() uint64
}

TxValidatorStub -

func (*TxValidatorStub) CheckTxValidity

func (t *TxValidatorStub) CheckTxValidity(txValidatorHandler process.TxValidatorHandler) error

CheckTxValidity -

func (*TxValidatorStub) CheckTxWhiteList added in v1.0.133

func (t *TxValidatorStub) CheckTxWhiteList(data process.InterceptedData) error

CheckTxWhiteList -

func (*TxValidatorStub) IsInterfaceNil

func (t *TxValidatorStub) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

type Uint64ByteSliceConverterMock

type Uint64ByteSliceConverterMock struct {
	ToByteSliceCalled func(uint64) []byte
	ToUint64Called    func([]byte) (uint64, error)
}

Uint64ByteSliceConverterMock converts byte slice to/from uint64

func (*Uint64ByteSliceConverterMock) IsInterfaceNil

func (u *Uint64ByteSliceConverterMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*Uint64ByteSliceConverterMock) ToByteSlice

func (u *Uint64ByteSliceConverterMock) ToByteSlice(p uint64) []byte

ToByteSlice is a mock implementation for Uint64ByteSliceConverter

func (*Uint64ByteSliceConverterMock) ToUint64

func (u *Uint64ByteSliceConverterMock) ToUint64(p []byte) (uint64, error)

ToUint64 is a mock implementation for Uint64ByteSliceConverter

type Uint64SyncMapCacherStub

type Uint64SyncMapCacherStub struct {
	ClearCalled             func()
	GetCalled               func(nonce uint64) (dataRetriever.ShardIdHashMap, bool)
	MergeCalled             func(nonce uint64, src dataRetriever.ShardIdHashMap)
	RemoveCalled            func(nonce uint64, shardId uint32)
	RegisterHandlerCalled   func(handler func(nonce uint64, shardId uint32, value []byte))
	HasCalled               func(nonce uint64, shardId uint32) bool
	UnRegisterHandlerCalled func(func(key []byte, value interface{}))
}

Uint64SyncMapCacherStub -

func (*Uint64SyncMapCacherStub) Clear

func (usmcs *Uint64SyncMapCacherStub) Clear()

Clear -

func (*Uint64SyncMapCacherStub) Get

Get -

func (*Uint64SyncMapCacherStub) Has

func (usmcs *Uint64SyncMapCacherStub) Has(nonce uint64, shardId uint32) bool

Has -

func (*Uint64SyncMapCacherStub) IsInterfaceNil

func (usmcs *Uint64SyncMapCacherStub) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*Uint64SyncMapCacherStub) Merge

Merge -

func (*Uint64SyncMapCacherStub) RegisterHandler

func (usmcs *Uint64SyncMapCacherStub) RegisterHandler(handler func(nonce uint64, shardId uint32, value []byte))

RegisterHandler -

func (*Uint64SyncMapCacherStub) Remove

func (usmcs *Uint64SyncMapCacherStub) Remove(nonce uint64, shardId uint32)

Remove -

func (*Uint64SyncMapCacherStub) UnRegisterHandler added in v1.0.126

func (usmcs *Uint64SyncMapCacherStub) UnRegisterHandler(handler func(key []byte, value interface{}))

UnRegisterHandler -

type UnsignedTxHandlerMock

type UnsignedTxHandlerMock struct {
	CleanProcessedUtxsCalled    func()
	ProcessTransactionFeeCalled func(cost *big.Int, hash []byte)
	CreateAllUTxsCalled         func() []data.TransactionHandler
	VerifyCreatedUTxsCalled     func() error
	AddTxFeeFromBlockCalled     func(tx data.TransactionHandler)
}

UnsignedTxHandlerMock -

func (*UnsignedTxHandlerMock) AddRewardTxFromBlock

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

AddRewardTxFromBlock -

func (*UnsignedTxHandlerMock) CleanProcessedUTxs

func (ut *UnsignedTxHandlerMock) CleanProcessedUTxs()

CleanProcessedUTxs -

func (*UnsignedTxHandlerMock) CreateAllUTxs

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

CreateAllUTxs -

func (*UnsignedTxHandlerMock) IsInterfaceNil

func (ut *UnsignedTxHandlerMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*UnsignedTxHandlerMock) ProcessTransactionFee

func (ut *UnsignedTxHandlerMock) ProcessTransactionFee(cost *big.Int, hash []byte)

ProcessTransactionFee -

func (*UnsignedTxHandlerMock) VerifyCreatedUTxs

func (ut *UnsignedTxHandlerMock) VerifyCreatedUTxs() error

VerifyCreatedUTxs -

type UserAccountStub

type UserAccountStub struct {
	AddToBalanceCalled    func(value *big.Int) error
	DataTrieTrackerCalled func() state.DataTrieTracker
}

UserAccountStub -

func (*UserAccountStub) AddToBalance

func (u *UserAccountStub) AddToBalance(value *big.Int) error

AddToBalance -

func (*UserAccountStub) AddToDeveloperReward

func (u *UserAccountStub) AddToDeveloperReward(*big.Int)

AddToDeveloperReward -

func (*UserAccountStub) AddressBytes added in v1.0.113

func (u *UserAccountStub) AddressBytes() []byte

AddressBytes -

func (*UserAccountStub) ChangeOwnerAddress

func (u *UserAccountStub) ChangeOwnerAddress([]byte, []byte) error

ChangeOwnerAddress -

func (*UserAccountStub) ClaimDeveloperRewards

func (u *UserAccountStub) ClaimDeveloperRewards([]byte) (*big.Int, error)

ClaimDeveloperRewards -

func (*UserAccountStub) DataTrie

func (u *UserAccountStub) DataTrie() data.Trie

DataTrie -

func (*UserAccountStub) DataTrieTracker

func (u *UserAccountStub) DataTrieTracker() state.DataTrieTracker

DataTrieTracker -

func (*UserAccountStub) GetBalance

func (u *UserAccountStub) GetBalance() *big.Int

GetBalance -

func (*UserAccountStub) GetCodeHash

func (u *UserAccountStub) GetCodeHash() []byte

GetCodeHash -

func (*UserAccountStub) GetCodeMetadata added in v1.0.103

func (u *UserAccountStub) GetCodeMetadata() []byte

GetCodeMetadata -

func (*UserAccountStub) GetDeveloperReward

func (u *UserAccountStub) GetDeveloperReward() *big.Int

GetDeveloperReward -

func (*UserAccountStub) GetNonce

func (u *UserAccountStub) GetNonce() uint64

GetNonce -

func (*UserAccountStub) GetOwnerAddress

func (u *UserAccountStub) GetOwnerAddress() []byte

GetOwnerAddress -

func (*UserAccountStub) GetRootHash

func (u *UserAccountStub) GetRootHash() []byte

GetRootHash -

func (*UserAccountStub) GetUserName added in v1.0.103

func (u *UserAccountStub) GetUserName() []byte

GetUserName -

func (*UserAccountStub) HasNewCode added in v1.1.22

func (u *UserAccountStub) HasNewCode() bool

HasNewCode -

func (*UserAccountStub) IncreaseNonce

func (u *UserAccountStub) IncreaseNonce(_ uint64)

IncreaseNonce -

func (*UserAccountStub) IsInterfaceNil

func (u *UserAccountStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*UserAccountStub) SetCode

func (u *UserAccountStub) SetCode(_ []byte)

SetCode -

func (*UserAccountStub) SetCodeHash

func (u *UserAccountStub) SetCodeHash([]byte)

SetCodeHash -

func (*UserAccountStub) SetCodeMetadata added in v1.0.103

func (u *UserAccountStub) SetCodeMetadata(_ []byte)

SetCodeMetadata -

func (*UserAccountStub) SetDataTrie

func (u *UserAccountStub) SetDataTrie(_ data.Trie)

SetDataTrie -

func (*UserAccountStub) SetOwnerAddress

func (u *UserAccountStub) SetOwnerAddress([]byte)

SetOwnerAddress -

func (*UserAccountStub) SetRootHash

func (u *UserAccountStub) SetRootHash([]byte)

SetRootHash -

func (*UserAccountStub) SetUserName added in v1.0.103

func (u *UserAccountStub) SetUserName(_ []byte)

SetUserName -

func (*UserAccountStub) SubFromBalance

func (u *UserAccountStub) SubFromBalance(_ *big.Int) error

SubFromBalance -

type VMContainerMock

type VMContainerMock struct {
	GetCalled         func(key []byte) (vmcommon.VMExecutionHandler, error)
	AddCalled         func(key []byte, val vmcommon.VMExecutionHandler) error
	AddMultipleCalled func(keys [][]byte, preprocessors []vmcommon.VMExecutionHandler) error
	ReplaceCalled     func(key []byte, val vmcommon.VMExecutionHandler) error
	RemoveCalled      func(key []byte)
	LenCalled         func() int
	KeysCalled        func() [][]byte
}

VMContainerMock -

func (*VMContainerMock) Add

Add -

func (*VMContainerMock) AddMultiple

func (v *VMContainerMock) AddMultiple(keys [][]byte, vms []vmcommon.VMExecutionHandler) error

AddMultiple -

func (*VMContainerMock) Close added in v0.0.5

func (v *VMContainerMock) Close() error

Close -

func (*VMContainerMock) Get

Get -

func (*VMContainerMock) IsInterfaceNil

func (v *VMContainerMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*VMContainerMock) Keys

func (v *VMContainerMock) Keys() [][]byte

Keys -

func (*VMContainerMock) Len

func (v *VMContainerMock) Len() int

Len -

func (*VMContainerMock) Remove

func (v *VMContainerMock) Remove(key []byte)

Remove -

func (*VMContainerMock) Replace

func (v *VMContainerMock) Replace(key []byte, val vmcommon.VMExecutionHandler) error

Replace -

type VMExecutionHandlerStub

type VMExecutionHandlerStub struct {
	RunSmartContractCreateCalled func(input *vmcommon.ContractCreateInput) (*vmcommon.VMOutput, error)
	RunSmartContractCallCalled   func(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error)
	GasScheduleChangeCalled      func(gasSchedule map[string]map[string]uint64)
}

VMExecutionHandlerStub -

func (*VMExecutionHandlerStub) GasScheduleChange added in v1.1.12

func (vm *VMExecutionHandlerStub) GasScheduleChange(gasSchedule map[string]map[string]uint64)

GasScheduleChange -

func (*VMExecutionHandlerStub) IsInterfaceNil added in v1.1.12

func (vm *VMExecutionHandlerStub) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*VMExecutionHandlerStub) RunSmartContractCall

func (vm *VMExecutionHandlerStub) RunSmartContractCall(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error)

RunSmartContractCall computes the result of a smart contract call and how the system must change after the execution

func (*VMExecutionHandlerStub) RunSmartContractCreate

func (vm *VMExecutionHandlerStub) RunSmartContractCreate(input *vmcommon.ContractCreateInput) (*vmcommon.VMOutput, error)

RunSmartContractCreate computes how a smart contract creation should be performed

type ValidatorMock

type ValidatorMock struct {
	PubKeyCalled func() []byte
	// contains filtered or unexported fields
}

ValidatorMock -

func NewValidatorMock

func NewValidatorMock(pubkey []byte) *ValidatorMock

NewValidatorMock -

func (*ValidatorMock) Chances added in v0.0.5

func (vm *ValidatorMock) Chances() uint32

Chances -

func (*ValidatorMock) Index added in v1.0.102

func (vm *ValidatorMock) Index() uint32

Index -

func (*ValidatorMock) PubKey

func (vm *ValidatorMock) PubKey() []byte

PubKey -

func (*ValidatorMock) Size added in v1.0.123

func (vm *ValidatorMock) Size() int

Size -

type ValidatorSettingsStub

type ValidatorSettingsStub struct {
}

ValidatorSettingsStub -

func (*ValidatorSettingsStub) GenesisNodePrice

func (v *ValidatorSettingsStub) GenesisNodePrice() *big.Int

GenesisNodePrice -

func (*ValidatorSettingsStub) IsInterfaceNil

func (v *ValidatorSettingsStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*ValidatorSettingsStub) UnBondPeriod

func (v *ValidatorSettingsStub) UnBondPeriod() uint64

UnBondPeriod -

type ValidatorStatisticsProcessorStub

type ValidatorStatisticsProcessorStub struct {
	UpdatePeerStateCalled                    func(header data.HeaderHandler) ([]byte, error)
	RevertPeerStateCalled                    func(header data.HeaderHandler) error
	GetPeerAccountCalled                     func(address []byte) (state.PeerAccountHandler, error)
	RootHashCalled                           func() ([]byte, error)
	LastFinalizedRootHashCalled              func() []byte
	ResetValidatorStatisticsAtNewEpochCalled func(vInfos map[uint32][]*state.ValidatorInfo) error
	GetValidatorInfoForRootHashCalled        func(rootHash []byte) (map[uint32][]*state.ValidatorInfo, error)
	ProcessRatingsEndOfEpochCalled           func(validatorInfos map[uint32][]*state.ValidatorInfo, 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 v0.0.5

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

Commit -

func (*ValidatorStatisticsProcessorStub) DisplayRatings added in v1.0.111

func (vsp *ValidatorStatisticsProcessorStub) DisplayRatings(_ uint32)

DisplayRatings -

func (*ValidatorStatisticsProcessorStub) GetExistingPeerAccount added in v1.1.1

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

GetExistingPeerAccount -

func (*ValidatorStatisticsProcessorStub) GetValidatorInfoForRootHash

func (vsp *ValidatorStatisticsProcessorStub) GetValidatorInfoForRootHash(rootHash []byte) (map[uint32][]*state.ValidatorInfo, error)

GetValidatorInfoForRootHash -

func (*ValidatorStatisticsProcessorStub) IsInterfaceNil

func (vsp *ValidatorStatisticsProcessorStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*ValidatorStatisticsProcessorStub) LastFinalizedRootHash added in v1.0.118

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

LastFinalizedRootHash -

func (*ValidatorStatisticsProcessorStub) PeerAccountToValidatorInfo added in v1.1.1

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

PeerAccountToValidatorInfo -

func (*ValidatorStatisticsProcessorStub) Process

Process -

func (*ValidatorStatisticsProcessorStub) ProcessRatingsEndOfEpoch added in v0.0.5

func (vsp *ValidatorStatisticsProcessorStub) ProcessRatingsEndOfEpoch(validatorInfos map[uint32][]*state.ValidatorInfo, epoch uint32) error

ProcessRatingsEndOfEpoch -

func (*ValidatorStatisticsProcessorStub) ResetValidatorStatisticsAtNewEpoch

func (vsp *ValidatorStatisticsProcessorStub) ResetValidatorStatisticsAtNewEpoch(vInfos map[uint32][]*state.ValidatorInfo) error

ResetValidatorStatisticsAtNewEpoch -

func (*ValidatorStatisticsProcessorStub) RevertPeerState

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

RevertPeerState -

func (*ValidatorStatisticsProcessorStub) RootHash

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

RootHash -

func (*ValidatorStatisticsProcessorStub) SaveNodesCoordinatorUpdates added in v1.1.15

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

SaveNodesCoordinatorUpdates -

func (*ValidatorStatisticsProcessorStub) SetLastFinalizedRootHash added in v1.0.118

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

SetLastFinalizedRootHash -

func (*ValidatorStatisticsProcessorStub) UpdatePeerState

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

UpdatePeerState -

type ValidatorsProviderStub added in v1.0.117

type ValidatorsProviderStub struct {
	GetLatestValidatorsCalled func() map[string]*state.ValidatorApiResponse
}

ValidatorsProviderStub -

func (*ValidatorsProviderStub) GetLatestValidators added in v1.0.117

func (vp *ValidatorsProviderStub) GetLatestValidators() map[string]*state.ValidatorApiResponse

GetLatestValidators -

func (*ValidatorsProviderStub) IsInterfaceNil added in v1.0.117

func (vp *ValidatorsProviderStub) IsInterfaceNil() bool

IsInterfaceNil -

type ValidityAttesterStub

type ValidityAttesterStub struct {
	CheckBlockAgainstRounderCalled   func(headerHandler data.HeaderHandler) error
	CheckBlockAgainstFinalCalled     func(headerHandler data.HeaderHandler) error
	CheckBlockAgainstWhitelistCalled func(interceptedData process.InterceptedData) bool
}

ValidityAttesterStub -

func (*ValidityAttesterStub) CheckBlockAgainstFinal

func (vas *ValidityAttesterStub) CheckBlockAgainstFinal(headerHandler data.HeaderHandler) error

CheckBlockAgainstFinal -

func (*ValidityAttesterStub) CheckBlockAgainstRounder

func (vas *ValidityAttesterStub) CheckBlockAgainstRounder(headerHandler data.HeaderHandler) error

CheckBlockAgainstRounder -

func (*ValidityAttesterStub) CheckBlockAgainstWhitelist added in v1.0.138

func (vas *ValidityAttesterStub) CheckBlockAgainstWhitelist(interceptedData process.InterceptedData) bool

CheckBlockAgainstWhitelist -

func (*ValidityAttesterStub) IsInterfaceNil

func (vas *ValidityAttesterStub) IsInterfaceNil() bool

IsInterfaceNil -

type WhiteListHandlerStub added in v1.0.102

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

WhiteListHandlerStub -

func (*WhiteListHandlerStub) Add added in v1.0.102

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

Add -

func (*WhiteListHandlerStub) IsForCurrentShard added in v1.0.102

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

IsForCurrentShard -

func (*WhiteListHandlerStub) IsInterfaceNil added in v1.0.102

func (w *WhiteListHandlerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*WhiteListHandlerStub) IsWhiteListed added in v1.0.102

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

IsWhiteListed -

func (*WhiteListHandlerStub) Remove added in v1.0.102

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