Help us shape the future of Go! Take the 2026 Go Developer Survey

node

package
v0.0.30 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2021 License: Apache-2.0 Imports: 52 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

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

App implements tendermint ABCI interface to

func NewApp

func NewApp(
	cfg *config.AppConfig,
	db storagetypes.Engine,
	logic core.AtomicLogic,
	ticketMgr tickettypes.TicketManager) *App

NewApp creates an instance of App

func (*App) BeginBlock

BeginBlock indicates the beginning of a new block.

func (*App) CheckTx

CheckTx a proposed transaction for admission into the mempool. A non-zero response means the transaction is rejected and will not be broadcast to other nodes.

func (*App) Commit

func (a *App) Commit() abcitypes.ResponseCommit

Commit persist the application state. It must return a merkle root hash of the application state.

func (*App) DeliverTx

DeliverTx processes transactions included in a proposed block. Execute the transaction such that in modifies the blockchain state.

func (*App) EndBlock

EndBlock indicates the end of a block. Note: Any error from operations in here should panic to stop the block from being committed.

func (*App) Info

Info returns information about the application state. Used to sync tendermint with the application during a handshake that happens on startup. The returned AppVersion will be included in the header of every block. Tendermint expects LastBlockAppHash and LastBlockHeight to be updated during commit.

func (*App) InitChain

InitChain is called once upon genesis.

func (*App) Query

Query for data from the application.

type Node

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

Node represents the client

func NewNode

func NewNode(ctx context.Context, cfg *config.AppConfig) *Node

NewNode creates an instance of RPCServer

func (*Node) GetBlock

func (n *Node) GetBlock(height int64) *tmtypes.Block

GetBlock returns a tendermint block with the given height.

func (*Node) GetChainHeight

func (n *Node) GetChainHeight() int64

GetChainHeight returns the current chain height

func (*Node) GetModulesHub

func (n *Node) GetModulesHub() modtypes.ModulesHub

GetModulesHub returns the modules hub

func (*Node) OpenDB

func (n *Node) OpenDB() (err error)

OpenDB opens the app and state databases.

func (*Node) Start

func (n *Node) Start() error

Start starts the tendermint node

func (*Node) Stop

func (n *Node) Stop()

Stop the node

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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