tipselection

package
v0.4.0-rc10 Latest Latest
Warning

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

Go to latest
Published: May 21, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TipSelStats

type TipSelStats struct {
	// The duration of the tip-selection for both walks.
	Duration time.Duration `json:"duration"`
	// The entry point of the tip-selection.
	EntryPoint trinary.Hash `json:"entry_point"`
	// The optional supplied reference transaction hash.
	Reference *trinary.Hash `json:"reference"`
	// The used depth for the tip-selection.
	Depth uint64 `json:"depth"`
	// The amount of steps taken, respectively transactions walked towards the present of the graph.
	StepsTaken uint64 `json:"steps_taken"`
	// The amount of steps jumped, meaning approvers selected without validating, as they were
	// walked/validated into by the previous walk.
	StepsJumped uint64 `json:"steps_jumped"`
	// The amount of transactions which were evaluated.
	Evaluated uint64 `json:"evaluated"`
	// Represents the cache hit ration for every call to belowMaxDepth globally over all tip-selections.
	GlobalBelowMaxDepthCacheHitRatio float64 `json:"global_below_max_depth_cache_hit_ratio"`
}

TipSelStats holds the stats for a tipselection run.

type TipSelectionFunc

type TipSelectionFunc = func(depth uint, reference *trinary.Hash) ([]trinary.Hash, *TipSelStats, error)

TipSelectionFunc is a function which performs a tipselection and returns two tips.

Jump to

Keyboard shortcuts

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