node

package
v0.0.0-...-7c12c5a Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2015 License: GPL-2.0, GPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "0.5.2"

Major: alpha Minor: encrypted p2p! Patch: New block pool logic

Variables

This section is empty.

Functions

func RunNode

func RunNode()

func SetFireable

func SetFireable(evsw *events.EventSwitch, eventables ...events.Eventable)

Add the event switch to reactors, mempool, etc.

Types

type Node

type Node struct {
	// contains filtered or unexported fields
}

func NewNode

func NewNode() *Node

func (*Node) AddListener

func (n *Node) AddListener(l p2p.Listener)

Add a Listener to accept inbound peer connections. Add listeners before starting the Node. The first listener is the primary listener (in NodeInfo)

func (*Node) BlockStore

func (n *Node) BlockStore() *bc.BlockStore

func (*Node) ConsensusState

func (n *Node) ConsensusState() *consensus.ConsensusState

func (*Node) DialSeed

func (n *Node) DialSeed()

Dial a list of seeds in random order Spawns a go routine for each dial

func (*Node) EventSwitch

func (n *Node) EventSwitch() *events.EventSwitch

func (*Node) MempoolReactor

func (n *Node) MempoolReactor() *mempl.MempoolReactor

func (*Node) Start

func (n *Node) Start() error

Call Start() after adding the listeners.

func (*Node) StartRPC

func (n *Node) StartRPC() (net.Listener, error)

func (*Node) Stop

func (n *Node) Stop()

func (*Node) Switch

func (n *Node) Switch() *p2p.Switch

type NodeGreeting

type NodeGreeting struct {
	NodeID
	Version string
	ChainID string
	Message string
	Time    time.Time
}

type NodeID

type NodeID struct {
	Name   string
	PubKey acm.PubKey
}

type PrivNodeID

type PrivNodeID struct {
	NodeID
	PrivKey acm.PrivKey
}

func (*PrivNodeID) SignGreeting

func (pnid *PrivNodeID) SignGreeting() *SignedNodeGreeting

type SignedNodeGreeting

type SignedNodeGreeting struct {
	NodeGreeting
	Signature acm.Signature
}

Jump to

Keyboard shortcuts

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