Versions in this module Expand all Collapse all v1 v1.0.14 Jan 30, 2024 v1.0.12 Jan 30, 2024 Changes in this version + type ConfigDestinationMe struct + MaxNumBytes uint32 + MaxNumItems uint32 + Name string + NumChunks uint32 + NumItemsToPreemptivelyEvict uint32 + func (config *ConfigDestinationMe) String() string + type ConfigSourceMe struct + CountPerSenderThreshold uint32 + CountThreshold uint32 + EvictionEnabled bool + Name string + NumBytesPerSenderThreshold uint32 + NumBytesThreshold uint32 + NumChunks uint32 + NumSendersToPreemptivelyEvict uint32 + func (config *ConfigSourceMe) String() string + type CrossTxCache struct + func NewCrossTxCache(config ConfigDestinationMe) (*CrossTxCache, error) + func (cache *CrossTxCache) AddTx(tx *WrappedTransaction) (has, added bool) + func (cache *CrossTxCache) ForEachTransaction(function ForEachTransaction) + func (cache *CrossTxCache) Get(key []byte) (value interface{}, ok bool) + func (cache *CrossTxCache) GetByTxHash(txHash []byte) (*WrappedTransaction, bool) + func (cache *CrossTxCache) GetTransactionsPoolForSender(_ string) []*WrappedTransaction + func (cache *CrossTxCache) ImmunizeTxsAgainstEviction(keys [][]byte) + func (cache *CrossTxCache) IsInterfaceNil() bool + func (cache *CrossTxCache) Peek(key []byte) (value interface{}, ok bool) + func (cache *CrossTxCache) RemoveTxByHash(txHash []byte) bool + type DisabledCache struct + func NewDisabledCache() *DisabledCache + func (cache *DisabledCache) AddTx(_ *WrappedTransaction) (ok bool, added bool) + func (cache *DisabledCache) Clear() + func (cache *DisabledCache) Close() error + func (cache *DisabledCache) Diagnose(_ bool) + func (cache *DisabledCache) ForEachTransaction(_ ForEachTransaction) + func (cache *DisabledCache) Get(_ []byte) (value interface{}, ok bool) + func (cache *DisabledCache) GetByTxHash(_ []byte) (*WrappedTransaction, bool) + func (cache *DisabledCache) GetTransactionsPoolForSender(_ string) []*WrappedTransaction + func (cache *DisabledCache) Has(_ []byte) bool + func (cache *DisabledCache) HasOrAdd(_ []byte, _ interface{}, _ int) (has, added bool) + func (cache *DisabledCache) ImmunizeTxsAgainstEviction(_ [][]byte) + func (cache *DisabledCache) IsInterfaceNil() bool + func (cache *DisabledCache) Keys() [][]byte + func (cache *DisabledCache) Len() int + func (cache *DisabledCache) MaxSize() int + func (cache *DisabledCache) NotifyAccountNonce(_ []byte, _ uint64) + func (cache *DisabledCache) NumBytes() int + func (cache *DisabledCache) Peek(_ []byte) (value interface{}, ok bool) + func (cache *DisabledCache) Put(_ []byte, _ interface{}, _ int) (evicted bool) + func (cache *DisabledCache) RegisterHandler(func(key []byte, value interface{}), string) + func (cache *DisabledCache) Remove(_ []byte) + func (cache *DisabledCache) RemoveTxByHash(_ []byte) bool + func (cache *DisabledCache) SelectTransactionsWithBandwidth(_ int, _ int, _ uint64) []*WrappedTransaction + func (cache *DisabledCache) SizeInBytesContained() uint64 + func (cache *DisabledCache) UnRegisterHandler(string) + type ForEachTransaction func(txHash []byte, value *WrappedTransaction) + type TxCache struct + func NewTxCache(config ConfigSourceMe, txGasHandler TxGasHandler) (*TxCache, error) + func (cache *TxCache) AddTx(tx *WrappedTransaction) (ok bool, added bool) + func (cache *TxCache) Clear() + func (cache *TxCache) Close() error + func (cache *TxCache) CountSenders() uint64 + func (cache *TxCache) CountTx() uint64 + func (cache *TxCache) Diagnose(deep bool) + func (cache *TxCache) ForEachTransaction(function ForEachTransaction) + func (cache *TxCache) Get(key []byte) (value interface{}, ok bool) + func (cache *TxCache) GetByTxHash(txHash []byte) (*WrappedTransaction, bool) + func (cache *TxCache) GetTransactionsPoolForSender(sender string) []*WrappedTransaction + func (cache *TxCache) Has(key []byte) bool + func (cache *TxCache) HasOrAdd(_ []byte, _ interface{}, _ int) (has, added bool) + func (cache *TxCache) ImmunizeTxsAgainstEviction(_ [][]byte) + func (cache *TxCache) IsInterfaceNil() bool + func (cache *TxCache) Keys() [][]byte + func (cache *TxCache) Len() int + func (cache *TxCache) MaxSize() int + func (cache *TxCache) NotifyAccountNonce(accountKey []byte, nonce uint64) + func (cache *TxCache) NumBytes() int + func (cache *TxCache) Peek(key []byte) (value interface{}, ok bool) + func (cache *TxCache) Put(_ []byte, _ interface{}, _ int) (evicted bool) + func (cache *TxCache) RegisterHandler(func(key []byte, value interface{}), string) + func (cache *TxCache) Remove(key []byte) + func (cache *TxCache) RemoveTxByHash(txHash []byte) bool + func (cache *TxCache) SelectTransactionsWithBandwidth(numRequested int, batchSizePerSender int, bandwidthPerSender uint64) []*WrappedTransaction + func (cache *TxCache) SizeInBytesContained() uint64 + func (cache *TxCache) UnRegisterHandler(string) + type TxGasHandler interface + GasPriceForMove func(tx data.TransactionWithFeeHandler) uint64 + GasPriceForProcessing func(tx data.TransactionWithFeeHandler) uint64 + IsInterfaceNil func() bool + MinGasLimit func() uint64 + MinGasPrice func() uint64 + MinGasPriceForProcessing func() uint64 + SplitTxGasInCategories func(tx data.TransactionWithFeeHandler) (uint64, uint64) + type WrappedTransaction struct + ReceiverShardID uint32 + SenderShardID uint32 + Size int64 + Tx data.TransactionHandler + TxFeeScoreNormalized uint64 + TxHash []byte