Skip to main content

Module scoreboard

Module scoreboard 

Source
Expand description

Composite peer scoring system (PeerScoreboard)

Combines multiple weighted scoring components into a single composite score per peer, with configurable decay and tick-based aging.

§Example

use ipfrs_network::scoreboard::{PeerScoreboard, ScoreboardStats};

let mut board = PeerScoreboard::new(0.99);
board.register_component("latency", 2.0);
board.register_component("uptime", 1.0);
board.update_score("peer-a", "latency", 0.8);
board.update_score("peer-a", "uptime", 1.0);
assert!(board.get_score("peer-a").is_some());

Structs§

PeerScoreboard
Composite peer scoreboard.
SbPeerScore
Aggregated score entry for one peer.
ScoreComponent
A single scoring dimension for a peer.
ScoreboardStats
Summary statistics for the entire scoreboard.