mock

package
v1.10.3 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2025 License: GPL-3.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnableEpochsHandlerMock

type EnableEpochsHandlerMock struct {
	RefactorPeersMiniBlocksEnableEpochField   uint32
	IsRefactorPeersMiniBlocksFlagEnabledField bool
	CurrentEpoch                              uint32
}

EnableEpochsHandlerMock -

func (*EnableEpochsHandlerMock) GetActivationEpoch added in v1.7.0

func (mock *EnableEpochsHandlerMock) GetActivationEpoch(flag core.EnableEpochFlag) uint32

GetActivationEpoch -

func (*EnableEpochsHandlerMock) GetCurrentEpoch added in v1.7.0

func (mock *EnableEpochsHandlerMock) GetCurrentEpoch() uint32

GetCurrentEpoch -

func (*EnableEpochsHandlerMock) IsFlagDefined added in v1.7.0

func (mock *EnableEpochsHandlerMock) IsFlagDefined(_ core.EnableEpochFlag) bool

IsFlagDefined returns true

func (*EnableEpochsHandlerMock) IsFlagEnabled added in v1.7.0

func (mock *EnableEpochsHandlerMock) IsFlagEnabled(_ core.EnableEpochFlag) bool

IsFlagEnabled returns true

func (*EnableEpochsHandlerMock) IsFlagEnabledInEpoch added in v1.7.0

func (mock *EnableEpochsHandlerMock) IsFlagEnabledInEpoch(_ core.EnableEpochFlag, _ uint32) bool

IsFlagEnabledInEpoch returns true

func (*EnableEpochsHandlerMock) IsInterfaceNil

func (mock *EnableEpochsHandlerMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

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 NodesCoordinatorCacheMock

type NodesCoordinatorCacheMock struct {
	ClearCalled func()
	PutCalled   func(key []byte, value interface{}, sieInBytes int) (evicted bool)
	GetCalled   func(key []byte) (value interface{}, ok bool)
}

NodesCoordinatorCacheMock -

func (*NodesCoordinatorCacheMock) Clear

func (rm *NodesCoordinatorCacheMock) Clear()

Clear -

func (*NodesCoordinatorCacheMock) Get

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

Get -

func (*NodesCoordinatorCacheMock) Put

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

Put -

type NodesSetupMock added in v1.7.0

type NodesSetupMock struct {
	MinShardHysteresisNodesCalled func() uint32
	MinMetaHysteresisNodesCalled  func() uint32
}

NodesSetupMock -

func (*NodesSetupMock) IsInterfaceNil added in v1.7.0

func (mock *NodesSetupMock) IsInterfaceNil() bool

IsInterfaceNil -

func (*NodesSetupMock) MinMetaHysteresisNodes added in v1.7.0

func (mock *NodesSetupMock) MinMetaHysteresisNodes() uint32

MinMetaHysteresisNodes -

func (*NodesSetupMock) MinShardHysteresisNodes added in v1.7.0

func (mock *NodesSetupMock) MinShardHysteresisNodes() uint32

MinShardHysteresisNodes -

type PubkeyConverterMock

type PubkeyConverterMock struct {
	DecodeCalled func() ([]byte, error)
	// contains filtered or unexported fields
}

PubkeyConverterMock -

func NewPubkeyConverterMock

func NewPubkeyConverterMock(addressLen int) *PubkeyConverterMock

NewPubkeyConverterMock -

func (*PubkeyConverterMock) Decode

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

Decode -

func (*PubkeyConverterMock) Encode

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

Encode -

func (*PubkeyConverterMock) EncodeSlice added in v1.6.0

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

EncodeSlice -

func (*PubkeyConverterMock) IsInterfaceNil

func (pcm *PubkeyConverterMock) IsInterfaceNil() bool

IsInterfaceNil -

func (*PubkeyConverterMock) Len

func (pcm *PubkeyConverterMock) Len() int

Len -

func (*PubkeyConverterMock) SilentEncode added in v1.6.0

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

SilentEncode -

type RaterMock

type RaterMock struct {
	ComputeRatingCalled  func(string, uint32) uint32
	GetRatingCalled      func(string) uint32
	GetStartRatingCalled func() uint32
	GetChancesCalled     func(uint32) uint32
}

RaterMock -

func (*RaterMock) ComputeRating

func (rm *RaterMock) ComputeRating(ratingOptionKey string, previousValue uint32) uint32

ComputeRating -

func (*RaterMock) GetChance

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

GetChance -

func (*RaterMock) GetRating

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

GetRating -

func (*RaterMock) GetStartRating

func (rm *RaterMock) GetStartRating() uint32

GetStartRating -

func (*RaterMock) IsInterfaceNil

func (rm *RaterMock) IsInterfaceNil() bool

IsInterfaceNil -

type ShuffledOutHandlerStub

type ShuffledOutHandlerStub struct {
	ProcessCalled         func(newShardID uint32) error
	RegisterHandlerCalled func(handler func(newShardID uint32))
	CurrentShardIDCalled  func() uint32
}

ShuffledOutHandlerStub -

func (*ShuffledOutHandlerStub) CurrentShardID

func (s *ShuffledOutHandlerStub) CurrentShardID() uint32

CurrentShardID -

func (*ShuffledOutHandlerStub) IsInterfaceNil

func (s *ShuffledOutHandlerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*ShuffledOutHandlerStub) Process

func (s *ShuffledOutHandlerStub) Process(newShardID uint32) error

Process -

func (*ShuffledOutHandlerStub) RegisterHandler

func (s *ShuffledOutHandlerStub) RegisterHandler(handler func(newShardID uint32))

RegisterHandler -

Jump to

Keyboard shortcuts

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