txcachemocks

package
v1.8.5 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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)
	NotifyAccountNonceCalled           func(accountKey []byte, nonce uint64)
	ForgetAllAccountNoncesCalled       func()
	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) ForgetAllAccountNonces added in v1.8.5

func (cache *TxCacheMock) ForgetAllAccountNonces()

ForgetAllAccountNonces -

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) NotifyAccountNonce added in v1.8.5

func (cache *TxCacheMock) NotifyAccountNonce(accountKey []byte, nonce uint64)

NotifyAccountNonce -

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