Documentation ¶
Overview ¶
Package ngpool is an autonomous module to handle the new-coming txs from internal or external events ngpool's use requires some other module's initialization: - blockchain(and ngblocks) - ngstate - ngp2p - storage
Index ¶
- Variables
- type TxPool
- func (pool *TxPool) GetPack(height uint64) ngtypes.TxTrie
- func (pool *TxPool) IsInPool(txHash []byte) (exists bool, inPoolTx *ngtypes.FullTx)
- func (pool *TxPool) PutNewTxFromLocal(tx *ngtypes.FullTx) (err error)
- func (pool *TxPool) PutNewTxFromRemote(tx *ngtypes.FullTx) (err error)
- func (pool *TxPool) PutTx(tx *ngtypes.FullTx) error
- func (pool *TxPool) Reset()
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTxInvalidHeight = errors.New("invalid tx height")
Functions ¶
This section is empty.
Types ¶
type TxPool ¶
TxPool is a little mem db which stores **signed** tx. RULE: One Account can only send one Tx, all Txs will be accepted Every time the state updated, the old pool will be deprecated.
func (*TxPool) PutNewTxFromLocal ¶
PutNewTxFromLocal puts tx from local(rpc) into txpool.
func (*TxPool) PutNewTxFromRemote ¶
PutNewTxFromRemote puts tx from local(rpc) into txpool.
Click to show internal directories.
Click to hide internal directories.