From 8c71fb7dbace8cffd9f924dc1b591bff73f589ca Mon Sep 17 00:00:00 2001 From: Matthew Date: Mon, 4 Nov 2024 12:50:57 -0600 Subject: [PATCH 1/2] chore: ci test-swift from macos-12 to macos-13 --- .github/workflows/test-swift.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-swift.yaml b/.github/workflows/test-swift.yaml index 89174bbb..d2274221 100644 --- a/.github/workflows/test-swift.yaml +++ b/.github/workflows/test-swift.yaml @@ -13,7 +13,7 @@ on: jobs: build: name: "Build and test" - runs-on: macos-12 + runs-on: macos-13 steps: - name: "Checkout" uses: actions/checkout@v3 From 20eebc8569bbc28cf3f666b82da7a0666e55300e Mon Sep 17 00:00:00 2001 From: Matthew Date: Tue, 5 Nov 2024 21:17:08 -0600 Subject: [PATCH 2/2] feat: add get_height to esplora --- bdk-ffi/src/bdk.udl | 3 +++ bdk-ffi/src/esplora.rs | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/bdk-ffi/src/bdk.udl b/bdk-ffi/src/bdk.udl index 1c716777..12b87851 100644 --- a/bdk-ffi/src/bdk.udl +++ b/bdk-ffi/src/bdk.udl @@ -601,6 +601,9 @@ interface EsploraClient { [Throws=EsploraError] Transaction? get_tx(string txid); + + [Throws=EsploraError] + u32 get_height(); }; // ------------------------------------------------------------------------ diff --git a/bdk-ffi/src/esplora.rs b/bdk-ffi/src/esplora.rs index 934a9079..7708cdf7 100644 --- a/bdk-ffi/src/esplora.rs +++ b/bdk-ffi/src/esplora.rs @@ -89,4 +89,8 @@ impl EsploraClient { let tx_opt = self.0.get_tx(&txid)?; Ok(tx_opt.map(|inner| Arc::new(Transaction::from(inner)))) } + + pub fn get_height(&self) -> Result { + self.0.get_height().map_err(EsploraError::from) + } }