api

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2019 License: GPL-3.0 Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PublicDownloaderAPI

type PublicDownloaderAPI struct {
}

PublicDownloaderAPI overwrites the `ethereum/go-ethereum/eth/downloader/api.go` and disables its features.

func NewPublicDownloaderAPI

func NewPublicDownloaderAPI() *PublicDownloaderAPI

func (*PublicDownloaderAPI) SubscribeSyncStatus

func (api *PublicDownloaderAPI) SubscribeSyncStatus(status chan interface{}) *downloader.SyncStatusSubscription

func (*PublicDownloaderAPI) Syncing

func (api *PublicDownloaderAPI) Syncing(ctx context.Context) (*rpc.Subscription, error)

type PublicEthereumAPI

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

func NewPublicEthereumAPI

func NewPublicEthereumAPI(chainID *big.Int, e *eth.Ethereum, consAPI consensusAPI.API) *PublicEthereumAPI

NewPublicEthereumAPI creates a new Ethereum protocol API for full nodes.

func (*PublicEthereumAPI) ChainId

func (api *PublicEthereumAPI) ChainId() hexutil.Uint64

ChainId is the EIP-155 replay-protection chain id for the current ethereum chain config.

func (*PublicEthereumAPI) Hashrate

func (api *PublicEthereumAPI) Hashrate() hexutil.Uint64

Hashrate returns the POW hashrate

func (*PublicEthereumAPI) Syncing

func (e *PublicEthereumAPI) Syncing() (interface{}, error)

Syncing returns whether or not the current node is syncing with other peers. Returns false if not, or a struct outlining the state of the sync if it is.

type PublicNetAPI

type PublicNetAPI struct {
	NetworkVersion uint64
}

A dummy PublicNetAPI in order to overwrite the `ethereum/go-ethereum/internal/ethapi/api.go`.

func NewPublicNetAPI

func NewPublicNetAPI(networkVersion uint64) *PublicNetAPI

func (*PublicNetAPI) Listening

func (n *PublicNetAPI) Listening() bool

func (*PublicNetAPI) PeerCount

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

func (*PublicNetAPI) Version

func (n *PublicNetAPI) Version() string

Jump to

Keyboard shortcuts

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