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 branch according to approval weight is liked by any given node.
func NewOnTangleVoting ¶
func NewOnTangleVoting(branchDAG *ledgerstate.BranchDAG, weightFunc consensus.WeightFunc) *OnTangleVoting
NewOnTangleVoting is the constructor for OnTangleVoting.
func (*OnTangleVoting) BranchLiked ¶
func (o *OnTangleVoting) BranchLiked(branchID ledgerstate.BranchID) (branchLiked bool)
BranchLiked returns whether the branch is the winner across all conflict sets (it is in the liked reality).
func (*OnTangleVoting) LikedConflictMember ¶
func (o *OnTangleVoting) LikedConflictMember(branchID ledgerstate.BranchID) (likedBranchID ledgerstate.BranchID, conflictMembers ledgerstate.BranchIDs)
LikedConflictMember returns the liked BranchID across the members of its conflict sets.
Click to show internal directories.
Click to hide internal directories.