Skip to content

Commit

Permalink
Merge branch 'master' into add-policy-api
Browse files Browse the repository at this point in the history
  • Loading branch information
BitcoinZavior authored Nov 8, 2024
2 parents 2b8592e + 20eebc8 commit 269b301
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/test-swift.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions bdk-ffi/src/bdk.udl
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,9 @@ interface EsploraClient {

[Throws=EsploraError]
Transaction? get_tx(string txid);

[Throws=EsploraError]
u32 get_height();
};

// ------------------------------------------------------------------------
Expand Down
4 changes: 4 additions & 0 deletions bdk-ffi/src/esplora.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<u32, EsploraError> {
self.0.get_height().map_err(EsploraError::from)
}
}

0 comments on commit 269b301

Please sign in to comment.