locals

package
v1.15.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2025 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Overview

Package locals implements tracking for "local" transactions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsTemporaryReject

func IsTemporaryReject(err error) bool

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

func (tracker *TxTracker) Start() error

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

func (tracker *TxTracker) Stop() error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL