Documentation ¶
Index ¶
- Constants
- type ActorType
- type CheckTxnReq
- type CheckTxnRsp
- type GetPendingTxnReq
- type GetPendingTxnRsp
- type GetTxnPoolReq
- type GetTxnPoolRsp
- type GetTxnReq
- type GetTxnRsp
- type GetTxnStats
- type GetTxnStatsRsp
- type GetTxnStatusReq
- type GetTxnStatusRsp
- type LB
- type LBSlice
- type SenderType
- type TXAttr
- type TXEntry
- type TXPool
- func (tp *TXPool) AddTxList(txEntry *TXEntry) bool
- func (tp *TXPool) CleanTransactionList(txs []*types.Transaction) error
- func (tp *TXPool) DelTxList(tx *types.Transaction) bool
- func (tp *TXPool) GetTransaction(hash common.Uint256) *types.Transaction
- func (tp *TXPool) GetTransactionCount() int
- func (tp *TXPool) GetTxPool(byCount bool) []*TXEntry
- func (tp *TXPool) GetTxStatus(hash common.Uint256) *TxStatus
- func (tp *TXPool) Init()
- type TxReq
- type TxRsp
- type TxStatus
- type TxnStatsType
- type VerifyBlockReq
- type VerifyBlockRsp
- type VerifyTxResult
Constants ¶
View Source
const ( MAX_CAPACITY = 100140 // The tx pool's capacity that holds the verified txs MAX_PENDING_TXN = 4096 * 10 // The max length of pending txs MAX_WORKER_NUM = 2 // The max concurrent workers MAX_RCV_TXN_LEN = MAX_WORKER_NUM * MAX_PENDING_TXN // The max length of the queue that server can hold MAX_RETRIES = 0 // The retry times to verify tx EXPIRE_INTERVAL = 9 // The timeout that verify tx STATELESS_MASK = 0x1 // The mask of stateless validator STATEFUL_MASK = 0x2 // The mask of stateful validator VERIFY_MASK = STATELESS_MASK | STATEFUL_MASK // The mask that indicates tx valid MAX_LIMITATION = 10000 // The length of pending tx from net and http )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActorType ¶
type ActorType uint8
const ( TxActor ActorType // Actor that handles new transaction TxPoolActor // Actor that handles consensus msg VerifyRspActor // Actor that handles the response from valdiators NetActor // Actor to send msg to the net actor MaxActor )
type CheckTxnReq ¶
type CheckTxnRsp ¶
type CheckTxnRsp struct {
Ok bool
}
type GetPendingTxnReq ¶
type GetPendingTxnReq struct {
ByCount bool
}
type GetPendingTxnRsp ¶
type GetPendingTxnRsp struct {
Txs []*types.Transaction
}
type GetTxnPoolRsp ¶
type GetTxnPoolRsp struct {
TxnPool []*TXEntry
}
type GetTxnRsp ¶
type GetTxnRsp struct {
Txn *types.Transaction
}
type GetTxnStats ¶
type GetTxnStats struct { }
type GetTxnStatsRsp ¶
type GetTxnStatsRsp struct {
Count []uint64
}
type GetTxnStatusReq ¶
type GetTxnStatusRsp ¶
type SenderType ¶
type SenderType uint8
const ( NilSender SenderType = iota NetSender // Net sends tx req HttpSender // Http sends tx req )
func (SenderType) Sender ¶
func (sender SenderType) Sender() string
type TXAttr ¶
type TXAttr struct { Height uint32 // The height in which tx was verified Type vt.VerifyType // The validator flag: stateless/stateful ErrCode errors.ErrCode // Verified result }
type TXEntry ¶
type TXEntry struct { Tx *types.Transaction // transaction which has been verified Fee common.Fixed64 // Total fee per transaction Attrs []*TXAttr // the result from each validator }
type TXPool ¶
func (*TXPool) CleanTransactionList ¶
func (tp *TXPool) CleanTransactionList(txs []*types.Transaction) error
clean the trasaction Pool with committed transactions.
func (*TXPool) GetTransaction ¶
func (tp *TXPool) GetTransaction(hash common.Uint256) *types.Transaction
func (*TXPool) GetTransactionCount ¶
type TxReq ¶
type TxReq struct { Tx *types.Transaction Sender SenderType }
type TxnStatsType ¶
type TxnStatsType uint8
const ( RcvStats TxnStatsType // The count that the tx pool receive from the actor bus SuccessStats // The count that the transactions are verified successfully FailureStats // The count that the transactions are invalid DuplicateStats // The count that the transactions are duplicated input SigErrStats // The count that the transactions' signature error StateErrStats // The count that the transactions are invalid in database MaxStats )
type VerifyBlockReq ¶
type VerifyBlockReq struct { Height uint32 Txs []*types.Transaction }
type VerifyBlockRsp ¶
type VerifyBlockRsp struct {
TxnPool []*VerifyTxResult
}
type VerifyTxResult ¶
type VerifyTxResult struct { Height uint32 Tx *types.Transaction ErrCode errors.ErrCode }
Click to show internal directories.
Click to hide internal directories.