config

package
v0.0.0-...-56f3d1a Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 5 Imported by: 4

Documentation

Index

Constants

View Source
const (
	// root链默认链名
	RootBlockChain = "xuper"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EngineConf

type EngineConf struct {
	// root chain name
	RootChain string `yaml:"rootChain,omitempty"`
	// BlockBroadcaseMode is the mode for broadcast new block
	BlockBroadcastMode uint8 `yaml:"blockBroadcastMode,omitempty"`
	// TxCacheExpiredTime expired time for tx cache
	TxIdCacheExpiredTime time.Duration `yaml:"txidCacheExpiredTime,omitempty"`
	// TxIdCacheGCInterval clean up interval for tx cache
	TxIdCacheGCInterval time.Duration `yaml:"txIdCacheGCInterval,omitempty"`
	// MaxBlockQueueSize the queue size of the processing block
	MaxBlockQueueSize int64 `yaml:"maxBlockQueueSize,omitempty"`
	// SyncBlockFilterMode is the mode for filter peerID list policies, 0-SyncWithNearestBucket, 1-SyncWithFactorBucket
	SyncBlockFilterMode int `yaml:"syncBlockFilterMode,omitempty"`
	// SyncFactorForFactorBucketMode only use for SyncWithFactorBucket mode of SyncBlockFilterMode configuration item
	SyncFactorForFactorBucketMode float64 `yaml:"SyncFactorForFactorBucketMode,omitempty"`
	DisableEmptyBlocks            bool    `yaml:"disableEmptyBlocks,omitempty"`
}

func GetDefEngineConf

func GetDefEngineConf() *EngineConf

func LoadEngineConf

func LoadEngineConf(cfgFile string) (*EngineConf, error)

Jump to

Keyboard shortcuts

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