peer

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Peer

type Peer interface {
	// ID returns peer ID. Must be unique in the network.
	ID() PeerID
	// Connection returns peer connection, using to send and receive Elements messages.
	Connection() io.ReadWriteCloser
	// Addr returns the Network Address of the peer
	Addr() *protocol.Addr
	// PeersTip returns current tip block height
	PeersTip() uint32
	// SetPeersTip sets the block height tip of the peer
	SetPeersTip(startBlockHeight uint32)
}

Peer describes a network's node.

func NewElementsPeer

func NewElementsPeer(peerAddr string) (Peer, error)

type PeerID

type PeerID string

PeerID is peer IP address.

Jump to

Keyboard shortcuts

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