handshake

package
v0.0.0-...-1f8a15b Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HandShaker

type HandShaker struct {
	// contains filtered or unexported fields
}

HandShaker is the data type which will handle handshakes and determine if The peer is worth connecting to or not.

func New

func New(ctx context.Context, genesisConfig *clparams.GenesisConfig, beaconConfig *clparams.BeaconChainConfig, handler http.Handler) *HandShaker

func (*HandShaker) IsSet

func (h *HandShaker) IsSet() bool

Set returns the underlying status (only for giving out responses)

func (*HandShaker) SetStatus

func (h *HandShaker) SetStatus(status *cltypes.Status)

SetStatus sets the current network status against which we can validate peers.

func (*HandShaker) Status

func (h *HandShaker) Status() *cltypes.Status

Status returns the underlying status (only for giving out responses)

func (*HandShaker) ValidatePeer

func (h *HandShaker) ValidatePeer(id peer.ID) (bool, error)

Jump to

Keyboard shortcuts

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