Documentation ¶
Overview ¶
Package tnmpool is an autonomous module to handle the new-coming txs from internal or external events tnmpool's use requires some other module's initialization: - blockchain(and tnmblocks) - tnmstate - tnmp2p - storage
Index ¶
- Variables
- type TxPool
- func (pool *TxPool) GetPack(height uint64) tnmtypes.TxTrie
- func (pool *TxPool) IsInPool(txHash []byte) (exists bool, inPoolTx *tnmtypes.FullTx)
- func (pool *TxPool) PutNewTxFromLocal(tx *tnmtypes.FullTx) (err error)
- func (pool *TxPool) PutNewTxFromRemote(tx *tnmtypes.FullTx) (err error)
- func (pool *TxPool) PutTx(tx *tnmtypes.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.