X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Flookup.rs;h=696b4d041ab508b53c7074884a63b89047d4957a;hb=c928246bdd0381085311268fbc0840c7496a2352;hp=eb0c8eed688bf7dc0690387a6a35d70795c3b32d;hpb=0ac9345665cb465a3ba33acf513969b16babdd72;p=rapid-gossip-sync-server diff --git a/src/lookup.rs b/src/lookup.rs index eb0c8ee..696b4d0 100644 --- a/src/lookup.rs +++ b/src/lookup.rs @@ -7,8 +7,7 @@ use std::time::{Instant, SystemTime, UNIX_EPOCH}; use lightning::ln::msgs::{ChannelAnnouncement, ChannelUpdate, UnsignedChannelAnnouncement, UnsignedChannelUpdate}; use lightning::routing::gossip::NetworkGraph; use lightning::util::ser::Readable; -use tokio_postgres::{Client, Connection, NoTls, Socket}; -use tokio_postgres::tls::NoTlsStream; +use tokio_postgres::Client; use futures::StreamExt; use lightning::log_info; @@ -68,11 +67,6 @@ impl Default for DirectedUpdateDelta { } } -pub(super) async fn connect_to_db() -> (Client, Connection) { - let connection_config = config::db_connection_config(); - connection_config.connect(NoTls).await.unwrap() -} - /// Fetch all the channel announcements that are presently in the network graph, regardless of /// whether they had been seen before. /// Also include all announcements for which the first update was announced