node

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2022 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	Store            store.Store
	Chain            *blockchain.Chain
	Consensus        *consensus.ConsensusEngine
	ValidatorManager core.ValidatorManager
	SyncManager      *netsync.SyncManager
	Dispatcher       *dp.Dispatcher
	Ledger           core.Ledger
	Mempool          *mp.Mempool
	RPC              *rpc.DneroRPCServer
	// contains filtered or unexported fields
}

func NewNode

func NewNode(params *Params) *Node

func (*Node) Start

func (n *Node) Start(ctx context.Context)

Start starts sub components and kick off the main loop.

func (*Node) Stop

func (n *Node) Stop()

Stop notifies all sub components to stop without blocking.

func (*Node) Wait

func (n *Node) Wait()

Wait blocks until all sub components stop.

type Params

type Params struct {
	ChainID             string
	PrivateKey          *crypto.PrivateKey
	Root                *core.Block
	NetworkOld          p2p.Network
	Network             p2pl.Network
	DB                  database.Database
	SnapshotPath        string
	ChainImportDirPath  string
	ChainCorrectionPath string
}

Jump to

Keyboard shortcuts

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