peermsg

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetBlocks

type GetBlocks struct {
	Locators [][]byte
}

GetBlocks defines a getblocks message on the Dusk wire protocol. It is used to request blocks from another peer.

func (*GetBlocks) Decode

func (g *GetBlocks) Decode(r *bytes.Buffer) error

Decode a GetBlocks struct from r into g.

func (*GetBlocks) Encode

func (g *GetBlocks) Encode(w *bytes.Buffer) error

Encode a GetBlocks struct and write it to w.

type Inv

type Inv struct {
	InvList []InvVect
}

func (*Inv) AddItem

func (inv *Inv) AddItem(t InvType, hash []byte)

func (*Inv) Decode

func (inv *Inv) Decode(r *bytes.Buffer) error

func (*Inv) Encode

func (i *Inv) Encode(w *bytes.Buffer) error

type InvType

type InvType uint8
var (
	InvTypeMempoolTx InvType = 0
	InvTypeBlock     InvType = 1
)

type InvVect

type InvVect struct {
	Type InvType // Type of data
	Hash []byte  // Hash of the data
}

Jump to

Keyboard shortcuts

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