|
@@ -1,7 +1,5 @@
|
|
|
use futures::Future;
|
|
|
use nostr_rs_client::{Error as ClientError, Event, Pool};
|
|
|
-use nostr_rs_rocksdb::RocksDb;
|
|
|
-use nostr_rs_storage_base::Storage;
|
|
|
use nostr_rs_types::{client::Subscribe, Request, Response};
|
|
|
use std::pin::Pin;
|
|
|
use tokio::sync::mpsc;
|
|
@@ -43,7 +41,6 @@ async fn main() {
|
|
|
.expect("valid url");
|
|
|
|
|
|
clients.send(Subscribe::default().into()).await;
|
|
|
- let db = RocksDb::new("./db").expect("db");
|
|
|
|
|
|
loop {
|
|
|
if let Some((msg, relayed_by)) = clients.recv().await {
|
|
@@ -51,8 +48,6 @@ async fn main() {
|
|
|
Event::Response(r) => match *r {
|
|
|
Response::Event(x) => {
|
|
|
println!("{} => {:?}", relayed_by, x);
|
|
|
- let event = x.event;
|
|
|
- db.store(&event).expect("valid");
|
|
|
}
|
|
|
Response::EndOfStoredEvents(_) => {}
|
|
|
msg => {
|