api

package
v0.0.0-...-bc2dafa Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2020 License: Apache-2.0 Imports: 21 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	EthState *ethereum.EthereumWorkState
	// contains filtered or unexported fields
}

Backend handles the chain database and VM

func NewBackend

func NewBackend(ctx *node.ServiceContext, ethConfig *eth.Config) (*Backend, error)

NewBackend creates a new Backend

func (*Backend) APIs

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

func (*Backend) Config

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

Config returns the eth.Config.

func (*Backend) Ethereum

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

Ethereum returns the underlying the ethereum object.

func (*Backend) GetLocalClient

func (b *Backend) GetLocalClient() *rpcClient.Local

func (*Backend) ManagedState

func (b *Backend) ManagedState() *state.ManagedState

func (*Backend) PeerCount

func (b *Backend) PeerCount() int

func (*Backend) Protocols

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

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

func (*Backend) ResetState

func (b *Backend) ResetState() (*state.ManagedState, error)

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.

type FreeGasAPI

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

func NewFreeGasAPI

func NewFreeGasAPI(b Backend) *FreeGasAPI

func (*FreeGasAPI) GetStatus

func (s *FreeGasAPI) GetStatus() int

func (*FreeGasAPI) GetSurplus

func (s *FreeGasAPI) GetSurplus(ctx context.Context, address common.Address) (*hexutil.Big, error)

func (*FreeGasAPI) GetUsed

func (s *FreeGasAPI) GetUsed(ctx context.Context, address common.Address) (*hexutil.Big, error)

func (*FreeGasAPI) SetStatus

func (s *FreeGasAPI) SetStatus(stat int)

type NullBlockProcessor

type NullBlockProcessor struct{}

NullBlockProcessor does not validate anything

func (NullBlockProcessor) ValidateBody

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 uint64) error

ValidateState does not validate anything

Jump to

Keyboard shortcuts

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