Documentation ¶
Index ¶
- func DefaultDBProvider(ctx *DBContext) (dbm.DB, error)
- func DefaultMetricsProvider() (*cs.Metrics, *mempl.Metrics)
- func MakeNodeInfo(chainID string, nodeType types.NodeType, moniker string, httpEndpoint string) p2p.NodeInfo
- func NopMetricsProvider() (*cs.Metrics, *mempl.Metrics)
- type DBContext
- type DBProvider
- type MetricsProvider
- type Node
- func (n *Node) BlockStore() *bc.BlockStore
- func (n *Node) BlockchainReactor() *bc.BlockchainReactor
- func (n *Node) ClearHistoricalData()
- func (n *Node) ConsensusReactor() *cs.ConsensusReactor
- func (n *Node) ConsensusState() *cs.ConsensusState
- func (n *Node) EventBus() *types.EventBus
- func (n *Node) EvidencePool() *evidence.EvidencePool
- func (n *Node) MempoolReactor() *mempl.MempoolReactor
- func (n *Node) NodeInfo() p2p.NodeInfo
- func (n *Node) OnStart() error
- func (n *Node) OnStop()
- func (n *Node) P2PManager() *p2p.Switch
- func (n *Node) PrivValidator() types.PrivValidator
- func (n *Node) RunForever()
- type NodeProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultDBProvider ¶
DefaultDBProvider returns a database using the DBBackend and DBDir specified in the ctx.Config.
func DefaultMetricsProvider ¶
DefaultMetricsProvider returns consensus, p2p and mempool Metrics build using Prometheus client library.
func MakeNodeInfo ¶
Types ¶
type DBProvider ¶
DBProvider takes a DBContext and returns an instantiated DB.
type MetricsProvider ¶
MetricsProvider returns a consensus, p2p and mempool Metrics.
type Node ¶
type Node struct { cmn.BaseService // contains filtered or unexported fields }
Node is the highest level interface to a full node. It includes all configuration information and running services.
func DefaultNewNode ¶
DefaultNewNode returns a node with default settings for the PrivValidator, and DBProvider. It implements NodeProvider.
func NewNode ¶
func NewNode(config *cfg.Config, privValidator types.PrivValidator, dbProvider DBProvider, metricsProvider MetricsProvider, logger log.Logger) (*Node, error)
NewNode returns a new, ready to go.
func (*Node) BlockStore ¶
func (n *Node) BlockStore() *bc.BlockStore
BlockStore returns the Node's BlockStore.
func (*Node) BlockchainReactor ¶
func (n *Node) BlockchainReactor() *bc.BlockchainReactor
func (*Node) ClearHistoricalData ¶
func (n *Node) ClearHistoricalData()
func (*Node) ConsensusReactor ¶
func (n *Node) ConsensusReactor() *cs.ConsensusReactor
ConsensusReactor returns the Node's ConsensusReactor.
func (*Node) ConsensusState ¶
func (n *Node) ConsensusState() *cs.ConsensusState
ConsensusState returns the Node's ConsensusState.
func (*Node) EvidencePool ¶
func (n *Node) EvidencePool() *evidence.EvidencePool
EvidencePool returns the Node's EvidencePool.
func (*Node) MempoolReactor ¶
func (n *Node) MempoolReactor() *mempl.MempoolReactor
MempoolReactor returns the Node's MempoolReactor.
func (*Node) PrivValidator ¶
func (n *Node) PrivValidator() types.PrivValidator
PrivValidator returns the Node's PrivValidator. XXX: for convenience only!
func (*Node) RunForever ¶
func (n *Node) RunForever()
RunForever waits for an interrupt signal and stops the node.