p2putils

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultBootNodeAddrStrings = []string{
	"/ip4/127.0.0.1/tcp/19876/p2p/Qmc1V6W7BwX8Ugb42Ti8RnXF1rY5PF7nnZ6bKBryCgi6cv",
}

DefaultBootNodeAddrStrings is a list of Harmony bootnodes address. Used to find other peers in the network.

Functions

func StringsToAddrs

func StringsToAddrs(addrStrings []string) (maddrs []ma.Multiaddr, err error)

StringsToAddrs convert a list of strings to a list of multiaddresses

func StringsToPeers

func StringsToPeers(input string) []p2p.Peer

StringsToPeers converts a string to a list of Peers addr is a string of format "ip:port,ip:port"

Types

type AddrList

type AddrList []ma.Multiaddr

AddrList is a list of multiaddress

var BootNodes AddrList

BootNodes is a list of boot nodes. It is populated either from default or from user CLI input.

func (*AddrList) Set

func (al *AddrList) Set(value string) error

Set is a function to set the value of AddrList based on a string

func (*AddrList) String

func (al *AddrList) String() string

String is a function to print a string representation of the AddrList

Jump to

Keyboard shortcuts

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