|
@@ -1,8 +1,8 @@
|
|
|
use futures::Future;
|
|
|
use nostr_rs_client::{Error as ClientError, Event, Pool};
|
|
|
use nostr_rs_rocksdb::RocksDb;
|
|
|
-use nostr_rs_types::{client::Subscribe, Request, Response};
|
|
|
use nostr_rs_storage_base::Storage;
|
|
|
+use nostr_rs_types::{client::Subscribe, Request, Response};
|
|
|
use std::pin::Pin;
|
|
|
use tokio::sync::mpsc;
|
|
|
|
|
@@ -29,17 +29,17 @@ fn on_connection(
|
|
|
async fn main() {
|
|
|
env_logger::init();
|
|
|
let mut clients = Pool::new()
|
|
|
- .connect_to("wss://relay.damus.io/", u16::MAX, Some(on_connection))
|
|
|
+ .connect_to("wss://relay.damus.io/", Some(on_connection))
|
|
|
.expect("valid url")
|
|
|
- .connect_to("wss://brb.io", u16::MAX, Some(on_connection))
|
|
|
+ .connect_to("wss://brb.io", Some(on_connection))
|
|
|
.expect("valid url")
|
|
|
- .connect_to("wss://nos.lol", u16::MAX, Some(on_connection))
|
|
|
+ .connect_to("wss://nos.lol", Some(on_connection))
|
|
|
.expect("valid url")
|
|
|
- .connect_to("wss://relay.current.fyi", u16::MAX, Some(on_connection))
|
|
|
+ .connect_to("wss://relay.current.fyi", Some(on_connection))
|
|
|
.expect("valid url")
|
|
|
- .connect_to("wss://eden.nostr.land", u16::MAX, Some(on_connection))
|
|
|
+ .connect_to("wss://eden.nostr.land", Some(on_connection))
|
|
|
.expect("valid url")
|
|
|
- .connect_to("wss://relay.snort.social", u16::MAX, Some(on_connection))
|
|
|
+ .connect_to("wss://relay.snort.social", Some(on_connection))
|
|
|
.expect("valid url");
|
|
|
|
|
|
clients.send(Subscribe::default().into()).await;
|
|
@@ -57,7 +57,6 @@ async fn main() {
|
|
|
Response::EndOfStoredEvents(_) => {}
|
|
|
msg => {
|
|
|
println!("{} {:?}", relayed_by, msg);
|
|
|
- clients.stop().await;
|
|
|
}
|
|
|
},
|
|
|
msg => {
|