Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TransactionPools ¶
type TransactionPools struct {
// contains filtered or unexported fields
}
TransactionPools is a set of epoch-scoped transaction pools. Each pool is a singleton that is instantiated the first time a transaction pool for that epoch is requested.
This enables decoupled components to share access to the same transaction pools across epochs, while maintaining the property that one transaction pool is only valid for a single epoch.
func NewTransactionPools ¶
func NewTransactionPools(create func(uint64) mempool.Transactions) *TransactionPools
NewTransactionPools returns a new set of epoch-scoped transaction pools.
func (*TransactionPools) CombinedSize ¶
func (t *TransactionPools) CombinedSize() uint
CombinedSize returns the sum of the sizes of all transaction pools.
func (*TransactionPools) ForEpoch ¶
func (t *TransactionPools) ForEpoch(epoch uint64) mempool.Transactions
ForEpoch returns the transaction pool for the given pool. All calls for the same epoch will return the same underlying transaction pool.