Documentation ¶
Overview ¶
Package api defines the transaction pool interfaces.
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type TxPool ¶
type TxPool interface { // Name is the transaction pool implementation name. Name() string // Add adds a single transaction into the transaction pool. Add(tx []byte) error // AddBatch adds a transaction batch into the transaction pool. AddBatch(batch [][]byte) error // GetBatch gets a transaction batch from the transaction pool. GetBatch(force bool) [][]byte // RemoveBatch removes a batch from the transaction pool. RemoveBatch(batch [][]byte) error // IsQueued returns whether a transaction is in the queue already. IsQueued(txHash hash.Hash) bool // Size returns the number of transactions in the transaction pool. Size() uint64 // UpdateConfig updates the transaction pool config. UpdateConfig(Config) error // IsQueue returns true if pool maintains FIFO order of transactions. IsQueue() bool // Clear clears the transaction pool. Clear() }
TxPool is the transaction pool interface.
Click to show internal directories.
Click to hide internal directories.