From 99ae425cad6f509abb7dc631f62f4f34735e3dc1 Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Sat, 21 Sep 2024 14:21:39 +0900 Subject: [PATCH] Update `lightning-transaction-sync` to use macros crate --- lightning-transaction-sync/Cargo.toml | 2 +- lightning-transaction-sync/src/esplora.rs | 2 ++ lightning-transaction-sync/src/lib.rs | 4 ---- lightning-transaction-sync/tests/integration_tests.rs | 3 ++- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lightning-transaction-sync/Cargo.toml b/lightning-transaction-sync/Cargo.toml index 34105ea3e..34ddfec6f 100644 --- a/lightning-transaction-sync/Cargo.toml +++ b/lightning-transaction-sync/Cargo.toml @@ -24,8 +24,8 @@ async-interface = [] [dependencies] lightning = { version = "0.0.124", path = "../lightning", default-features = false, features = ["std"] } +lightning-macros = { version = "0.1", path = "../lightning-macros", default-features = false } bitcoin = { version = "0.32.2", default-features = false } -bdk-macros = "0.6" futures = { version = "0.3", optional = true } esplora-client = { version = "0.9", default-features = false, optional = true } electrum-client = { version = "0.21.0", optional = true } diff --git a/lightning-transaction-sync/src/esplora.rs b/lightning-transaction-sync/src/esplora.rs index 8b8b39cfb..a191260bc 100644 --- a/lightning-transaction-sync/src/esplora.rs +++ b/lightning-transaction-sync/src/esplora.rs @@ -13,6 +13,8 @@ use lightning::chain::{Confirm, Filter}; use lightning::util::logger::Logger; use lightning::{log_debug, log_error, log_trace}; +use lightning_macros::{maybe_async, maybe_await}; + use bitcoin::{BlockHash, Script, Txid}; #[cfg(not(feature = "async-interface"))] diff --git a/lightning-transaction-sync/src/lib.rs b/lightning-transaction-sync/src/lib.rs index 9c6831cef..19ebe007e 100644 --- a/lightning-transaction-sync/src/lib.rs +++ b/lightning-transaction-sync/src/lib.rs @@ -71,10 +71,6 @@ #![deny(unsafe_code)] #![cfg_attr(docsrs, feature(doc_auto_cfg))] -#[cfg(any(feature = "esplora-blocking", feature = "esplora-async"))] -#[macro_use] -extern crate bdk_macros; - #[cfg(any(feature = "esplora-blocking", feature = "esplora-async"))] mod esplora; diff --git a/lightning-transaction-sync/tests/integration_tests.rs b/lightning-transaction-sync/tests/integration_tests.rs index c887b2be0..0a6f40b09 100644 --- a/lightning-transaction-sync/tests/integration_tests.rs +++ b/lightning-transaction-sync/tests/integration_tests.rs @@ -11,7 +11,8 @@ use lightning_transaction_sync::ElectrumSyncClient; #[cfg(any(feature = "esplora-blocking", feature = "esplora-async"))] use lightning_transaction_sync::EsploraSyncClient; -use bdk_macros::maybe_await; +use lightning_macros::maybe_await; + use bitcoin::block::Header; use bitcoin::constants::genesis_block; use bitcoin::network::Network; -- 2.39.5