txcachemocks

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2025 License: GPL-3.0 Imports: 4 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 MempoolHostMock added in v1.8.6

type MempoolHostMock struct {
	ComputeTxFeeCalled        func(tx data.TransactionWithFeeHandler) *big.Int
	GetTransferredValueCalled func(tx data.TransactionHandler) *big.Int
}

MempoolHostMock -

func NewMempoolHostMock added in v1.8.6

func NewMempoolHostMock() *MempoolHostMock

NewMempoolHostMock -

func (*MempoolHostMock) ComputeTxFee added in v1.8.6

func (mock *MempoolHostMock) ComputeTxFee(tx data.TransactionWithFeeHandler) *big.Int

ComputeTxFee -

func (*MempoolHostMock) GetTransferredValue added in v1.8.6

func (mock *MempoolHostMock) GetTransferredValue(tx data.TransactionHandler) *big.Int

GetTransferredValue -

func (*MempoolHostMock) IsInterfaceNil added in v1.8.6

func (mock *MempoolHostMock) IsInterfaceNil() bool

IsInterfaceNil -

type TxCacheMock added in v1.8.5

type TxCacheMock struct {
	ClearCalled             func()
	PutCalled               func(key []byte, value interface{}, sizeInBytes int) (evicted bool)
	GetCalled               func(key []byte) (value interface{}, ok bool)
	HasCalled               func(key []byte) bool
	PeekCalled              func(key []byte) (value interface{}, ok bool)
	HasOrAddCalled          func(key []byte, value interface{}, sizeInBytes int) (has, added bool)
	RemoveCalled            func(key []byte)
	RemoveOldestCalled      func()
	KeysCalled              func() [][]byte
	LenCalled               func() int
	MaxSizeCalled           func() int
	RegisterHandlerCalled   func(func(key []byte, value interface{}))
	UnRegisterHandlerCalled func(id string)
	CloseCalled             func() error

	AddTxCalled                        func(tx *txcache.WrappedTransaction) (ok bool, added bool)
	GetByTxHashCalled                  func(txHash []byte) (*txcache.WrappedTransaction, bool)
	RemoveTxByHashCalled               func(txHash []byte) bool
	ImmunizeTxsAgainstEvictionCalled   func(keys [][]byte)
	ForEachTransactionCalled           func(txcache.ForEachTransaction)
	NumBytesCalled                     func() int
	DiagnoseCalled                     func(deep bool)
	GetTransactionsPoolForSenderCalled func(sender string) []*txcache.WrappedTransaction
}

TxCacheMock -

func NewTxCacheStub added in v1.8.5

func NewTxCacheStub() *TxCacheMock

NewTxCacheStub -

func (*TxCacheMock) AddTx added in v1.8.5

func (cache *TxCacheMock) AddTx(tx *txcache.WrappedTransaction) (ok bool, added bool)

AddTx -

func (*TxCacheMock) Clear added in v1.8.5

func (cache *TxCacheMock) Clear()

Clear -

func (*TxCacheMock) Close added in v1.8.5

func (cache *TxCacheMock) Close() error

Close -

func (*TxCacheMock) Diagnose added in v1.8.5

func (cache *TxCacheMock) Diagnose(deep bool)

Diagnose -

func (*TxCacheMock) ForEachTransaction added in v1.8.5

func (cache *TxCacheMock) ForEachTransaction(fn txcache.ForEachTransaction)

ForEachTransaction -

func (*TxCacheMock) Get added in v1.8.5

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

Get -

func (*TxCacheMock) GetByTxHash added in v1.8.5

func (cache *TxCacheMock) GetByTxHash(txHash []byte) (*txcache.WrappedTransaction, bool)

GetByTxHash -

func (*TxCacheMock) GetTransactionsPoolForSender added in v1.8.5

func (cache *TxCacheMock) GetTransactionsPoolForSender(sender string) []*txcache.WrappedTransaction

GetTransactionsPoolForSender -

func (*TxCacheMock) Has added in v1.8.5

