Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OnMeshVoting ¶
type OnMeshVoting struct {
// contains filtered or unexported fields
}
OnMeshVoting is a pluggable implementation of mesh.ConsensusMechanism2. On mesh 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 NewOnMeshVoting ¶
func NewOnMeshVoting(conflictDAG *conflictdag.ConflictDAG[utxo.TransactionID, utxo.OutputID], weightFunc consensus.WeightFunc) *OnMeshVoting
NewOnMeshVoting is the constructor for OnMeshVoting.
func (*OnMeshVoting) ConflictLiked ¶
func (o *OnMeshVoting) 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 (*OnMeshVoting) LikedConflictMember ¶
func (o *OnMeshVoting) LikedConflictMember(conflictID utxo.TransactionID) (likedConflict utxo.TransactionID, dislikedConflicts utxo.TransactionIDs)
LikedConflictMember returns the liked ConflictID across the members of its conflict sets.
Click to show internal directories.
Click to hide internal directories.