Documentation ¶
Index ¶
- Constants
- Variables
- 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 NewTxPoolImpl(nodeId string, chainId string, txFilter protocol.TxFilter, ...) (protocol.TxPool, error)
- type LogConfig
- type LogNodeConfig
Constants ¶
View Source
const ( DefaultChannelSize = 10000 // The channel size to add the txs DefaultCacheThreshold = 1 DefaultFlushTimeOut = 2 * time.Second DefaultFlushTicker = 2 )
View Source
const ( DefaultMaxTxCount = 1000 // Maximum number of transactions in a block DefaultMaxTxPoolSize = 5120 // Maximum number of common transaction in the pool DefaultMaxConfigTxPoolSize = 100 // Maximum number of config transaction in the pool DefaultMaxTxTimeTimeout = float64(600) // The unit is in seconds )
View Source
const TxPoolType = "SINGLE"
Variables ¶
View Source
var ( MODULE_BRIEF = "[Brief]" MODULE_EVENT = "[Event]" )
View Source
var ( TxPoolConfig *txPoolConfig MonitorEnabled bool )
Functions ¶
func IsTxTimeVerify ¶
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 ¶
MaxTxCount Maximum number of transactions in a block
func MaxTxTimeTimeout ¶
MaxTxTimeTimeout The maximum timeout for a transaction
func NewTxPoolImpl ¶
func NewTxPoolImpl( nodeId string, chainId string, txFilter protocol.TxFilter, blockStore protocol.BlockchainStore, msgBus msgbus.MessageBus, conf protocol.ChainConf, ac protocol.AccessControlProvider, log protocol.Logger, monitorEnabled bool, poolConfig map[string]interface{}) (protocol.TxPool, error)
NewTxPoolImpl creates txPoolImpl
Types ¶
type LogConfig ¶
type LogConfig struct { ConfigFile string `mapstructure:"config_file"` SystemLog LogNodeConfig `mapstructure:"system"` BriefLog LogNodeConfig `mapstructure:"brief"` EventLog LogNodeConfig `mapstructure:"event"` }
LogConfig the config of log module
type LogNodeConfig ¶
type LogNodeConfig struct { LogLevelDefault string `mapstructure:"log_level_default"` LogLevels map[string]string `mapstructure:"log_levels"` FilePath string `mapstructure:"file_path"` MaxAge int `mapstructure:"max_age"` RotationTime int `mapstructure:"rotation_time"` RotationSize int64 `mapstructure:"rotation_size"` LogInConsole bool `mapstructure:"log_in_console"` ShowColor bool `mapstructure:"show_color"` }
LogNodeConfig the log config of node
Click to show internal directories.
Click to hide internal directories.