executer

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: 6 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 TxProcessor

type TxProcessor struct {
	MinFee *big.Int
	State  *dbstore.DB
	Signer *util.Address

	StateMu *sync.Mutex
}

func NewTxProcessor

func NewTxProcessor(state *dbstore.DB, minFee *big.Int, signer *util.Address) *TxProcessor

func (*TxProcessor) IsValid

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

func (*TxProcessor) IsValidImport added in v1.1.0

func (txp *TxProcessor) IsValidImport(tx *types.Transaction) bool

func (*TxProcessor) ProcessTx

func (txp *TxProcessor) ProcessTx(tx *types.Transaction) error

ProcessTx processes a transaction and returns the transaction fee.

func (*TxProcessor) RollbackTx added in v1.1.0

func (txp *TxProcessor) RollbackTx(tx *types.Transaction) error

RevertTx undoes a transaction

Jump to

Keyboard shortcuts

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