Documentation ¶
Index ¶
- type TxCacheMock
- func (cache *TxCacheMock) AddTx(tx *txcache.WrappedTransaction) (ok bool, added bool)
- func (cache *TxCacheMock) Clear()
- func (cache *TxCacheMock) Close() error
- func (cache *TxCacheMock) Diagnose(deep bool)
- func (cache *TxCacheMock) ForEachTransaction(fn txcache.ForEachTransaction)
- func (cache *TxCacheMock) ForgetAllAccountNonces()
- func (cache *TxCacheMock) Get(key []byte) (value interface{}, ok bool)
- func (cache *TxCacheMock) GetByTxHash(txHash []byte) (*txcache.WrappedTransaction, bool)
- func (cache *TxCacheMock) GetTransactionsPoolForSender(sender string) []*txcache.WrappedTransaction
- func (cache *TxCacheMock) Has(key []byte) bool
- func (cache *TxCacheMock) HasOrAdd(key []byte, value interface{}, sizeInBytes int) (has, added bool)
- func (cache *TxCacheMock) ImmunizeTxsAgainstEviction(keys [][]byte)
- func (cache *TxCacheMock) IsInterfaceNil() bool
- func (cache *TxCacheMock) Keys() [][]byte
- func (cache *TxCacheMock) Len() int
- func (cache *TxCacheMock) MaxSize() int
- func (cache *TxCacheMock) NotifyAccountNonce(accountKey []byte, nonce uint64)
- func (cache *TxCacheMock) NumBytes() int
- func (cache *TxCacheMock) Peek(key []byte) (value interface{}, ok bool)
- func (cache *TxCacheMock) Put(key []byte, value interface{}, sizeInBytes int) (evicted bool)
- func (cache *TxCacheMock) RegisterHandler(handler func(key []byte, value interface{}), _ string)
- func (cache *TxCacheMock) Remove(key []byte)
- func (cache *TxCacheMock) RemoveTxByHash(txHash []byte) bool
- func (cache *TxCacheMock) SizeInBytesContained() uint64
- func (cache *TxCacheMock) UnRegisterHandler(id string)
- type TxGasHandler
- type TxGasHandlerMock
- func (ghm *TxGasHandlerMock) ComputeTxFee(tx data.TransactionWithFeeHandler) *big.Int
- func (ghm *TxGasHandlerMock) IsInterfaceNil() bool
- func (ghm *TxGasHandlerMock) MaxGasLimitPerTx() uint64
- func (ghm *TxGasHandlerMock) MinGasPrice() uint64
- func (ghm *TxGasHandlerMock) WithGasPriceModifier(gasPriceModifier float64) *TxGasHandlerMock
- func (ghm *TxGasHandlerMock) WithMinGasLimit(minGasLimit uint64) *TxGasHandlerMock
- func (ghm *TxGasHandlerMock) WithMinGasPrice(minGasPrice uint64) *TxGasHandlerMock
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 (*TxCacheMock) AddTx ¶ added in v1.8.5
func (cache *TxCacheMock) AddTx(tx *txcache.WrappedTransaction) (ok bool, added bool)
AddTx -
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) 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) NotifyAccountNonce ¶ added in v1.8.5
func (cache *TxCacheMock) NotifyAccountNonce(accountKey []byte, nonce uint64)
NotifyAccountNonce -
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) 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 -
Click to show internal directories.
Click to hide internal directories.