transaction

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: May 2, 2020 License: LGPL-3.0 Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidSender is returned if the transaction contains an invalid signature.
	ErrInvalidSender = errors.New("invalid sender")

	// ErrIntrinsicGas is returned if the transaction is specified to use less gas
	// than required to start the invocation.
	ErrIntrinsicGas = errors.New("intrinsic gas too low")

	// ErrGasLimit is returned if a transaction's requested gas limit exceeds the
	// maximum allowance of the current block.
	ErrGasLimit = errors.New("exceeds block gas limit")

	// ErrNegativeValue is a sanity error to ensure noone is able to specify a
	// transaction with a negative value.
	ErrNegativeValue = errors.New("negative value")

	// ErrOversizedData is returned if the input data of a transaction is greater
	// than some meaningful limit a user might use. This is not a consensus error
	// making the transaction invalid, rather a DOS protection.
	ErrOversizedData = errors.New("oversized data")

	// ErrInsufficientFunds is returned if the total cost of executing a transaction
	// is higher than the balance of the user's account.
	ErrInsufficientFunds = errors.New("insufficient funds for gas limit * price + value")
)
View Source
var TransactionType = reflect.TypeOf(types.Transaction{})

Functions

func ElemsToTxs

func ElemsToTxs(elems []pool.Element) []*types.Transaction

func IsTx

func IsTx(elem pool.Element) bool

func NewTxPool

func NewTxPool(conf *config.Config, c *chain.BlockChain) pool.Pool

Types

type TxHelper

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

func (*TxHelper) Reset

func (h *TxHelper) Reset(p pool.Pool, newHead *types.Block)

func (*TxHelper) Sender

func (h *TxHelper) Sender(ele pool.Element) (common.Address, error)

func (*TxHelper) Validate

func (h *TxHelper) Validate(p pool.Pool, ele pool.Element, currentState pool.StateDB, blockChain pool.BlockChain) error

Directories

Path Synopsis
Package txexec implements all transaction executors.
Package txexec implements all transaction executors.

Jump to

Keyboard shortcuts

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