urts

package
v2.0.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ParamsTipsel = &ParametersTipsel{}
View Source
var (
	Plugin *app.Plugin
)

Functions

This section is empty.

Types

type ParametersTipsel

type ParametersTipsel struct {
	// Enabled defines whether the tipselection plugin is enabled.
	Enabled bool `default:"true" usage:"whether the tipselection plugin is enabled"`

	// the config group used for the non-lazy tip-pool
	NonLazy struct {
		// Defines the maximum amount of current tips for which "CfgTipSelMaxReferencedTipAge"
		// and "CfgTipSelMaxChildren" are checked. if the amount of tips exceeds this limit,
		// referenced tips get removed directly to reduce the amount of tips in the network.
		RetentionRulesTipsLimit int `default:"100" usage:"the maximum number of current tips for which the retention rules are checked (non-lazy)"`
		// Defines the maximum time a tip remains in the tip pool
		// after it was referenced by the first block.
		MaxReferencedTipAge time.Duration `default:"3s" usage:"the maximum time a tip remains in the tip pool after it was referenced by the first block (non-lazy)"`
		// Defines the maximum amount of references by other blocks
		// before the tip is removed from the tip pool.
		MaxChildren uint32 `default:"30" usage:"the maximum amount of references by other blocks before the tip is removed from the tip pool (non-lazy)"`
	}

	// the config group used for the semi-lazy tip-pool
	SemiLazy struct {
		// Defines the maximum amount of current tips for which "CfgTipSelMaxReferencedTipAge"
		// and "CfgTipSelMaxChildren" are checked. if the amount of tips exceeds this limit,
		// referenced tips get removed directly to reduce the amount of tips in the network.
		RetentionRulesTipsLimit int `default:"20" usage:"the maximum number of current tips for which the retention rules are checked (semi-lazy)"`
		// Defines the maximum time a tip remains in the tip pool
		// after it was referenced by the first block.
		MaxReferencedTipAge time.Duration `default:"3s" usage:"the maximum time a tip remains in the tip pool after it was referenced by the first block (semi-lazy)"`
		// Defines the maximum amount of references by other blocks
		// before the tip is removed from the tip pool.
		MaxChildren uint32 `default:"2" usage:"the maximum amount of references by other blocks before the tip is removed from the tip pool (semi-lazy)"`
	}
}

ParametersTipsel contains the definition of the parameters used by Tipselection.

Jump to

Keyboard shortcuts

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