.
Some checks failed
Rust / build (ubuntu-latest, stable) (push) Failing after 1m30s
Rust / build (ubuntu-latest, stable) (pull_request) Failing after 1m15s
Some checks failed
Rust / build (ubuntu-latest, stable) (push) Failing after 1m30s
Rust / build (ubuntu-latest, stable) (pull_request) Failing after 1m15s
This commit is contained in:
@@ -6,9 +6,8 @@ use std::time::Duration;
|
||||
use anyhow::{anyhow, Context as AnyhowContext, Error};
|
||||
use common::{config_dir, CLIENT_NAME};
|
||||
use gpui::{App, AppContext, Context, Entity, Global, Subscription, Task};
|
||||
use gpui_tokio::Tokio;
|
||||
use nostr_connect::prelude::*;
|
||||
use nostr_gossip_sqlite::prelude::*;
|
||||
use nostr_gossip_memory::prelude::*;
|
||||
use nostr_lmdb::NostrLmdb;
|
||||
use nostr_sdk::prelude::*;
|
||||
|
||||
@@ -125,20 +124,6 @@ impl NostrRegistry {
|
||||
.expect("Failed to initialize database")
|
||||
});
|
||||
|
||||
// Use tokio to spawn a task to build the gossip instance
|
||||
let build_gossip_sqlite = Tokio::spawn(cx, async move {
|
||||
NostrGossipSqlite::open(config_dir().join("gossip"))
|
||||
.await
|
||||
.expect("Failed to initialize gossip")
|
||||
});
|
||||
|
||||
// Initialize the nostr gossip instance
|
||||
let gossip = cx.foreground_executor().block_on(async move {
|
||||
build_gossip_sqlite
|
||||
.await
|
||||
.expect("Failed to initialize gossip")
|
||||
});
|
||||
|
||||
// Construct the nostr signer
|
||||
let app_keys = Self::create_or_init_app_keys().unwrap_or(Keys::generate());
|
||||
let signer = Arc::new(CoopSigner::new(app_keys.clone()));
|
||||
@@ -150,7 +135,7 @@ impl NostrRegistry {
|
||||
// Construct the nostr client
|
||||
let client = ClientBuilder::default()
|
||||
.signer(signer.clone())
|
||||
.gossip(gossip)
|
||||
.gossip(NostrGossipMemory::unbounded())
|
||||
.database(lmdb)
|
||||
.automatic_authentication(false)
|
||||
.verify_subscriptions(false)
|
||||
|
||||
Reference in New Issue
Block a user