selectpeers

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package selectpeers is package contains algorithm that selects peers based on the deterministic connection selection algorithm described in DIP-6

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ValidatorSelector

type ValidatorSelector interface {
	// SelectValidators selects some validators from `validators` slice
	SelectValidators(validators []*types.Validator, me *types.Validator) ([]*types.Validator, error)
	// SelectInboundValidators selects the validators that are expected to open a
	// connection to `me`, i.e. those for which `me` is a SelectValidators result.
	SelectInboundValidators(validators []*types.Validator, me *types.Validator) ([]*types.Validator, error)
}

ValidatorSelector represents an algorithm that chooses some validators from provided list

func NewDIP6ValidatorSelector

func NewDIP6ValidatorSelector(quorumHash bytes.HexBytes) ValidatorSelector

NewDIP6ValidatorSelector creates new implementation of validator selector algorithm

Jump to

Keyboard shortcuts

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