txpool

package
v1.0.3-beta Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: LGPL-3.0 Imports: 3 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  message.TypeID
	Msg    any
	TxHash message.TxHash
	Tx     *sign.Transaction
	// EVMSourceTxHash is the tx hash of the EVM tx that triggered this tx.
	EVMSourceTxHash string
}

type TxQueue

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

func NewTxQueue

func NewTxQueue() *TxQueue

func (*TxQueue) AddEVMTransaction

func (t *TxQueue) AddEVMTransaction(id message.TypeID, v any, sig *sign.Transaction, evmTxHash string) message.TxHash

func (*TxQueue) AddTransaction

func (t *TxQueue) AddTransaction(id message.TypeID, v any, sig *sign.Transaction) message.TxHash

func (*TxQueue) CopyTransactions

func (t *TxQueue) CopyTransactions() *TxQueue

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

func (*TxQueue) ForID

func (t *TxQueue) ForID(id message.TypeID) []TxData

func (*TxQueue) GetAmountOfTxs

func (t *TxQueue) GetAmountOfTxs() int

func (*TxQueue) GetEVMTxs

func (t *TxQueue) 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.Tick, so we do not need to use the mutex here.

Jump to

Keyboard shortcuts

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