otv

package
v0.9.8 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2022 License: Apache-2.0, BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OnTangleVoting

type OnTangleVoting struct {
	// contains filtered or unexported fields
}

OnTangleVoting is a pluggable implementation of tangle.ConsensusMechanism2. On tangle voting is a generalized form of Nakamoto consensus for the parallel-reality-based ledger state where the heaviest conflict according to approval weight is liked by any given node.

func NewOnTangleVoting

func NewOnTangleVoting(conflictDAG *conflictdag.ConflictDAG[utxo.TransactionID, utxo.OutputID], weightFunc consensus.WeightFunc) *OnTangleVoting

NewOnTangleVoting is the constructor for OnTangleVoting.

func (*OnTangleVoting) ConflictLiked

func (o *OnTangleVoting) ConflictLiked(conflictID utxo.TransactionID) (conflictLiked bool)

ConflictLiked returns whether the conflict is the winner across all conflict sets (it is in the liked reality).

func (*OnTangleVoting) LikedConflictMember

func (o *OnTangleVoting) LikedConflictMember(conflictID utxo.TransactionID) (likedConflict utxo.TransactionID, dislikedConflicts utxo.TransactionIDs)

LikedConflictMember returns the liked ConflictID across the members of its conflict sets.

Jump to

Keyboard shortcuts

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