ethereum

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2018 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEthConfig

func NewEthConfig(ctx *cli.Context, stack *node.Node) *eth.Config

NewEthConfig for the ethereum services #unstable

func NewNodeConfig

func NewNodeConfig(ctx *cli.Context) *node.Config

NewNodeConfig for p2p and network layer #unstable

Types

type EthState

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

func NewEthState

func NewEthState() *EthState

After NewEthState, call SetEthereum and SetEthConfig.

func (*EthState) AccumulateRewards

func (es *EthState) AccumulateRewards(config *params.ChainConfig, strategy *emtTypes.Strategy)

Accumulate validator rewards.

func (*EthState) Commit

func (es *EthState) Commit(receiver common.Address) (common.Hash, error)

Commit and reset the work.

func (*EthState) DeliverTx

Execute the transaction.

func (*EthState) EndBlock

func (es *EthState) EndBlock()

func (*EthState) GasLimit

func (es *EthState) GasLimit() *core.GasPool

func (*EthState) GetEthState

func (es *EthState) GetEthState() *state.StateDB

func (*EthState) Pending

func (es *EthState) Pending() (*ethTypes.Block, *state.StateDB)

Return a new block and a copy of the state from the latest work. #unstable

func (*EthState) ResetWorkState

func (es *EthState) ResetWorkState(receiver common.Address) error

func (*EthState) SetEthConfig

func (es *EthState) SetEthConfig(ethConfig *eth.Config)

func (*EthState) SetEthereum

func (es *EthState) SetEthereum(ethereum *eth.Ethereum)

func (*EthState) UpdateHeaderWithTimeInfo

func (es *EthState) UpdateHeaderWithTimeInfo(
	config *params.ChainConfig, parentTime uint64, numTx uint64)

type Node

type Node struct {
	node.Node
}

Node is the main object.

func New

func New(conf *node.Config) (*Node, error)

New creates a new node.

func (*Node) Start

func (n *Node) Start() error

Start starts base node and stop p2p server

Jump to

Keyboard shortcuts

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