Documentation ¶
Overview ¶
Package node contains classes for running a Erigon node.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEthConfigUrfave ¶
func NewNodConfigUrfave ¶
func NewNodeConfig ¶
Types ¶
type ErigonNode ¶
type ErigonNode struct {
// contains filtered or unexported fields
}
ErigonNode represents a single node, that runs sync and p2p network. it also can export the private endpoint for RPC daemon, etc.
func New ¶
func New( ctx context.Context, nodeConfig *nodecfg.Config, ethConfig *ethconfig.Config, logger log.Logger, ) (*ErigonNode, error)
New creates a new `ErigonNode`. * ctx - `*cli.Context` from the main function. Necessary to be able to configure the node based on the command-line flags * sync - `stagedsync.StagedSync`, an instance of staged sync, setup just as needed. * optionalParams - additional parameters for running a node.
func (*ErigonNode) Backend ¶
func (eri *ErigonNode) Backend() *eth.Ethereum
func (*ErigonNode) Close ¶
func (eri *ErigonNode) Close()
func (*ErigonNode) Node ¶
func (eri *ErigonNode) Node() *node.Node
func (*ErigonNode) Serve ¶
func (eri *ErigonNode) Serve() error
Serve runs the node and blocks the execution. It returns when the node is existed.
type Params ¶
Params contains optional parameters for creating a node. * GitCommit is a commit from which then node was built. * CustomBuckets is a `map[string]dbutils.TableCfgItem`, that contains bucket name and its properties.
NB: You have to declare your custom buckets here to be able to use them in the app.