network

package
v0.0.0-...-50f0b53 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

View Source
const LocalIncoming = "incoming"

Variables

View Source
var BootstrapNodes = []string{
	"/dns4/lotus-bootstrap.ipfsforce.com/tcp/41778/p2p/12D3KooWGhufNmZHF3sv48aQeS13ng5XVJZ9E6qy2Ms4VzqeUsHk",
	"/dns4/bootstrap-0.starpool.in/tcp/12757/p2p/12D3KooWGHpBMeZbestVEWkfdnC9u7p6uFHXL1n7m1ZBqsEmiUzz",
	"/dns4/bootstrap-1.starpool.in/tcp/12757/p2p/12D3KooWQZrGH1PxSNZPum99M1zNvjNFM33d1AAu5DcvdHptuU7u",
	"/dns4/node.glif.io/tcp/1235/p2p/12D3KooWBF8cpp65hp2u9LK5mh19x67ftAam84z9LsfaquTDSBpt",
	"/dns4/bootstarp-0.1475.io/tcp/61256/p2p/12D3KooWRzCVDwHUkgdK7eRgnoXbjDAELhxPErjHzbRLguSV1aRt",
	"/dns4/bootstrap-venus.mainnet.filincubator.com/tcp/8888/p2p/QmQu8C6deXwKvJP2D8B6QGyhngc3ZiDnFzEHBDx8yeBXST",
	"/dns4/bootstrap-mainnet-0.chainsafe-fil.io/tcp/34000/p2p/12D3KooWKKkCZbcigsWTEu1cgNetNbZJqeNtysRtFpq7DTqw3eqH",
	"/dns4/bootstrap-mainnet-1.chainsafe-fil.io/tcp/34000/p2p/12D3KooWGnkd9GQKo3apkShQDaq1d6cKJJmsVe6KiQkacUk1T8oZ",
	"/dns4/bootstrap-mainnet-2.chainsafe-fil.io/tcp/34000/p2p/12D3KooWHQRSDFv4FvAjtU32shQ7znz7oRbLBryXzZ9NMK2feyyH",
}

Functions

This section is empty.

Types

type HelloMessage

type HelloMessage struct {
	HeaviestTipSetCids   []cid.Cid
	HeaviestTipSetHeight abi.ChainEpoch
	HeaviestTipSetWeight fbig.Int
	GenesisHash          cid.Cid
}

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

func (*HelloMessage) MarshalCBOR

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

func (*HelloMessage) UnmarshalCBOR

func (t *HelloMessage) 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)

type Net

type Net struct {
	Network *net.Network
	// contains filtered or unexported fields
}

func NewNet

func NewNet(ctx context.Context, bootstrapNodes []string, getHeadF getHeadFunc) (*Net, error)

func (*Net) LotusSyncIncomingBlocks

func (n *Net) LotusSyncIncomingBlocks(ctx context.Context) (<-chan *ltypes.BlockHeader, error)

func (*Net) Start

func (n *Net) Start(ctx context.Context)

func (*Net) SyncIncomingBlocks

func (n *Net) SyncIncomingBlocks(ctx context.Context) (<-chan *types.BlockHeader, error)

Jump to

Keyboard shortcuts

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