Documentation ¶
Index ¶
- type VirtualVoting
- func (v *VirtualVoting) ConflictTracker() ...
- func (v *VirtualVoting) ConflictVoters(conflictID utxo.TransactionID) (voters *sybilprotection.WeightedSet)
- func (v *VirtualVoting) ConflictVotersTotalWeight(conflictID utxo.TransactionID) (totalWeight int64)
- func (v *VirtualVoting) Events() *booker.VirtualVotingEvents
- func (v *VirtualVoting) ProcessForkedBlock(block *booker.Block, forkedConflictID utxo.TransactionID, ...)
- func (v *VirtualVoting) Track(block *booker.Block, conflictIDs utxo.TransactionIDs, ...) (invalid bool)
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) ConflictTracker ¶
func (v *VirtualVoting) ConflictTracker() *conflicttracker.ConflictTracker[utxo.TransactionID, utxo.OutputID, booker.BlockVotePower]
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 (v *VirtualVoting) Events() *booker.VirtualVotingEvents
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)
Click to show internal directories.
Click to hide internal directories.