ethereum

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2017 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEthConfig added in v0.2.0

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

NewEthConfig for the ethereum services

func NewNodeConfig added in v0.2.0

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

NewNodeConfig for p2p and network layer

Types

type Backend

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

Backend handles the chain database and VM

func NewBackend

func NewBackend(ctx *node.ServiceContext, config *eth.Config, client rpcClient.HTTPClient) (*Backend, error)

NewBackend creates a new Backend

func (*Backend) APIs

func (b *Backend) APIs() []rpc.API

APIs returns the collection of RPC services the ethereum package offers.

func (*Backend) AccumulateRewards

func (b *Backend) AccumulateRewards(strategy *emtTypes.Strategy)

AccumulateRewards accumulates the rewards based on the given strategy

func (*Backend) BroadcastTx

func (b *Backend) BroadcastTx(tx *ethTypes.Transaction) error

BroadcastTx broadcasts a transaction to tendermint core

func (*Backend) Commit

func (b *Backend) Commit(receiver common.Address) (common.Hash, error)

Commit finalises the current block

func (*Backend) Config

func (b *Backend) Config() *eth.Config

Config returns the eth.Config

func (*Backend) DeliverTx

func (b *Backend) DeliverTx(tx *ethTypes.Transaction) error

DeliverTx appends a transaction to the current block

func (*Backend) Ethereum

func (b *Backend) Ethereum() *eth.Ethereum

Ethereum returns the underlying the ethereum object

func (*Backend) GasLimit added in v0.2.0

func (b *Backend) GasLimit() big.Int

GasLimit returns the maximum gas per block

func (*Backend) Protocols

func (b *Backend) Protocols() []p2p.Protocol

Protocols implements node.Service, returning all the currently configured network protocols to start.

func (*Backend) ResetWork

func (b *Backend) ResetWork(receiver common.Address) error

ResetWork resets the current block to a fresh object

func (*Backend) Start

func (b *Backend) Start(srvr *p2p.Server) error

Start implements node.Service, starting all internal goroutines needed by the Ethereum protocol implementation.

func (*Backend) Stop

func (b *Backend) Stop() error

Stop implements node.Service, terminating all internal goroutines used by the Ethereum protocol.

func (*Backend) UpdateHeaderWithTimeInfo

func (b *Backend) UpdateHeaderWithTimeInfo(tmHeader *abciTypes.Header)

UpdateHeaderWithTimeInfo uses the tendermint header to update the ethereum header

type NetRPCService

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

NetRPCService mirrors the implementation of `internal/ethapi`

func NewNetRPCService added in v0.2.0

func NewNetRPCService(networkVersion uint64) *NetRPCService

NewNetRPCService creates a new net API instance.

func (*NetRPCService) Listening added in v0.2.0

func (n *NetRPCService) Listening() bool

Listening returns an indication if the node is listening for network connections.

func (*NetRPCService) PeerCount added in v0.2.0

func (n *NetRPCService) PeerCount() hexutil.Uint

PeerCount returns the number of connected peers

func (*NetRPCService) Version

func (n *NetRPCService) Version() string

Version returns the current ethereum protocol version.

type NullBlockProcessor

type NullBlockProcessor struct{}

NullBlockProcessor does not validate anything

func (NullBlockProcessor) ValidateBody added in v0.2.0

func (NullBlockProcessor) ValidateBody(*ethTypes.Block) error

ValidateBody does not validate anything

func (NullBlockProcessor) ValidateState

func (NullBlockProcessor) ValidateState(block, parent *ethTypes.Block, state *state.StateDB, receipts ethTypes.Receipts, usedGas *big.Int) error

ValidateState does not validate anything

Jump to

Keyboard shortcuts

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