addnode

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2020 License: Apache-2.0, BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MARSHALED_PACKET_HEADER = 0x01

	MARSHALED_PACKET_HEADER_START = 0
	MARSHALED_PACKET_HEADER_SIZE  = 1
	MARSHALED_PACKET_HEADER_END   = MARSHALED_PACKET_HEADER_START + MARSHALED_PACKET_HEADER_SIZE

	MARSHALED_ID_START = MARSHALED_PACKET_HEADER_END
	MARSHALED_ID_SIZE  = sha256.Size
	MARSHALED_ID_END   = MARSHALED_ID_START + MARSHALED_ID_SIZE

	MARSHALED_TOTAL_SIZE = MARSHALED_ID_END
)

Variables

View Source
var (
	ErrMalformedAddNodePacket = errors.New("malformed add node packet")
)

Functions

This section is empty.

Types

type Packet

type Packet struct {
	NodeId []byte
}

func Unmarshal

func Unmarshal(data []byte) (*Packet, error)

func (*Packet) Marshal

func (packet *Packet) Marshal() []byte

Jump to

Keyboard shortcuts

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