Documentation ¶
Index ¶
- type TxPool
- func (tp *TxPool) AddPendingTx(tx *pb.Transaction) 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) FetchBlock(height uint64) (*pb.Block, error)
- func (tp *TxPool) FetchTx(hash types.Hash) *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 ¶
func New ¶
func New(config *order.Config, storage storage.Storage, packSize int, blockTick time.Duration) (*TxPool, chan *raftproto.Ready)
New txpool
func (*TxPool) AddPendingTx ¶
func (tp *TxPool) AddPendingTx(tx *pb.Transaction) error
Add pending transaction into txpool
func (*TxPool) Broadcast ¶
func (tp *TxPool) Broadcast(tx *pb.Transaction) error
Broadcast the new transaction to other nodes
func (*TxPool) CheckExecute ¶
Check the txpool status, only leader node can run Execute()
func (*TxPool) FetchBlock ¶
Fetch tx by local txpool or network
func (*TxPool) FetchTx ¶
func (tp *TxPool) FetchTx(hash types.Hash) *pb.Transaction
Fetch tx by local txpool or network
Click to show internal directories.
Click to hide internal directories.