txpool

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: LGPL-3.0 Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TxData

type TxData struct {
	MsgID  types.MessageID
	Msg    any
	TxHash types.TxHash
	Tx     *sign.Transaction
	// EVMSourceTxHash is the tx hash of the EVM tx that triggered this tx.
	EVMSourceTxHash string
}

type TxMap

type TxMap map[types.MessageID][]TxData

type TxPool

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

func New

func New() *TxPool

func (*TxPool) AddEVMTransaction

func (t *TxPool) AddEVMTransaction(id types.MessageID, v any, sig *sign.Transaction, evmTxHash string) types.TxHash

func (*TxPool) AddTransaction

func (t *TxPool) AddTransaction(id types.MessageID, v any, sig *sign.Transaction) types.TxHash

func (*TxPool) CopyTransactions

func (t *TxPool) CopyTransactions(ctx context.Context) *TxPool

CopyTransactions returns a copy of the TxPool, and resets the state to 0 values.

func (*TxPool) ForID

func (t *TxPool) ForID(id types.MessageID) []TxData

func (*TxPool) GetAmountOfTxs

func (t *TxPool) GetAmountOfTxs() int

func (*TxPool) GetEVMTxs

func (t *TxPool) GetEVMTxs() []TxData

GetEVMTxs gets all the txs in the queue that originated from the EVM. NOTE: this is called ONLY in the copied tx queue in world.doTick, so we do not need to use the mutex here.

func (*TxPool) Transactions

func (t *TxPool) Transactions() TxMap

Jump to

Keyboard shortcuts

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