Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultMaxTx = 5000
Functions ¶
This section is empty.
Types ¶
type FifoMempool ¶
type FifoMempool struct {
// contains filtered or unexported fields
}
FifoMempool is a mempool implementation that maintains two separate transaction pools: one for oracle transactions and another for regular transactions. Oracle transactions are given priority during iteration.
Key characteristics: 1. Maintains two separate FIFO queues (CList) for transactions (oracle and regular) 2. Uses sync.Map for quick transaction lookup 3. During iteration:
- Oracle transactions are processed first in FIFO order
- Regular transactions follow in FIFO order
4. Transaction capacity is limited by maxTx (if > 0)
Note: PrepareProposal may terminate iteration early if block size limits are reached.
func NewFifoMempool ¶
func NewFifoMempool(opts ...FifoMempoolOptions) *FifoMempool
func (*FifoMempool) CountTx ¶
func (mp *FifoMempool) CountTx() int
type FifoMempoolOptions ¶
type FifoMempoolOptions func(mp *FifoMempool)
func FifoMaxTxOpt ¶
func FifoMaxTxOpt(maxTx int) FifoMempoolOptions
Click to show internal directories.
Click to hide internal directories.