chainsync

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Overview

Package chainsync provides the implementation of the chainsync protocol that verifies peer chain synchronization.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainSync

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

func New

func New(s p2p.Streamer, backend transaction.Backend) (*ChainSync, error)

func (*ChainSync) Protocol

func (s *ChainSync) Protocol() p2p.ProtocolSpec

func (*ChainSync) Prove

func (s *ChainSync) Prove(ctx context.Context, peer swarm.Address, blockheight uint64) ([]byte, error)

Prove asks a peer to prove they know a certain block height on the current used eth backend.

Directories

Path Synopsis
Package pb holds only Protocol Buffer definitions and generated code.
Package pb holds only Protocol Buffer definitions and generated code.

Jump to

Keyboard shortcuts

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