network

package
v0.0.0-...-7de8d3f Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2019 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OnlineNodes = metrics.OnlineNodes
)

Functions

func GetNodeStats

func GetNodeStats() map[float64]float64

func NewKey

func NewKey() *ecdsa.PrivateKey

func PublicKeyToId

func PublicKeyToId(pubKey *ecdsa.PublicKey) []byte

func Reset

func Reset()

Types

type Msg

type Msg struct {
	Time float64
	Size float64
}

type Node

type Node struct {
	*godes.Runner
	IMetricCollector

	*NodeConfig
	// contains filtered or unexported fields
}

func NewBootstrapNode

func NewBootstrapNode(nodeConfig *NodeConfig) (n *Node)

func NewNode

func NewNode(nodeConfig *NodeConfig) (n *Node)

func (*Node) Address

func (n *Node) Address() common.Address

func (*Node) GetBootNodes

func (n *Node) GetBootNodes() []INode

func (*Node) GetConfig

func (n *Node) GetConfig() *EthereumConfig

func (*Node) GetDEVp2pPeers

func (n *Node) GetDEVp2pPeers() []INode

func (*Node) GetDialRatio

func (n *Node) GetDialRatio() int

func (*Node) GetDiscoveryTable

func (n *Node) GetDiscoveryTable() IDiscoveryTable

func (*Node) GetMaxPeers

func (n *Node) GetMaxPeers() int

func (*Node) GetNetworkID

func (n *Node) GetNetworkID() int

func (*Node) GetProtocols

func (n *Node) GetProtocols() []string

func (*Node) GetUDP

func (n *Node) GetUDP() IUdp

func (*Node) ID

func (n *Node) ID() ID

func (*Node) IsOnline

func (n *Node) IsOnline() bool

func (*Node) Kill

func (n *Node) Kill()

func (*Node) Name

func (n *Node) Name() string

func (*Node) PrivateKey

func (n *Node) PrivateKey() *ecdsa.PrivateKey

func (*Node) PublicKey

func (n *Node) PublicKey() *ecdsa.PublicKey

func (*Node) Run

func (n *Node) Run()

func (*Node) Server

func (n *Node) Server() IServer

func (*Node) String

func (n *Node) String() string

type NodeConfig

type NodeConfig struct {
	*EthereumConfig

	MaxPeers int

	DialRatio int

	BootNodes []*Node

	NetworkID int

	Protocols []string
}

Directories

Path Synopsis
eth
Package eth implements the Ethereum protocol.
Package eth implements the Ethereum protocol.
common
Package common contains various helper functions.
Package common contains various helper functions.
consensus
Package consensus implements different Ethereum consensus engines.
Package consensus implements different Ethereum consensus engines.
consensus/clique
Package clique implements the proof-of-authority consensus engine.
Package clique implements the proof-of-authority consensus engine.
core
Package core implements the Ethereum consensus protocol.
Package core implements the Ethereum consensus protocol.
core/rawdb
Package rawdb contains a collection of low level database accessors.
Package rawdb contains a collection of low level database accessors.
core/state
Package state provides a caching layer atop the Ethereum state trie.
Package state provides a caching layer atop the Ethereum state trie.
core/types
Package types contains data types related to Ethereum consensus.
Package types contains data types related to Ethereum consensus.
ethdb
Package ethdb defines the interfaces for an Ethereum data store.
Package ethdb defines the interfaces for an Ethereum data store.
ethdb/memorydb
Package memorydb implements the key-value database layer based on memory maps.
Package memorydb implements the key-value database layer based on memory maps.
fetcher
Package fetcher contains the block announcement based synchronisation.
Package fetcher contains the block announcement based synchronisation.
miner
Package miner implements Ethereum block creation and mining.
Package miner implements Ethereum block creation and mining.
trie
Package trie implements Merkle Patricia Tries.
Package trie implements Merkle Patricia Tries.

Jump to

Keyboard shortcuts

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