From 52c370e6472176b6ef4ad65b57991f827b899b53 Mon Sep 17 00:00:00 2001 From: bc1cindy Date: Wed, 4 Mar 2026 10:12:36 -0300 Subject: [PATCH] Add OHTTP relay selection docs to module level Closes #1328 --- payjoin-cli/src/app/v2/ohttp.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/payjoin-cli/src/app/v2/ohttp.rs b/payjoin-cli/src/app/v2/ohttp.rs index eecf85cf3..86c38d550 100644 --- a/payjoin-cli/src/app/v2/ohttp.rs +++ b/payjoin-cli/src/app/v2/ohttp.rs @@ -1,3 +1,12 @@ +//! OHTTP relay selection and key bootstrapping for the payjoin-cli. +//! +//! [`RelayManager`] tracks the currently selected relay and any relays that +//! have failed, excluding them from future selections for the lifetime of +//! the [`RelayManager`]. +//! +//! `fetch_ohttp_keys` selects a relay at random from the configured list, +//! excluding relays that [`RelayManager`] has marked as failed, +//! to avoid a fixed contact pattern at the network layer. use std::sync::{Arc, Mutex}; use anyhow::{anyhow, Result};