core

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2020 License: Apache-2.0 Imports: 24 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultConf

func DefaultConf() *viper.Viper

func RunNode

func RunNode(config *viper.Viper, runtime, appName string)

func RunNodeRet

func RunNodeRet(config *viper.Viper, runtime, appName string) error

Types

type Node

type Node struct {
	Angine      *gemmill.Angine
	AngineTune  *gemmill.Tunes
	Application gtypes.Application
	GenesisDoc  *gtypes.GenesisDoc
	// contains filtered or unexported fields
}

func NewNode

func NewNode(conf *viper.Viper, runtime, appName string) (*Node, error)

func (*Node) ExecAdminTx

func (nd *Node) ExecAdminTx(app *vm.AdminDBApp, tx []byte) error

func (*Node) HealthStatus

func (n *Node) HealthStatus() int

func (*Node) IsRunning

func (n *Node) IsRunning() bool

func (*Node) NodeInfo

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

func (*Node) PrivValidator

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

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()

type RPCNode

type RPCNode interface {
	// GetShard(string) (*ShardNode, error)
	Height() int
	GetBlock(height int) (*gtypes.Block, *gtypes.BlockMeta, error)
	BroadcastTx(tx []byte) error
	BroadcastTxCommit(tx []byte) error
	FlushMempool()
	GetValidators() (int, []*gtypes.Validator)
	GetP2PNetInfo() (bool, []string, []*gtypes.Peer)
	GetNumPeers() int
	GetConsensusStateInfo() (string, []string)
	GetNumUnconfirmedTxs() int
	GetUnconfirmedTxs() []gtypes.Tx
	IsNodeValidator(pub crypto.PubKey) bool
	GetBlacklist() []string
}

RPCNode define the node's abilities provided for rpc calls

Jump to

Keyboard shortcuts

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