discv5

package
v0.1.0-beta Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountBits

func CountBits(byteArr []byte) int

Types

type Attnets

type Attnets struct {
	Raw       utils.AttnetsENREntry
	NetNumber int
}

func ParseAttnets

func ParseAttnets(node enode.Node) (attnets *Attnets, exists bool, err error)

type Discv5Service

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

func NewService

func NewService(
	ctx context.Context,
	port int,
	privkey *ecdsa.PrivateKey,
	ethNode *enode.LocalNode,
	bootnodes []*enode.Node,
	enrHandler func(*enode.Node)) (*Discv5Service, error)

func (*Discv5Service) Run

func (dv5 *Discv5Service) Run()

type EnrNode

type EnrNode struct {
	Timestamp time.Time
	ID        enode.ID
	IP        net.IP
	Seq       uint64
	UDP       int
	TCP       int
	Pubkey    *ecdsa.PublicKey
	Eth2Data  *common.Eth2Data
	Attnets   *Attnets
}

func NewEnrNode

func NewEnrNode(nodeID enode.ID) *EnrNode

Jump to

Keyboard shortcuts

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