ethereum

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2017 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeSystemNode

func MakeSystemNode(name, version string, ctx *cli.Context) *node.Node

MakeSystemNode sets up a local node and configures the services to launch

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 Client) (*Backend, error)

New creates a new Backend

func (*Backend) APIs

func (s *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)

func (*Backend) BroadcastTx

func (s *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)

func (*Backend) Config

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

Config returns the eth.Config

func (*Backend) DeliverTx

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

func (*Backend) Ethereum

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

Ethereum returns the underlying the ethereum object

func (*Backend) Protocols

func (s *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

func (*Backend) Start

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

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

func (*Backend) Stop

func (s *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)

type Client

type Client interface {
	// see tendermint/go-rpc/client/http_client.go:115 func (c *ClientURI) Call(...)
	Call(method string, params map[string]interface{}, result interface{}) (interface{}, error)
}

used by Backend to call tendermint rpc endpoints TODO: replace with HttpClient https://github.com/tendermint/go-rpc/issues/8

type NetRPCService

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

we must implement our own net service since we don't have access to `internal/ethapi`

func (*NetRPCService) Version

func (n *NetRPCService) Version() string

type NullBlockProcessor

type NullBlockProcessor struct{}

NullBlockProcessor does not validate anything

func (NullBlockProcessor) ValidateBlock

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

ValidateBlock does not validate anything

func (NullBlockProcessor) ValidateHeader

ValidateHeader 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