Documentation ¶
Index ¶
- type Config
- type TxPool
- func (tp *TxPool) AddPendingTx(tx *pb.Transaction, isAckTx bool) error
- func (tp *TxPool) BatchDelete(hashes []types.Hash)
- func (tp *TxPool) BatchStore(hashes []types.Hash)
- func (tp *TxPool) Broadcast(tx *pb.Transaction) error
- func (tp *TxPool) BuildReqLookUp()
- func (tp *TxPool) CheckExecute(isLeader bool)
- func (tp *TxPool) FetchTx(hash types.Hash, height uint64) *pb.Transaction
- func (tp *TxPool) GetHeight() uint64
- func (tp *TxPool) GetTx(hash types.Hash, findByStore bool) (*pb.Transaction, bool)
- func (tp *TxPool) PoolSize() int
- func (tp *TxPool) RemoveTxs(hashes []types.Hash, isLeader bool)
- func (tp *TxPool) UpdateHeight() uint64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TxPool ¶
type TxPool struct { sync.RWMutex //lock for the pendingTxs // contains filtered or unexported fields }
func New ¶
func New(config *order.Config, storage storage.Storage, txPoolConfig *Config) (*TxPool, chan *raftproto.Ready)
New txpool
func (*TxPool) AddPendingTx ¶
func (tp *TxPool) AddPendingTx(tx *pb.Transaction, isAckTx bool) error
AddPendingTx add pending transaction into txpool
func (*TxPool) BatchDelete ¶
BatchDelete batch delete txs
func (*TxPool) BatchStore ¶
BatchStore batch store txs
func (*TxPool) Broadcast ¶
func (tp *TxPool) Broadcast(tx *pb.Transaction) error
Broadcast the new transaction to other nodes
func (*TxPool) BuildReqLookUp ¶
func (tp *TxPool) BuildReqLookUp()
BuildReqLookUp store the bloom filter
func (*TxPool) CheckExecute ¶
CheckExecute check the txpool status, only leader node can run Execute()
func (*TxPool) UpdateHeight ¶
UpdateHeight add the block height
Click to show internal directories.
Click to hide internal directories.