eth

package
v0.0.0-...-2fe5e27 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const RPC_TIMEOUT = time.Duration(5 * time.Second)

Variables

This section is empty.

Functions

This section is empty.

Types

type EthManager

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

func NewManager

func NewManager(ethJsonRPC string, pollInterval, maxQueries, redoQueryTime int, dbMap *gorp.DbMap) *EthManager

func (*EthManager) LastBlockLoop

func (e *EthManager) LastBlockLoop()

LastBlockLoop is a simple loop that polls the eth json rpc for the latest block (height of the network), getting a block number in return, which stores alongside the timestamp of such received number. Eventually this service will be horizontally scaled, meaning that we must retrieve several "last block" values from the shared db and determine whether we can count with an actual number, or we should poll again.

func (*EthManager) RpcDispatcherLoop

func (e *EthManager) RpcDispatcherLoop()

RpcDispatcherLoop obtains ethereum data from the clients by reading the "wantfromdevp2p" table and dispatching queries. Succesful results are stored into the "ethdata" table, for further processing

Jump to

Keyboard shortcuts

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