normal

package module
v2.3.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2024 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const TxPoolType = "NORMAL"

TxPoolType is tx_pool type

Variables

View Source
var (
	// TxPoolConfig is tx_pool global configuration
	TxPoolConfig *txPoolConfig
	// MonitorEnabled indicates whether monitoring is enabled
	MonitorEnabled bool
)

Functions

func IsDumpTxsInQueue

func IsDumpTxsInQueue() bool

IsDumpTxsInQueue Whether to dump config and common transaction in queue

func IsMessageTurbo

func IsMessageTurbo(chainConf protocol.ChainConf) bool

IsMessageTurbo Whether block clipping

func IsMetrics

func IsMetrics() bool

IsMetrics Whether to log operation time

func IsTxTimeVerify

func IsTxTimeVerify(chainConf protocol.ChainConf) bool

IsTxTimeVerify Whether transaction timestamp is verified

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 return maximum timeout for a transaction

func NewNormalPool

func NewNormalPool(
	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)

NewNormalPool create normal tx pool normalPool

func QueryUpperLimit

func QueryUpperLimit() int

QueryUpperLimit Maximum number of querying transaction in the pool

Types

type Dispatcher

type Dispatcher interface {
	// DistTx distribute a tx to a specific common queues
	DistTx(txId string, queueNum int) int
	// DistTxs distribute txs to different common queues
	DistTxs(txs []*commonPb.Transaction, queueNum int) (txsTable [][]*commonPb.Transaction)
	// DistTxsToMemTxs distribute txs to different common queues and generate mtxsTable
	DistTxsToMemTxs(txs []*commonPb.Transaction, queueNum int, height uint64) (mtxsTable [][]*memTx)
	// DistTxIds distribute txIds to different common queues
	DistTxIds(txIds []string, queueNum int) (txIdsTable [][]string)
}

Dispatcher is used to distribute transaction to different common queues

type LogHelper added in v2.3.2

type LogHelper struct {
	// contains filtered or unexported fields
}

LogHelper Auxiliary printing

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL