Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TxPool ¶
type TxPool struct {
// contains filtered or unexported fields
}
TxPool contains all currently known transactions. Transactions enter the pool when they are received from the local network or submitted locally. They exit the pool when they are included in the blockchain.
func NewTxPool ¶
func NewTxPool(config core.TxPoolConfig, srvCfg config.Config, clientCtx client.Context, mempool mempl.Mempool, evmkeeper *evmkeeper.Keeper, evmCtx *evm.Context) (*TxPool, error)
NewTxPool creates a new transaction pool to gather, sort and filter inbound transactions from the network.
func (*TxPool) Add ¶
func (pool *TxPool) Add(tx *types.Transaction) (replaced bool, err error)
Add validates a transaction and inserts it into the non-executable queue for later pending promotion and execution. If the transaction is a replacement for an already pending or queued one, it overwrites the previous transaction if its price is higher.
func (*TxPool) Get ¶
func (pool *TxPool) Get(hash common.Hash) *types.Transaction
Get returns a transaction if it is contained in the pool and nil otherwise.
func (*TxPool) Has ¶
Has returns an indicator whether txpool has a transaction cached with the given hash.