mod.rs

Overview

This file serves as a module aggregator and re-exporter for two submodules: gossip and blockchain. It provides a centralized interface to expose key functionalities and types from these submodules, facilitating convenient imports elsewhere in the codebase. Additionally, it conditionally includes a tests submodule for unit testing purposes.

Modules and Re-exports

Submodules

Re-exported Entities

The file exposes the following items from its submodules for external use:

Re-exported Item

Source Module

Description

watch_blockchain

blockchain

Function to watch and respond to blockchain events.

AccountProvider

blockchain

Trait or struct providing account-related blockchain data.

BkSetProvider

blockchain

Provider interface for blockchain sets or snapshots.

NodeDb

blockchain

Abstraction over the node's database used in blockchain operations.

sign_gossip_node

gossip

Function to cryptographically sign gossip node messages.

watch_gossip

gossip

Function to monitor gossip network events.

GossipPeer

gossip

Represents a peer in the gossip network.

SubscribeStrategy

gossip

Enum or struct defining strategies for gossip subscription.

WatchGossipConfig

gossip

Configuration parameters for watching gossip events.

Important Implementation Details

Interaction with Other Parts of the Application

Mermaid Diagram: Module Structure and Relationships

flowchart TD
mod_rs["mod.rs"]
blockchain["blockchain"]
gossip["gossip"]
tests["tests (conditional)"]
mod_rs --> blockchain
mod_rs --> gossip
mod_rs --- tests
blockchain --> watch_blockchain["watch_blockchain"]
blockchain --> AccountProvider["AccountProvider"]
blockchain --> BkSetProvider["BkSetProvider"]
blockchain --> NodeDb["NodeDb"]
gossip --> sign_gossip_node["sign_gossip_node"]
gossip --> watch_gossip["watch_gossip"]
gossip --> GossipPeer["GossipPeer"]
gossip --> SubscribeStrategy["SubscribeStrategy"]
gossip --> WatchGossipConfig["WatchGossipConfig"]

The diagram illustrates the high-level structure of this file showing its submodules, the conditional inclusion of the test module, and the key functions and types it re-exports from blockchain and gossip.