Documentation
¶
Index ¶
- Constants
- type TransactionPool
- func (tx_pool *TransactionPool) GetAllTxs() []*chain.TxWrap
- func (tx_pool *TransactionPool) GetTransactionsInPool() []*types.Transaction
- func (tx_pool *TransactionPool) Proc() goprocess.Process
- func (tx_pool *TransactionPool) ProcessTx(tx *types.Transaction, broadcast bool) error
- func (tx_pool *TransactionPool) Run() error
- func (tx_pool *TransactionPool) Stop()
Constants ¶
View Source
const ( TxMsgBufferChSize = 65536 ChainUpdateMsgBufferChSize = 65536 )
const defines constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TransactionPool ¶
type TransactionPool struct {
// contains filtered or unexported fields
}
TransactionPool define struct.
func NewTransactionPool ¶
func NewTransactionPool(parent goprocess.Process, notifiee p2p.Net, c *chain.BlockChain, bus eventbus.Bus) *TransactionPool
NewTransactionPool new a transaction pool.
func (*TransactionPool) GetAllTxs ¶
func (tx_pool *TransactionPool) GetAllTxs() []*chain.TxWrap
GetAllTxs returns all transactions in mempool
func (*TransactionPool) GetTransactionsInPool ¶
func (tx_pool *TransactionPool) GetTransactionsInPool() []*types.Transaction
GetTransactionsInPool gets all transactions in memory pool
func (*TransactionPool) Proc ¶
func (tx_pool *TransactionPool) Proc() goprocess.Process
Proc returns the goprocess of the TransactionPool
func (*TransactionPool) ProcessTx ¶
func (tx_pool *TransactionPool) ProcessTx(tx *types.Transaction, broadcast bool) error
ProcessTx is used to handle new transactions. utxoSet: utxos associated with the tx
func (*TransactionPool) Run ¶
func (tx_pool *TransactionPool) Run() error
Run launch transaction pool.
Click to show internal directories.
Click to hide internal directories.