tipselection

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNodeNotSynced is return when the node is not synchronized during tipselection.
	ErrNodeNotSynced = errors.New("node is not synchronized")
	// ErrMilestoneNotFound is return when the entry point milestone is not found in the database during tipselection.
	ErrMilestoneNotFound = errors.New("milestone not found")
	// ErrDepthTooHigh is return when the given depth for tipselection exceeds the maximum depth of the node.
	ErrDepthTooHigh = errors.New("depth is too high")
	// ErrReferenceNotValid is return when the given reference transaction is not valid.
	ErrReferenceNotValid = errors.New("reference transaction is not valid")
	// ErrReferenceNotConsistent is return when the given reference transaction is not consistent with the other tip or the ledger.
	ErrReferenceNotConsistent = errors.New("reference transaction is not consistent")
)
View Source
var Events = tipselevents{
	TipSelPerformed: events.NewEvent(WalkerStatsCaller),
}
View Source
var (
	PLUGIN = node.NewPlugin("Tip-Sel", node.Enabled, configure, run)
)

Functions

func SelectTips

func SelectTips(depth uint, reference *hornet.Hash) (hornet.Hashes, *tipselection.TipSelStats, error)

SelectTips selects two tips Most Release calls inside this function shouldn't be forced, to cache the latest cone, except reference transaction

func WalkerStatsCaller

func WalkerStatsCaller(handler interface{}, params ...interface{})

Types

This section is empty.

Jump to

Keyboard shortcuts

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