tx_list_validator

package
v0.0.0-...-1d04f91 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InvalidTxListReason

type InvalidTxListReason uint8

InvalidTxListReason represents a reason why a transactions list is invalid.

const (
	HintNone InvalidTxListReason = iota
	HintOK
)

All invalid transactions list reasons.

type TxListValidator

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

func NewTxListValidator

func NewTxListValidator(
	blockMaxGasLimit uint64,
	maxTransactionsPerBlock uint64,
	maxBytesPerTxList uint64,
	chainID *big.Int,
) *TxListValidator

NewTxListValidator creates a new TxListValidator instance based on giving configurations.

func (*TxListValidator) ValidateTxList

func (v *TxListValidator) ValidateTxList(
	blockID *big.Int,
	proposeBlockTxInput []byte,
) (txListBytes []byte, hint InvalidTxListReason, txIdx int, err error)

ValidateTxList checks whether the transactions list in the MxcL1.proposeBlock transaction's input data is valid.

Jump to

Keyboard shortcuts

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