Documentation ¶
Index ¶
- Constants
- type TransactionPool
- func (tx_pool *TransactionPool) GetAllTxs() []*types.TxWrap
- func (tx_pool *TransactionPool) GetOrphaTxs() []*types.TxWrap
- func (tx_pool *TransactionPool) GetTxByHash(hash *crypto.HashType) (*types.TxWrap, bool)
- func (tx_pool *TransactionPool) Proc() goprocess.Process
- func (tx_pool *TransactionPool) ProcessTx(tx *types.Transaction, transferMode core.TransferMode) error
- func (tx_pool *TransactionPool) Run() error
- func (tx_pool *TransactionPool) Stop()
Constants ¶
View Source
const ( TxMsgBufferChSize = 65536 ChainUpdateMsgBufferChSize = 65536 TxScriptBufferChSize = 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() []*types.TxWrap
GetAllTxs returns all transactions in mempool
func (*TransactionPool) GetOrphaTxs ¶ added in v0.3.0
func (tx_pool *TransactionPool) GetOrphaTxs() []*types.TxWrap
GetOrphaTxs returns all orpha txs in mempool
func (*TransactionPool) GetTxByHash ¶ added in v0.3.0
GetTxByHash get a transaction by hash from pool or orphan pool return a tx and tell whether it is in pool or in orphan 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, transferMode core.TransferMode) 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.