node

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: GPL-3.0 Imports: 71 Imported by: 0 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

func NewHTTPHandlerStack

func NewHTTPHandlerStack(srv http.Handler, cors []string, vhosts []string, jwtSecret []byte) http.Handler

func NewWSHandlerStack

func NewWSHandlerStack(srv http.Handler, jwtSecret []byte) http.Handler

NewWSHandlerStack returns a wrapped ws-related handler.

func OpenDatabase

func OpenDatabase(cfg *conf.Config, logger log2.Logger, name string) (kv.RwDB, error)

func RegisterApisFromWhitelist

func RegisterApisFromWhitelist(apis []jsonrpc.API, modules []string, srv *jsonrpc.Server, exposeAll bool) error

func SplitTagsFlag

func SplitTagsFlag(tagsFlag string) map[string]string

func WriteGenesisBlock

func WriteGenesisBlock(db kv.RwTx, genesis *conf.Genesis) (*block.Block, error)

Types

type Node

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

func NewNode

func NewNode(ctx context.Context, cfg *conf.Config) (*Node, error)

func (*Node) AccountManager

func (n *Node) AccountManager() *accounts.Manager

AccountManager retrieves the account manager used by the protocol stack.

func (*Node) BlockChain

func (n *Node) BlockChain() common.IBlockChain

AccountManager retrieves the account manager used by the protocol stack.

func (*Node) ChainDb

func (n *Node) ChainDb() kv.RwDB

func (*Node) Close

func (n *Node) Close()

func (*Node) Database

func (n *Node) Database() kv.RwDB

func (*Node) Engine

func (n *Node) Engine() consensus.Engine

func (*Node) Etherbase

func (s *Node) Etherbase() (eb types.Address, err error)

func (*Node) KeyStoreDir

func (n *Node) KeyStoreDir() string

KeyStoreDir retrieves the key directory

func (*Node) Miner

func (n *Node) Miner() common.IMiner

func (*Node) Network

func (n *Node) Network() common.INetwork

func (*Node) ProtocolHandshake

func (n *Node) ProtocolHandshake(peer common.IPeer, genesisHash types.Hash, currentHeight *uint256.Int) (common.Peer, bool)

func (*Node) ProtocolHandshakeInfo

func (n *Node) ProtocolHandshakeInfo() (types.Hash, *uint256.Int, error)

func (*Node) SetupMetrics

func (n *Node) SetupMetrics(config conf.MetricsConfig)

func (*Node) Start

func (n *Node) Start() error

Jump to

Keyboard shortcuts

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