Skip to content

Node

Public Functions

Name
Node(std::shared_ptr< boost::asio::io_context > io, std::shared_ptr< sgns::ipfs_lite::ipfs::graphsync::MerkleDagBridge > data_service, sgns::ipfs_lite::ipfs::graphsync::Graphsync::BlockCallback cb, size_t n_responses_expected, std::optional< libp2p::crypto::KeyPair > keyPair)
void stop()
auto getId() const
void listen(const libp2p::multi::Multiaddress & listen_to)
void makeRequest(const libp2p::peer::PeerId & peer, boost::optional< libp2p::multi::Multiaddress > address, const sgns::CID & root_cid)

Public Attributes

Name
size_t requests_sent
size_t responses_received

Public Functions Documentation

function Node

inline Node(
    std::shared_ptr< boost::asio::io_context > io,
    std::shared_ptr< sgns::ipfs_lite::ipfs::graphsync::MerkleDagBridge > data_service,
    sgns::ipfs_lite::ipfs::graphsync::Graphsync::BlockCallback cb,
    size_t n_responses_expected,
    std::optional< libp2p::crypto::KeyPair > keyPair
)

function stop

inline void stop()

function getId

inline auto getId() const

function listen

inline void listen(
    const libp2p::multi::Multiaddress & listen_to
)

function makeRequest

inline void makeRequest(
    const libp2p::peer::PeerId & peer,
    boost::optional< libp2p::multi::Multiaddress > address,
    const sgns::CID & root_cid
)

Public Attributes Documentation

variable requests_sent

static size_t requests_sent = 0;

variable responses_received

static size_t responses_received = 0;

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