Skip to main content

selection_weight

Function selection_weight 

Source
fn selection_weight(
    pwc: &PathWithMetrics,
    hops: usize,
    params: WeightingParams,
) -> f64
Expand description

The weight a candidate is drawn by, as the walk valued it, tempered to spread the draws over relayers (see PathPlannerConfig::return_path_weight_temper), relayer health included.

Forward and return paths alike: an untempered forward draw put most of a session’s packets on its single best path, and with the candidate prune diversifying first relayers only, on one middle relayer, whose death then took the whole forward direction with it (see selector::MIDDLE_HOP_SHARE).