node

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package node provides functions to configure, initialize, and execute a Tendermint node. It does not implement an ABCI application - that implementation must be provided by the caller.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotInitialized = errors.New("not initialized")

Functions

This section is empty.

Types

type AppFactory

type AppFactory func(*privval.FilePV) (abci.Application, error)

AppFactory creates and returns an ABCI application.

type LocalClient

type LocalClient struct {
	// contains filtered or unexported fields
}

LocalClient is a proxy for local.Local that is used when a local client is needed before the node has been started.

func NewLocalClient

func NewLocalClient() *LocalClient

NewLocalClient creates a new LocalClient.

func (*LocalClient) ABCIQueryWithOptions

func (c *LocalClient) ABCIQueryWithOptions(ctx context.Context, path string, data bytes.HexBytes, opts client.ABCIQueryOptions) (*core.ResultABCIQuery, error)

ABCIQueryWithOptions implements client.ABCIClient.ABCIQueryWithOptions. Returns ErrNotInitialized if Set has not been called.

func (*LocalClient) BroadcastTxAsync

func (c *LocalClient) BroadcastTxAsync(ctx context.Context, tx tm.Tx) (*core.ResultBroadcastTx, error)

BroadcastTxAsync implements client.ABCIClient.BroadcastTxAsync. If Set has not been called, the transaction is queued and will be sent when Set is called.

func (*LocalClient) BroadcastTxSync

func (c *LocalClient) BroadcastTxSync(ctx context.Context, tx tm.Tx) (*core.ResultBroadcastTx, error)

BroadcastTxSync implements client.ABCIClient.BroadcastTxSync. Returns ErrNotInitialized if Set has not been called.

func (*LocalClient) CheckTx

func (c *LocalClient) CheckTx(ctx context.Context, tx tm.Tx) (*core.ResultCheckTx, error)

CheckTx implements client.MempoolClient.CheckTx. Returns ErrNotInitialized if Set has not been called.

func (*LocalClient) Set

func (c *LocalClient) Set(client *local.Local)

Set sets the local.Local client, transmitting any queued transactions.

func (*LocalClient) Subscribe

func (c *LocalClient) Subscribe(ctx context.Context, subscriber, query string, outCapacity ...int) (out <-chan core.ResultEvent, err error)

Subscribe implements client.EventsClient.Subscribe. Returns ErrNotInitialized if Set has not been called.

func (*LocalClient) Tx

func (c *LocalClient) Tx(ctx context.Context, hash []byte, prove bool) (*core.ResultTx, error)

BroadcastTxSync implements client.ABCIClient.BroadcastTxSync. Returns ErrNotInitialized if Set has not been called.

type Node

type Node struct {
	*node.Node
	Config *config.Config
	ABCI   abci.Application
}

Node wraps a Tendermint node.

func (*Node) Start

func (n *Node) Start() error

Start starts the Tendermint node.

Directories

Path Synopsis
Package abci implements the Accumulate ABCI applications.
Package abci implements the Accumulate ABCI applications.

Jump to

Keyboard shortcuts

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