Skip to content

Commit 3d1681b

Browse files
authored
Ensure random relay selection with fixed ohttp-keys config (#1390)
2 parents 5b8907e + 6097008 commit 3d1681b

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

payjoin-cli/src/app/v2/ohttp.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,8 @@ pub(crate) async fn unwrap_ohttp_keys_or_else_fetch(
3434
) -> Result<ValidatedOhttpKeys> {
3535
if let Some(ohttp_keys) = config.v2()?.ohttp_keys.clone() {
3636
println!("Using OHTTP Keys from config");
37-
return Ok(ValidatedOhttpKeys {
38-
ohttp_keys,
39-
relay_url: config.v2()?.ohttp_relays[0].clone(),
40-
});
37+
let validated = fetch_ohttp_keys(config, directory, relay_manager).await?;
38+
Ok(ValidatedOhttpKeys { ohttp_keys, relay_url: validated.relay_url })
4139
} else {
4240
println!("Bootstrapping private network transport over Oblivious HTTP");
4341
let fetched_keys = fetch_ohttp_keys(config, directory, relay_manager).await?;

0 commit comments

Comments
 (0)