Documentation ¶
Index ¶
- type Mempool
- func (th *Mempool) Add(tx *chain.Transaction) bool
- func (th *Mempool) Get(id ids.ID) (*chain.Transaction, bool)
- func (th *Mempool) Has(id ids.ID) bool
- func (th *Mempool) Len() int
- func (th *Mempool) NewTxs(maxUnits uint64) []*chain.Transaction
- func (th *Mempool) PeekMax() (*chain.Transaction, uint64)
- func (th *Mempool) PeekMin() (*chain.Transaction, uint64)
- func (th *Mempool) PopMax() (*chain.Transaction, uint64)
- func (th *Mempool) PopMin() (*chain.Transaction, uint64)
- func (th *Mempool) Prune(validHashes set.Set[ids.ID])
- func (th *Mempool) Remove(id ids.ID) *chain.Transaction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mempool ¶
type Mempool struct { // Pending is a channel of length one, which the mempool ensures has an item on // it as long as there is an unissued transaction remaining in [txs] Pending chan struct{} // contains filtered or unexported fields }
func (*Mempool) NewTxs ¶
func (th *Mempool) NewTxs(maxUnits uint64) []*chain.Transaction
GetNewTxs returns the array of [newTxs] and replaces it with a new array.
func (*Mempool) PeekMax ¶
func (th *Mempool) PeekMax() (*chain.Transaction, uint64)
Assumes there is non-zero items in Mempool
func (*Mempool) PeekMin ¶
func (th *Mempool) PeekMin() (*chain.Transaction, uint64)
Assumes there is non-zero items in Mempool
func (*Mempool) PopMax ¶
func (th *Mempool) PopMax() (*chain.Transaction, uint64)
Assumes there is non-zero items in Mempool
func (*Mempool) PopMin ¶
func (th *Mempool) PopMin() (*chain.Transaction, uint64)
Assumes there is non-zero items in Mempool
Click to show internal directories.
Click to hide internal directories.