dag

package
v0.4.0-rc8 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFindAllTailsFailed = errors.New("Unable to find all tails")
)

Functions

func FindAllTails

func FindAllTails(txHash trinary.Hash, forceRelease bool) (map[string]struct{}, error)

func TraverseApprovees

func TraverseApprovees(startTxHash trinary.Hash, condition Predicate, consumer Consumer, onMissingApprovee OnMissingApprovee, forceRelease bool)

TraverseApprovees starts to traverse the approvees of the given start transaction until the traversal stops due to no more transactions passing the given condition.

Types

type Consumer

type Consumer func(cachedTx *tangle.CachedTransaction)

Consumer consumes the given transaction during traversal.

type OnMissingApprovee

type OnMissingApprovee func(approveeHash trinary.Hash)

OnMissingApprovee gets called when during traversal an approvee is missing.

type Predicate

type Predicate func(cachedTx *tangle.CachedTransaction) bool

Predicate defines whether a traversal should continue or not.

Jump to

Keyboard shortcuts

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