X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fverifier.rs;h=872a5010c8955b17a1f6114ab9c63ea57f8ad079;hb=cf326fd7a9f42c58a24788943745f066ecb5f641;hp=a88f2b701257ff998ffdfc09da983421d2f157c1;hpb=2cf9129a187a66cfed10f9583c14fc8ee7339a18;p=rapid-gossip-sync-server diff --git a/src/verifier.rs b/src/verifier.rs index a88f2b7..872a501 100644 --- a/src/verifier.rs +++ b/src/verifier.rs @@ -1,4 +1,5 @@ use std::convert::TryInto; +use std::ops::Deref; use std::sync::Arc; use std::sync::Mutex; @@ -15,17 +16,17 @@ use lightning_block_sync::rest::RestClient; use crate::config; use crate::types::GossipPeerManager; -pub(crate) struct ChainVerifier { +pub(crate) struct ChainVerifier where L::Target: Logger { rest_client: Arc, - graph: Arc>>, - outbound_gossiper: Arc>>, Arc, Arc>>, + graph: Arc>, + outbound_gossiper: Arc>, Arc, L>>, peer_handler: Mutex>>, } struct RestBinaryResponse(Vec); -impl ChainVerifier { - pub(crate) fn new(graph: Arc>>, outbound_gossiper: Arc>>, Arc, Arc>>) -> Self { +impl ChainVerifier where L::Target: Logger { + pub(crate) fn new(graph: Arc>, outbound_gossiper: Arc>, Arc, L>>) -> Self { ChainVerifier { rest_client: Arc::new(RestClient::new(config::bitcoin_rest_endpoint()).unwrap()), outbound_gossiper, @@ -73,7 +74,7 @@ impl ChainVerifier { } } -impl UtxoLookup for ChainVerifier { +impl UtxoLookup for ChainVerifier where L::Target: Logger { fn get_utxo(&self, _genesis_hash: &BlockHash, short_channel_id: u64) -> UtxoResult { let res = UtxoFuture::new(); let fut = res.clone();