markervirtualvoting

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2023 License: Apache-2.0, BSD-2-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VirtualVoting

type VirtualVoting struct {
	Validators  *sybilprotection.WeightedSet
	ConflictDAG *conflictdag.ConflictDAG[utxo.TransactionID, utxo.OutputID]

	Workers *workerpool.Group
	// contains filtered or unexported fields
}

func New

func New(workers *workerpool.Group, conflictDAG *conflictdag.ConflictDAG[utxo.TransactionID, utxo.OutputID], sequenceManager *markers.SequenceManager, validators *sybilprotection.WeightedSet) (newVirtualVoting *VirtualVoting)

func (*VirtualVoting) ConflictVoters

func (v *VirtualVoting) ConflictVoters(conflictID utxo.TransactionID) (voters *sybilprotection.WeightedSet)

ConflictVoters retrieves Validators voting for a given conflict.

func (*VirtualVoting) ConflictVotersTotalWeight

func (v *VirtualVoting) ConflictVotersTotalWeight(conflictID utxo.TransactionID) (totalWeight int64)

ConflictVotersTotalWeight retrieves the total weight of the Validators voting for a given conflict.

func (*VirtualVoting) Events

func (*VirtualVoting) ProcessForkedBlock

func (v *VirtualVoting) ProcessForkedBlock(block *booker.Block, forkedConflictID utxo.TransactionID, parentConflictIDs utxo.TransactionIDs)

ProcessForkedBlock updates the Conflict weight after an individually mapped Block was forked into a new Conflict.

func (*VirtualVoting) Track

func (v *VirtualVoting) Track(block *booker.Block, conflictIDs utxo.TransactionIDs, votePower booker.BlockVotePower) (invalid bool)

Jump to

Keyboard shortcuts

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