From: Matt Corallo Date: Wed, 5 Jun 2024 14:41:03 +0000 (+0000) Subject: Minimal updates to `lightning-transaction-sync` for bindings X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=9301a0d758bf3fdcabc15ee27273b1e365bb89f0;p=rust-lightning Minimal updates to `lightning-transaction-sync` for bindings Bindings don't accept dyn traits, but instead map any traits to a single dynamic struct. Thus, we can always take a specific trait to accept any implementation, which we do here. --- diff --git a/lightning-transaction-sync/src/electrum.rs b/lightning-transaction-sync/src/electrum.rs index 015cb42c6..2fb54a266 100644 --- a/lightning-transaction-sync/src/electrum.rs +++ b/lightning-transaction-sync/src/electrum.rs @@ -1,3 +1,5 @@ +//! Chain sync using the electrum protocol + use crate::common::{ConfirmedTx, FilterQueue, SyncState}; use crate::error::{InternalError, TxSyncError}; diff --git a/lightning-transaction-sync/src/error.rs b/lightning-transaction-sync/src/error.rs index be59cb026..bdfe17ecc 100644 --- a/lightning-transaction-sync/src/error.rs +++ b/lightning-transaction-sync/src/error.rs @@ -1,3 +1,5 @@ +//! Common error types + use std::fmt; #[derive(Debug)] diff --git a/lightning-transaction-sync/src/esplora.rs b/lightning-transaction-sync/src/esplora.rs index 564d7f177..e2eb9673d 100644 --- a/lightning-transaction-sync/src/esplora.rs +++ b/lightning-transaction-sync/src/esplora.rs @@ -1,3 +1,5 @@ +//! Chain sync using the Esplora API + use crate::common::{ConfirmedTx, FilterQueue, SyncState}; use crate::error::{InternalError, TxSyncError}; diff --git a/lightning-transaction-sync/src/lib.rs b/lightning-transaction-sync/src/lib.rs index 96e0c0dfe..164c96834 100644 --- a/lightning-transaction-sync/src/lib.rs +++ b/lightning-transaction-sync/src/lib.rs @@ -69,15 +69,15 @@ extern crate bdk_macros; #[cfg(any(feature = "esplora-blocking", feature = "esplora-async"))] -mod esplora; +pub mod esplora; #[cfg(any(feature = "electrum"))] -mod electrum; +pub mod electrum; #[cfg(any(feature = "esplora-blocking", feature = "esplora-async", feature = "electrum"))] mod common; #[cfg(any(feature = "esplora-blocking", feature = "esplora-async", feature = "electrum"))] -mod error; +pub mod error; #[cfg(any(feature = "esplora-blocking", feature = "esplora-async", feature = "electrum"))] pub use error::TxSyncError;