tracker

package
v1.7.12 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2022 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Peers added in v1.7.11

type Peers interface {
	validators.SetCallbackListener
	validators.Connector

	// ConnectedWeight returns the currently connected stake weight
	ConnectedWeight() uint64
	// PreferredPeers returns the currently connected validators. If there are
	// no currently connected validators then it will return the currently
	// connected peers.
	PreferredPeers() ids.NodeIDSet
}

func NewPeers added in v1.7.11

func NewPeers() Peers

type Startup added in v1.7.11

type Startup interface {
	Peers

	ShouldStart() bool
}

func NewStartup added in v1.7.11

func NewStartup(peers Peers, startupWeight uint64) Startup

type WeightTracker

type WeightTracker interface {
	AddWeightForNode(nodeID ids.ShortID) error
	RemoveWeightForNode(nodeID ids.ShortID) error
	EnoughConnectedWeight() bool
}

func NewWeightTracker

func NewWeightTracker(beacons validators.Set, startupAlpha uint64) WeightTracker

Jump to

Keyboard shortcuts

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