node

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2016 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProtocolAndAddress added in v0.7.1

func ProtocolAndAddress(listenAddr string) (string, string)

Defaults to tcp

func RunNode

func RunNode(config cfg.Config)

Users wishing to:

  • use an external signer for their validators
  • supply an in-proc tmsp app

should fork tendermint/tendermint and implement RunNode to call NewNode with their custom priv validator and/or custom proxy.ClientCreator interface

func RunReplay

func RunReplay(config cfg.Config)

func RunReplayConsole

func RunReplayConsole(config cfg.Config)

func SetEventSwitch

func SetEventSwitch(evsw types.EventSwitch, eventables ...types.Eventable)

Add the event switch to reactors, mempool, etc.

Types

type Node

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

func NewNode

func NewNode(config cfg.Config, privValidator *types.PrivValidator, clientCreator proxy.ClientCreator) *Node

func NewNodeDefault added in v0.7.1

func NewNodeDefault(config cfg.Config) *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) ConsensusReactor

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

func (*Node) ConsensusState

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

func (*Node) DialSeeds

func (n *Node) DialSeeds(seeds []string)

func (*Node) EventSwitch

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

func (*Node) GenesisDoc added in v0.7.3

func (n *Node) GenesisDoc() *types.GenesisDoc

func (*Node) MempoolReactor

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

func (*Node) NodeInfo

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

func (*Node) PrivValidator

func (n *Node) PrivValidator() *types.PrivValidator

XXX: for convenience

func (*Node) ProxyApp added in v0.7.3

func (n *Node) ProxyApp() proxy.AppConns

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 crypto.PubKey
}

type PrivNodeID

type PrivNodeID struct {
	NodeID
	PrivKey crypto.PrivKey
}

func (*PrivNodeID) SignGreeting

func (pnid *PrivNodeID) SignGreeting() *SignedNodeGreeting

type SignedNodeGreeting

type SignedNodeGreeting struct {
	NodeGreeting
	Signature crypto.Signature
}

Jump to

Keyboard shortcuts

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