Skip to content

discv5::StaticEnodeBootnodeSource

Bootstrap source backed by a fixed list of "enode://…" URI strings. More...

#include <discv5_bootnodes.hpp>

Inherits from discv5::IBootnodeSource

Public Functions

Name
StaticEnodeBootnodeSource(std::vector< std::string > enode_uris, std::string name ="static-enode")
Construct with a pre-built list of enode URI strings.
virtual std::vector< std::string > fetch() const override
Return all bootstrap ENR URIs available from this source.
virtual std::string name() const override
Human-readable name of this source, for logging.

Additional inherited members

Public Functions inherited from discv5::IBootnodeSource

Name
virtual ~IBootnodeSource() =default

Detailed Description

class discv5::StaticEnodeBootnodeSource;

Bootstrap source backed by a fixed list of "enode://…" URI strings.

Used for chains that only publish enode boot nodes (e.g. BSC, Polygon). The crawler will create a minimal ValidatedPeer for each entry.

Public Functions Documentation

function StaticEnodeBootnodeSource

explicit StaticEnodeBootnodeSource(
    std::vector< std::string > enode_uris,
    std::string name ="static-enode"
)

Construct with a pre-built list of enode URI strings.

Parameters:

  • enode_uris Vector of "enode://…" strings.
  • name Human-readable label for logging.

function fetch

virtual std::vector< std::string > fetch() const override

Return all bootstrap ENR URIs available from this source.

Return: Vector of URI strings. May be empty if no seeds are available.

Reimplements: discv5::IBootnodeSource::fetch

ENR URIs are preferred; the crawler will attempt to parse each one via EnrParser. Enode URIs are also accepted and will be converted to a minimal ValidatedPeer without an EnrRecord.

function name

virtual std::string name() const override

Human-readable name of this source, for logging.

Reimplements: discv5::IBootnodeSource::name


Updated on 2026-04-13 at 23:22:46 -0700