utils

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDecodedTxs

func GetDecodedTxs(txDecoder sdk.TxDecoder, txs [][]byte) ([]sdk.Tx, error)

GetDecodedTxs returns the decoded transactions from the given bytes.

func GetEncodedTxs added in v1.1.0

func GetEncodedTxs(txEncoder sdk.TxEncoder, txs []sdk.Tx) ([][]byte, error)

GetEncodedTxs returns the encoded transactions from the given bytes.

func RemoveTxsFromLane

func RemoveTxsFromLane(txs []sdk.Tx, mempool sdkmempool.Mempool) error

RemoveTxsFromLane removes the transactions from the given lane's mempool.

Types

type TxInfo added in v1.1.0

type TxInfo struct {
	// Hash is the hex-encoded hash of the transaction.
	Hash string
	// Size is the size of the transaction in bytes.
	Size int64
	// GasLimit is the gas limit of the transaction.
	GasLimit uint64
	// TxBytes is the bytes of the transaction.
	TxBytes []byte
}

TxInfo contains the information required for a transaction to be included in a proposal.

func GetTxInfo added in v1.1.0

func GetTxInfo(txEncoder sdk.TxEncoder, tx sdk.Tx) (TxInfo, error)

GetTxHashStr returns the TxInfo of a given transaction.

Jump to

Keyboard shortcuts

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