tracker

package
v1.11.11-rc.2 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: BSD-3-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 Accepted added in v1.9.6

type Accepted interface {
	validators.SetCallbackListener

	// SetLastAccepted updates the latest accepted block for [nodeID] to
	// [blockID]. If [nodeID] is not currently a validator, this is a noop.
	SetLastAccepted(nodeID ids.NodeID, blockID ids.ID)
	// LastAccepted returns the latest known accepted block of [nodeID]. If
	// [nodeID]'s last accepted block was never unknown, false will be returned.
	LastAccepted(nodeID ids.NodeID) (ids.ID, bool)
}

func NewAccepted added in v1.9.6

func NewAccepted() Accepted

type Peers added in v1.8.4

type Peers interface {
	validators.SetCallbackListener
	validators.Connector

	// ConnectedWeight returns the currently connected stake weight
	ConnectedWeight() uint64
	// ConnectedPercent returns the currently connected stake percentage [0, 1]
	ConnectedPercent() float64
	// SampleValidator returns a randomly selected connected validator. If there
	// are no currently connected validators then it will return false.
	SampleValidator() (ids.NodeID, bool)
	// GetValidators returns the set of all validators
	// known to this peer manager
	GetValidators() set.Set[ids.NodeID]
	// ConnectedValidators returns the set of all validators
	// that are currently connected
	ConnectedValidators() set.Set[ids.NodeID]
}

func NewMeteredPeers added in v1.10.3

func NewMeteredPeers(reg prometheus.Registerer) (Peers, error)

func NewPeers added in v1.8.4

func NewPeers() Peers

type Startup added in v1.8.4

type Startup interface {
	Peers

	ShouldStart() bool
}

func NewStartup added in v1.8.4

func NewStartup(peers Peers, startupWeight uint64) Startup

Jump to

Keyboard shortcuts

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