consensus

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2019 License: GPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const DataDirName = "consensus"

Variables

This section is empty.

Functions

func Init

func Init(cfg Config, ntw setup.Network, logger log.Logger) error

Types

type Config

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

Config is general consensus node config.

Default values:

- rpcListenPort 26657 - p2pListenPort 26656 - ProxyListenPort 26658

func NewConfig

func NewConfig(dataDir string, rpcListenPort uint, p2pListenPort uint, proxyListenPort uint, proxyProtocol string) Config

func (Config) RPCListenPort

func (c Config) RPCListenPort() uint

func (Config) TendermintConfigFilePath

func (c Config) TendermintConfigFilePath() string

type Node

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

func NewNode

func NewNode(cfg *Config) (*Node, error)

func (*Node) Start

func (n *Node) Start(ethRPCClient *ethRpc.Client, db *database.Database) error

func (*Node) Stop

func (n *Node) Stop() error

type TendermintABCI

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

func NewTendermintABCI

func NewTendermintABCI(db *database.Database, ethRPCClient *rpc.Client, logger tmtLog.Logger) (*TendermintABCI, error)

func (*TendermintABCI) BeginBlock

BeginBlock starts a new Ethereum block

func (*TendermintABCI) CheckTx

func (abci *TendermintABCI) CheckTx(txBytes []byte) tmtAbciTypes.ResponseCheckTx

CheckTx checks a transaction is valid but does not mutate the state

func (*TendermintABCI) CollectTx

func (abci *TendermintABCI) CollectTx(tx *ethTypes.Transaction)

CollectTx invokes CollectTx on the strategy

func (*TendermintABCI) Commit

Commits the block and returns a hash of the current state

func (*TendermintABCI) DeliverTx

func (abci *TendermintABCI) DeliverTx(txBytes []byte) tmtAbciTypes.ResponseDeliverTx

DeliverTx executes a transaction against the latest state

func (*TendermintABCI) EndBlock

EndBlock accumulates rewards for the validators and updates them

func (*TendermintABCI) Info

Info returns information about the last height and app_hash to the tmtCfg engine

func (*TendermintABCI) InitChain

InitChain initializes the validator set

func (*TendermintABCI) InitEthState

func (abci *TendermintABCI) InitEthState() error

func (*TendermintABCI) Query

Query queries the state of the TendermintABCI

func (*TendermintABCI) Receiver

func (abci *TendermintABCI) Receiver() common.Address

Receiver returns the receiving address based on the selected strategy

func (*TendermintABCI) SetOption

SetOption sets a configuration option

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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