node

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNodeHeightDB

func GetNodeHeightDB(home string) (int64, error)

The GetNodeHeightDB function retrieves the height of the node by querying the BlockstoreDB.

Types

type Node

type Node struct {
	DaemonPath string
	HomePath   string
	Mode       string
	PId        int
	Seeds      string
}

func NewNode

func NewNode(daemonPath string, homePath string, seeds string, mode string) *Node

func (*Node) GetNodeHeightURL

func (n *Node) GetNodeHeightURL(recursionDepth int) (int64, error)

The GetNodeHeightURL function retrieves the height of the node by querying the ABCI endpoint. It uses recursion with a maximum depth of 10 to handle delays or failures. It returns the nodeHeight if successful or an error message if the recursion depth reaches the limit (200s).

func (*Node) ShutdownNode

func (n *Node) ShutdownNode(p2p bool) error

func (*Node) Start

func (n *Node) Start(flags string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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