Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type TxBuffer ¶
type TxBuffer struct {
// contains filtered or unexported fields
}
TxBuffer is an in-memory data structure containing the set of unconfirmed transactions.
func New ¶
New creates a new instance of the TxBuffer. MaxSize specifies the total number of transactions the TxBuffer may contain.
func (*TxBuffer) Add ¶
func (t *TxBuffer) Add(tx txsystem.GenericTransaction) error
Add adds the given transaction to the transaction buffer. Returns an error if the transaction isn't valid, is already present in the TxBuffer, or TxBuffer is full.
type TxHandler ¶
type TxHandler func(tx txsystem.GenericTransaction) bool
TxHandler handles the transaction. Must return true if the transaction must be removed from the transaction buffer.
Click to show internal directories.
Click to hide internal directories.