From 6bbbfb1d99281fb334332174652fe326c43cb4e7 Mon Sep 17 00:00:00 2001 From: benthecarman Date: Tue, 9 Apr 2024 15:42:20 -0500 Subject: [PATCH] Use more relays --- src/main.rs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 83718d3..bb4734d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -46,6 +46,18 @@ const ALLOWED_LOCALHOST: &str = "http://127.0.0.1:"; const API_VERSION: &str = "v1"; +const RELAYS: [&str; 9] = [ + "wss://nostr.mutinywallet.com", + "wss://relay.mutinywallet.com", + "wss://relay.snort.social", + "wss://nos.lol", + "wss://relay.damus.io", + "wss://relay.primal.net", + "wss://nostr.wine", + "wss://nostr.zbd.gg", + "wss://relay.nos.social", +]; + #[derive(Debug, Clone, Copy, Hash, PartialEq, Eq)] pub struct SignerIdentity { pub service_id: i32, @@ -116,9 +128,7 @@ async fn main() -> anyhow::Result<()> { let nostr_nsec_str = std::env::var("NSEC").expect("NSEC must be set"); let nostr_sk = Keys::from_sk_str(&nostr_nsec_str).expect("Invalid NOSTR_SK"); let nostr = nostr_sdk::Client::new(&nostr_sk); - nostr.add_relay("wss://nostr.mutinywallet.com").await?; - nostr.add_relay("wss://relay.mutinywallet.com").await?; - nostr.add_relay("wss://relay.damus.io").await?; + nostr.add_relays(RELAYS).await.expect("Failed to add relays"); nostr.connect().await; // domain