protocol

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NodeVer = &Version{
	Major: 0,
	Minor: 1,
	Patch: 1,
}

NodeVer is the current node version.

Functions

This section is empty.

Types

type Magic

type Magic uint32

Magic is the network that Dusk is running on

const (
	// MainNet identifies the production network of the Dusk blockchain
	MainNet Magic = 0x7630401f
	// TestNet identifies the test network of the Dusk blockchain
	TestNet Magic = 0x74746e41
	// DevNet identifies the development network of the Dusk blockchain
	DevNet Magic = 0x74736e40
)

func MagicFromConfig

func MagicFromConfig() Magic

MagicFromConfig reads the loaded magic config and tries to map it to magic identifier. Panic, if no match found.

type ServiceFlag

type ServiceFlag uint64

ServiceFlag indicates the services provided by the Node.

const (
	// FullNode indicates that a user is running the full node implementation of Dusk
	FullNode ServiceFlag = 1
)

type Version

type Version struct {
	Major uint8
	Minor uint8
	Patch uint16
}

Version is a struct that separates version fields.

func (*Version) Decode

func (v *Version) Decode(r io.Reader) error

Decode will Decodde a Version struct from r.

func (*Version) Encode

func (v *Version) Encode(w io.Writer) error

Encode will encode a Version struct to w.

func (Version) String

func (v Version) String() string

Jump to

Keyboard shortcuts

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