hello

package
v1.15.2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0, MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const ProtocolID = "/fil/hello/1.0.0"

Variables

View Source
var ErrBadGenesis = fmt.Errorf("bad genesis block")

Functions

This section is empty.

Types

type GreetingMessage

type GreetingMessage struct {
	HeaviestTipSet       []cid.Cid
	HeaviestTipSetHeight abi.ChainEpoch
	HeaviestTipSetWeight big.Int
	GenesisHash          cid.Cid
}

GreetingMessage is the data structure of a single message in the hello protocol.

func (*GreetingMessage) MarshalCBOR

func (t *GreetingMessage) MarshalCBOR(w io.Writer) error

func (*GreetingMessage) UnmarshalCBOR

func (t *GreetingMessage) UnmarshalCBOR(r io.Reader) (err error)

type LatencyMessage

type LatencyMessage struct {
	TArrival int64
	TSent    int64
}

LatencyMessage is written in response to a hello message for measuring peer latency.

func (*LatencyMessage) MarshalCBOR

func (t *LatencyMessage) MarshalCBOR(w io.Writer) error

func (*LatencyMessage) UnmarshalCBOR

func (t *LatencyMessage) UnmarshalCBOR(r io.Reader) (err error)

Jump to

Keyboard shortcuts

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