Documentation ¶
Index ¶
- Constants
- Variables
- func BatchMaxSize(chainConf protocol.ChainConf) int
- func IsDumpTxsInQueue() bool
- func IsMetrics() bool
- func IsTxTimeVerify(chainConf protocol.ChainConf) bool
- func MaxCommonTxPoolSize() int
- func MaxConfigTxPoolSize() int
- func MaxTxCount(chainConf protocol.ChainConf) int
- func MaxTxTimeTimeout(chainConf protocol.ChainConf) float64
- func NewBatchTxPool(nodeId string, chainId string, txFilter protocol.TxFilter, ...) (protocol.TxPool, error)
- func QueryUpperLimit() int
- type ForwardMod
- type Forwarder
- type LogHelper
- type StageMod
- type TxBatchSourceMod
- type TxVerifyMod
Constants ¶
const ( // TxPoolType is tx_pool type TxPoolType = "BATCH" // BatchPoolAddtionalDataKey is the key for AddtionalData BatchPoolAddtionalDataKey = "BatchPoolAddtionalDataKey" )
Variables ¶
var ( // TxPoolConfig is tx_pool global configuration TxPoolConfig *txPoolConfig // MonitorEnabled indicates whether monitoring is enabled MonitorEnabled bool )
Functions ¶
func BatchMaxSize ¶
func BatchMaxSize(chainConf protocol.ChainConf) int
BatchMaxSize Maximum number of common transaction in a batch
func IsDumpTxsInQueue ¶
func IsDumpTxsInQueue() bool
IsDumpTxsInQueue Whether to dump config and common transaction in queue
func IsTxTimeVerify ¶
func IsTxTimeVerify(chainConf protocol.ChainConf) bool
IsTxTimeVerify Whether transactions require validation
func MaxCommonTxPoolSize ¶
func MaxCommonTxPoolSize() int
MaxCommonTxPoolSize Maximum number of common transaction in the pool
func MaxConfigTxPoolSize ¶
func MaxConfigTxPoolSize() int
MaxConfigTxPoolSize The maximum number of configure transaction in the pool
func MaxTxCount ¶
func MaxTxCount(chainConf protocol.ChainConf) int
MaxTxCount Maximum number of transactions in a block
func MaxTxTimeTimeout ¶
func MaxTxTimeTimeout(chainConf protocol.ChainConf) float64
MaxTxTimeTimeout The maximum timeout for a transaction
func NewBatchTxPool ¶
func NewBatchTxPool( nodeId string, chainId string, txFilter protocol.TxFilter, chainStore protocol.BlockchainStore, msgBus msgbus.MessageBus, chainConf protocol.ChainConf, singer protocol.SigningMember, ac protocol.AccessControlProvider, netService protocol.NetService, log protocol.Logger, monitorEnabled bool, poolConfig map[string]interface{}) (protocol.TxPool, error)
NewBatchTxPool creates batch tx_pool
Types ¶
type ForwardMod ¶
type ForwardMod string
ForwardMod identify transaction forward mod
const ( // ForwardModSelf is no forward (default) ForwardModSelf ForwardMod = "0" // ForwardModAVG is forward to all consensus nodes on average ForwardModAVG ForwardMod = "1" // ForwardModNode is forward to a consensus node ForwardModNode ForwardMod = "DEFAULT_NODE_ID" )
type Forwarder ¶
type Forwarder interface { // ForwardTx forward tx to a node ForwardTx(tx *commonPb.Transaction) (to string) }
Forwarder forward tx to a node
type LogHelper ¶ added in v3.0.1
type LogHelper struct {
// contains filtered or unexported fields
}
LogHelper Auxiliary printing
type StageMod ¶
type StageMod int
StageMod identify the location of the transaction
const ( // StageUnknown is unknown StageUnknown StageMod = iota // StageInQueue identify that the transaction is in a queue, is unpacked StageInQueue // StageInPending identify that the transaction is in a pendingCache, has been packed StageInPending // StageInQueueAndPending identify that the transaction is in a queue or pendingCache StageInQueueAndPending )
type TxBatchSourceMod ¶
type TxBatchSourceMod int
TxBatchSourceMod is the source of batch
const ( // TxBatchSourceUnknown is unknown TxBatchSourceUnknown TxBatchSourceMod = iota // TxBatchByBroadcast identify the batch is from other node by broadcasting TxBatchByBroadcast // TxBatchByRecover identify the batch is from proposer by recovering TxBatchByRecover // TxBatchByRetry identify the batch is from core by pruning TxBatchByRetry // TxBatchByRePlay identify the batch is from wal by replaying TxBatchByRePlay )
type TxVerifyMod ¶
type TxVerifyMod int
TxVerifyMod is the verify mod of tx
const ( // VerifyTxTime verify timestamp VerifyTxTime TxVerifyMod = iota // VerifyTxAuth verify tx format and signature VerifyTxAuth // VerifyTxInDB verify in full db VerifyTxInDB )