Versions in this module Expand all Collapse all v0 v0.13.7 Jul 13, 2024 Changes in this version + var ErrAccountLimitExceeded = errors.New("account limit exceeded") + var ErrAlreadyKnown = errors.New("already known") + var ErrFutureReplacePending = errors.New("future transaction tries to replace pending") + var ErrGasLimit = errors.New("exceeds block gas limit") + var ErrInvalidSender = errors.New("invalid sender") + var ErrNegativeValue = errors.New("negative value") + var ErrOverdraft = errors.New("transaction would cause overdraft") + var ErrOversizedData = errors.New("oversized data") + var ErrReplaceUnderpriced = errors.New("replacement transaction underpriced") + var ErrUnderpriced = errors.New("transaction underpriced") + func ValidateTransaction(tx *types.Transaction, head *types.Header, signer types.Signer, ...) error + func ValidateTransactionWithState(tx *types.Transaction, signer types.Signer, opts *ValidationOptionsWithState) error + type AddressReserver func(addr common.Address, reserve bool) error + type BlockChain interface + CurrentBlock func() *types.Header + SubscribeChainHeadEvent func(ch chan<- core.ChainHeadEvent) event.Subscription + type LazyResolver interface + Get func(hash common.Hash) *types.Transaction + type LazyTransaction struct + BlobGas uint64 + Gas uint64 + GasFeeCap *big.Int + GasTipCap *big.Int + Hash common.Hash + Pool LazyResolver + Time time.Time + Tx *types.Transaction + func (ltx *LazyTransaction) Resolve() *types.Transaction + type SubPool interface + Add func(txs []*types.Transaction, local bool, sync bool) []error + Close func() error + Content func() (map[common.Address][]*types.Transaction, ...) + ContentFrom func(addr common.Address) ([]*types.Transaction, []*types.Transaction) + Filter func(tx *types.Transaction) bool + Get func(hash common.Hash) *types.Transaction + Has func(hash common.Hash) bool + HasLocal func(hash common.Hash) bool + Init func(gasTip *big.Int, head *types.Header, reserve AddressReserver) error + IteratePending func(f func(tx *types.Transaction) bool) bool + Locals func() []common.Address + Nonce func(addr common.Address) uint64 + Pending func(enforceTips bool) map[common.Address][]*LazyTransaction + PendingWithBaseFee func(enforceTips bool, baseFee *big.Int) map[common.Address][]*LazyTransaction + Reset func(oldHead, newHead *types.Header) + SetGasTip func(tip *big.Int) + SetMinFee func(fee *big.Int) + Stats func() (int, int) + Status func(hash common.Hash) TxStatus + SubscribeTransactions func(ch chan<- core.NewTxsEvent, reorgs bool) event.Subscription + type TxPool struct + func New(gasTip *big.Int, chain BlockChain, subpools []SubPool) (*TxPool, error) + func (p *TxPool) Add(txs []*types.Transaction, local bool, sync bool) []error + func (p *TxPool) AddRemotesSync(txs []*types.Transaction) []error + func (p *TxPool) Close() error + func (p *TxPool) Content() (map[common.Address][]*types.Transaction, ...) + func (p *TxPool) ContentFrom(addr common.Address) ([]*types.Transaction, []*types.Transaction) + func (p *TxPool) GasTip() *big.Int + func (p *TxPool) Get(hash common.Hash) *types.Transaction + func (p *TxPool) Has(hash common.Hash) bool + func (p *TxPool) HasLocal(hash common.Hash) bool + func (p *TxPool) IteratePending(f func(tx *types.Transaction) bool) + func (p *TxPool) Locals() []common.Address + func (p *TxPool) Nonce(addr common.Address) uint64 + func (p *TxPool) Pending(enforceTips bool) map[common.Address][]*LazyTransaction + func (p *TxPool) PendingSize(enforceTips bool) int + func (p *TxPool) PendingWithBaseFee(enforceTips bool, baseFee *big.Int) map[common.Address][]*LazyTransaction + func (p *TxPool) SetGasTip(tip *big.Int) + func (p *TxPool) SetMinFee(fee *big.Int) + func (p *TxPool) Stats() (int, int) + func (p *TxPool) Status(hash common.Hash) TxStatus + func (p *TxPool) SubscribeNewReorgEvent(ch chan<- core.NewTxPoolReorgEvent) event.Subscription + func (p *TxPool) SubscribeTransactions(ch chan<- core.NewTxsEvent, reorgs bool) event.Subscription + type TxStatus uint + const TxStatusPending + const TxStatusQueued + const TxStatusUnknown + type ValidationOptions struct + Accept uint8 + Config *params.ChainConfig + MaxSize uint64 + MinTip *big.Int + type ValidationOptionsWithState struct + ExistingCost func(addr common.Address, nonce uint64) *big.Int + ExistingExpenditure func(addr common.Address) *big.Int + FirstNonceGap func(addr common.Address) uint64 + MinimumFee *big.Int + Rules params.Rules + State *state.StateDB + UsedAndLeftSlots func(addr common.Address) (int, int)