node

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 9, 2025 License: MIT Imports: 57 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CosmosNodeToP2PNode added in v0.0.5

func CosmosNodeToP2PNode(cosmosNodeAddr string) string

func DefaultMetricsProvider

func DefaultMetricsProvider(config *cfg.InstrumentationConfig) cmtnode.MetricsProvider

func HandleExitSignal

func HandleExitSignal() context.Context

func InitLogger

func InitLogger(config *cmtcfg.Config)

func LoadGenesisDoc

func LoadGenesisDoc(
	mainDB db.DB,
	genesisDocProvider cmtnode.GenesisDocProvider,
) (*cmttypes.GenesisDoc, error)

func NewChain

func NewChain(mainDB db.DB) *chain.Chain

func OpenMainDB

func OpenMainDB(ctx *cli.Context, dataDir string) *lvldb.LevelDB

Types

type Node

type Node struct {
	// contains filtered or unexported fields
}
var (
	GlobNodeInst *Node
)

func NewNode

func NewNode(
	ctx context.Context,
	config *cmtcfg.Config,
	privValidator *privval.FilePV,
	nodeKey *types.NodeKey,
	clientCreator cmtproxy.ClientCreator,
	genesisDocProvider cmtnode.GenesisDocProvider,
	dbProvider cmtcfg.DBProvider,
	metricProvider cmtnode.MetricsProvider,
	logger log.Logger,
) (*Node, error)

func (*Node) BroadcastTxAsync added in v0.0.41

func (n *Node) BroadcastTxAsync(ctx *rpctypes.Context, tx types.Tx) (*ctypes.ResultBroadcastTx, error)

func (*Node) BroadcastTxSync added in v0.0.41

func (n *Node) BroadcastTxSync(ctx *rpctypes.Context, tx types.Tx) (*ctypes.ResultBroadcastTx, error)

func (*Node) ConfigureRPC added in v0.0.40

func (n *Node) ConfigureRPC() (*rpccore.Environment, error)

ConfigureRPC makes sure RPC has all the objects it needs to operate.

func (*Node) GetTxPool added in v0.0.47

func (n *Node) GetTxPool() *txpool.TxPool

func (*Node) IsRunning

func (n *Node) IsRunning() bool

func (*Node) Start

func (n *Node) Start() error

func (*Node) Stop

func (n *Node) Stop() error

func (*Node) Tx added in v0.0.41

func (n *Node) Tx(ctx *rpctypes.Context, hash []byte, prove bool) (*ctypes.ResultTx, error)

Jump to

Keyboard shortcuts

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