txpool

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidTransaction = errors.New("invalid transaction")
)

Functions

This section is empty.

Types

type Empty

type Empty struct{}

type TxPool

type TxPool struct {
	MinFee       *big.Int
	State        *dbstore.DB
	Transactions []*types.Transaction

	TxPoolCh chan *types.Transaction

	LatestIncludedTxs *lru.Cache
}

func NewTxPool

func NewTxPool(minFee *big.Int, db *dbstore.DB, txpoolCh chan *types.Transaction) *TxPool

func (*TxPool) AddTx

func (tp *TxPool) AddTx(tx *types.Transaction)

func (*TxPool) AddTx_RPC

func (tp *TxPool) AddTx_RPC(args *types.Transaction, reply *types.RPCResponse) error

func (*TxPool) AddTxs

func (tp *TxPool) AddTxs(txs []*types.Transaction)

func (*TxPool) GetTxs

func (tp *TxPool) GetTxs() []*types.Transaction

func (*TxPool) GetTxs_RPC

func (tp *TxPool) GetTxs_RPC(_ *Empty, reply *types.RPCResponse) error

func (*TxPool) IsValid

func (txp *TxPool) IsValid(tx *types.Transaction) bool

func (*TxPool) RemoveTx added in v1.1.0

func (tp *TxPool) RemoveTx(tx *types.Transaction) error

remove transaction from txpool

Jump to

Keyboard shortcuts

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