Documentation ¶
Index ¶
- type TxCounter
- func (counter *TxCounter) AddTransaction(sizeBch float32)
- func (counter *TxCounter) GetAverageTransactionSize() float32
- func (counter *TxCounter) GetTransactionCount() int
- func (counter *TxCounter) GetUpperTransactionSizePercent(percent float32) float32
- func (counter *TxCounter) ScheduleCleanupTransactions() error
- func (counter *TxCounter) WriteTransactionsFile() error
- type TxCounterConfig
- type TxCounterTransaction
- type TxHeap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TxCounter ¶
type TxCounter struct {
// contains filtered or unexported fields
}
A struct counting the average TX size (in BCH) over a specified time period (such as 24h). This gives a dynamic threshold to identify whales.
func NewTxCounter ¶
func NewTxCounter(config *TxCounterConfig, ctx context.Context, logger log.Logger, monitor *monitoring.HttpMonitoring) (*TxCounter, error)
func (*TxCounter) AddTransaction ¶
func (*TxCounter) GetAverageTransactionSize ¶
func (*TxCounter) GetTransactionCount ¶
func (*TxCounter) GetUpperTransactionSizePercent ¶
func (*TxCounter) ScheduleCleanupTransactions ¶
func (*TxCounter) WriteTransactionsFile ¶
type TxCounterConfig ¶
type TxCounterTransaction ¶
type TxHeap ¶
type TxHeap []*TxCounterTransaction
An TxHeap is a min-heap of float32 TX size values.
Click to show internal directories.
Click to hide internal directories.