Documentation
¶
Overview ¶
Package locals implements tracking for "local" transactions
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsTemporaryReject ¶
IsTemporaryReject determines whether the given error indicates a temporary reason to reject a transaction from being included in the txpool. The result may change if the txpool's state changes later.
Types ¶
type TxTracker ¶
type TxTracker struct {
// contains filtered or unexported fields
}
TxTracker is a struct used to track priority transactions; it will check from time to time if the main pool has forgotten about any of the transaction it is tracking, and if so, submit it again. This is used to track 'locals'. This struct does not care about transaction validity, price-bumps or account limits, but optimistically accepts transactions.
func New ¶
func New(journalPath string, journalTime time.Duration, chainConfig *params.ChainConfig, next *txpool.TxPool) *TxTracker
New creates a new TxTracker
func (*TxTracker) Start ¶
Start implements node.Lifecycle interface Start is called after all services have been constructed and the networking layer was also initialized to spawn any goroutines required by the service.
func (*TxTracker) Stop ¶
Stop implements node.Lifecycle interface Stop terminates all goroutines belonging to the service, blocking until they are all terminated.
func (*TxTracker) Track ¶
func (tracker *TxTracker) Track(tx *types.Transaction)
Track adds a transaction to the tracked set. Note: blob-type transactions are ignored.
func (*TxTracker) TrackAll ¶
func (tracker *TxTracker) TrackAll(txs []*types.Transaction)
TrackAll adds a list of transactions to the tracked set. Note: blob-type transactions are ignored.