txtracker

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tracker

type Tracker interface {
	Track(hash common.Hash) error
	EnteredQueued(hash common.Hash) error
	ExitedQueued(hash common.Hash) error
	EnteredPending(hash common.Hash) error
	ExitedPending(hash common.Hash) error
	IncludedInBlock(hash common.Hash) error
	RemovedFromPending(hash common.Hash) error
	RemovedFromQueue(hash common.Hash) error
}

Tracker tracks timestamps about important events in a transactions lifecycle and exposes metrics about these via prometheus. A no-op implementation is returned by NewNoop for use when tracking is disabled.

func NewNoop

func NewNoop() Tracker

NewNoop returns a Tracker that records nothing.

type TxTracker

type TxTracker struct {
	// contains filtered or unexported fields
}

TxTracker tracks timestamps about important events in a transactions lifecycle and exposes metrics about these via otel.

func New

func New() *TxTracker

New creates a new Tracker instance.

func (*TxTracker) EnteredPending

func (t *TxTracker) EnteredPending(hash common.Hash) error

func (*TxTracker) EnteredQueued

func (t *TxTracker) EnteredQueued(hash common.Hash) error

func (*TxTracker) ExitedPending

func (t *TxTracker) ExitedPending(hash common.Hash) error

func (*TxTracker) ExitedQueued

func (t *TxTracker) ExitedQueued(hash common.Hash) error

func (*TxTracker) IncludedInBlock

func (t *TxTracker) IncludedInBlock(hash common.Hash) error

func (*TxTracker) RemovedFromPending

func (t *TxTracker) RemovedFromPending(hash common.Hash) error

func (*TxTracker) RemovedFromQueue

func (t *TxTracker) RemovedFromQueue(hash common.Hash) error

func (*TxTracker) Track

func (t *TxTracker) Track(hash common.Hash) error

Track initializes tracking for a tx. This should only be called from SendRawTransaction when a tx enters this node via a RPC.

Jump to

Keyboard shortcuts

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