Documentation ¶
Index ¶
- Constants
- Variables
- type TransactionPool
- func (pool *TransactionPool) AddTransaction(tx *types.Transaction, isLocal bool) error
- func (pool *TransactionPool) GetMiniPendingNonce(addr *crypto.CommonAddress) uint64
- func (pool *TransactionPool) GetPending(GasLimit *big.Int) []*types.Transaction
- func (pool *TransactionPool) GetQueue() []*types.Transaction
- func (pool *TransactionPool) GetTransactionCount(address *crypto.CommonAddress) uint64
- func (pool *TransactionPool) GetTransactions(addr *crypto.CommonAddress) []types.Transactions
- func (pool *TransactionPool) GetTxInPool(hash string) (*types.Transaction, error)
- func (pool *TransactionPool) NewTxFeed() *event.Feed
- func (pool *TransactionPool) Start(feed *event.Feed, tipRoot []byte)
- func (pool *TransactionPool) Stop()
Constants ¶
const (
MODULENAME = "txpool"
)
Variables ¶
Functions ¶
This section is empty.
Types ¶
type TransactionPool ¶
type TransactionPool struct {
// contains filtered or unexported fields
}
TransactionPool ... 1 The transactions in the pool are sorted and sorted in two different queues according to whether or not the nonce is continuous 2 The sorted ones can be packed into blocks 3 The transactions in the pool are deleted according to the Nonce corresponding to the transactions of each address in the block
func NewTransactionPool ¶
func NewTransactionPool(chainStore store.StoreInterface, journalPath string) *TransactionPool
NewTransactionPool Create a trading pool
func (*TransactionPool) AddTransaction ¶
func (pool *TransactionPool) AddTransaction(tx *types.Transaction, isLocal bool) error
AddTransaction ransaction put in txpool
func (*TransactionPool) GetMiniPendingNonce ¶
func (pool *TransactionPool) GetMiniPendingNonce(addr *crypto.CommonAddress) uint64
GetMiniPendingNonce Gets the smallest nonce in the Pending queue
func (*TransactionPool) GetPending ¶
func (pool *TransactionPool) GetPending(GasLimit *big.Int) []*types.Transaction
GetPending The packaging process takes the transaction and packages it
func (*TransactionPool) GetQueue ¶
func (pool *TransactionPool) GetQueue() []*types.Transaction
GetQueue Gets all transactions in the non-strictly sorted queue in the transaction pool
func (*TransactionPool) GetTransactionCount ¶
func (pool *TransactionPool) GetTransactionCount(address *crypto.CommonAddress) uint64
GetTransactionCount Gets the total number of transactions, that is, the nonce corresponding to the address
func (*TransactionPool) GetTransactions ¶
func (pool *TransactionPool) GetTransactions(addr *crypto.CommonAddress) []types.Transactions
GetTransactions gets all the trades in the current pool
func (*TransactionPool) GetTxInPool ¶
func (pool *TransactionPool) GetTxInPool(hash string) (*types.Transaction, error)
GetTxInPool get transactions in the trading pool
func (*TransactionPool) NewTxFeed ¶
func (pool *TransactionPool) NewTxFeed() *event.Feed
NewTxFeed new transaction feed in the trading pool