cfg

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: Unlicense Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MainNet = "mainnet"
	TestNet = "testnet"
	SimNet  = "simnet"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Params

type Params struct {

	// Name defines a human-readable identifier for the network
	Name string

	// Net is a uint32 magic byte identifier for the network
	Net node.IndraNet

	// DefaultPort is the default port for p2p listening
	DefaultPort string

	// DNSSeedAddresses is a list of DNS hostnames used to bootstrap a new node on the network
	DNSSeedAddresses []*SeedAddress
}

Params is the specification for an indranet swarm (mainnet, testnet, etc).

func SelectNetworkParams added in v0.1.13

func SelectNetworkParams(network string) *Params

SelectNetworkParams returns the network parameters associated with the network name.

func (*Params) ParseSeedMultiAddresses

func (self *Params) ParseSeedMultiAddresses() (addresses []multiaddr.Multiaddr, err error)

type SeedAddress added in v0.1.13

type SeedAddress struct {

	// ID is the p2p identifier (peer identity key).
	ID string

	// DNSAddress is the hostname of the seed node
	DNSAddress string
}

SeedAddress is a form of the key and network address for seeds on a network.

func NewSeedAddress

func NewSeedAddress(dns string, id string) *SeedAddress

Jump to

Keyboard shortcuts

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