func (cache *TxCacheMock) Has(key []byte) bool

Has -

func (*TxCacheMock) HasOrAdd added in v1.8.5

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

HasOrAdd -

func (*TxCacheMock) ImmunizeTxsAgainstEviction added in v1.8.5

func (cache *TxCacheMock) ImmunizeTxsAgainstEviction(keys [][]byte)

ImmunizeTxsAgainstEviction -

func (*TxCacheMock) IsInterfaceNil added in v1.8.5

func (cache *TxCacheMock) IsInterfaceNil() bool

IsInterfaceNil -

func (*TxCacheMock) Keys added in v1.8.5

func (cache *TxCacheMock) Keys() [][]byte

Keys -

func (*TxCacheMock) Len added in v1.8.5

func (cache *TxCacheMock) Len() int

Len -

func (*TxCacheMock) MaxSize added in v1.8.5

func (cache *TxCacheMock) MaxSize() int

MaxSize -

func (*TxCacheMock) NumBytes added in v1.8.5

func (cache *TxCacheMock) NumBytes() int

NumBytes -

func (*TxCacheMock) Peek added in v1.8.5

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

Peek -

func (*TxCacheMock) Put added in v1.8.5

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

Put -

func (*TxCacheMock) RegisterHandler added in v1.8.5

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

RegisterHandler -

func (*TxCacheMock) Remove added in v1.8.5

func (cache *TxCacheMock) Remove(key []byte)

Remove -

func (*TxCacheMock) RemoveTxByHash added in v1.8.5

func (cache *TxCacheMock) RemoveTxByHash(txHash []byte) bool

RemoveTxByHash -

func (*TxCacheMock) SizeInBytesContained added in v1.8.5

func (cache *TxCacheMock) SizeInBytesContained() uint64

SizeInBytesContained -

func (*TxCacheMock) UnRegisterHandler added in v1.8.5

func (cache *TxCacheMock) UnRegisterHandler(id string)

UnRegisterHandler -

type TxGasHandler

type TxGasHandler interface {
	MinGasPrice() uint64
	MaxGasLimitPerTx() uint64
	ComputeTxFee(tx data.TransactionWithFeeHandler) *big.Int
	IsInterfaceNil() bool
}

TxGasHandler -

type TxGasHandlerMock

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

TxGasHandlerMock -

func NewTxGasHandlerMock added in v1.8.5

func NewTxGasHandlerMock() *TxGasHandlerMock

NewTxGasHandlerMock -

func (*TxGasHandlerMock) ComputeTxFee added in v1.8.5

func (ghm *TxGasHandlerMock) ComputeTxFee(tx data.TransactionWithFeeHandler) *big.Int

ComputeTxFee -

func (*TxGasHandlerMock) IsInterfaceNil

func (ghm *TxGasHandlerMock) IsInterfaceNil() bool

IsInterfaceNil -

func (*TxGasHandlerMock) MaxGasLimitPerTx added in v1.8.5

func (ghm *TxGasHandlerMock) MaxGasLimitPerTx() uint64

MaxGasLimitPerTx -

func (*TxGasHandlerMock) MinGasPrice

func (ghm *TxGasHandlerMock) MinGasPrice() uint64

MinGasPrice -

func (*TxGasHandlerMock) WithGasPriceModifier added in v1.8.5

func (ghm *TxGasHandlerMock) WithGasPriceModifier(gasPriceModifier float64) *TxGasHandlerMock

WithGasPriceModifier -

func (*TxGasHandlerMock) WithMinGasLimit added in v1.8.5

func (ghm *TxGasHandlerMock) WithMinGasLimit(minGasLimit uint64) *TxGasHandlerMock

WithMinGasLimit -

func (*TxGasHandlerMock) WithMinGasPrice added in v1.8.5

func (ghm *TxGasHandlerMock) WithMinGasPrice(minGasPrice uint64) *TxGasHandlerMock

WithMinGasPrice -

Jump to

Keyboard shortcuts

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