Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ env:
BITCOIND_PASS: dlcdevkit
ESPLORA_HOST: http://localhost:30000
RPC_WALLET: ddk
NB_CONFIRMATIONS: 6

jobs:
clippy:
Expand Down
6 changes: 4 additions & 2 deletions ddk/src/chain/esplora.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,12 @@ impl ddk_manager::Blockchain for EsploraClient {
.get_height()
.await
.map_err(esplora_err_to_manager_err)?;

if txn.confirmed {
match txn.block_height {
Some(height) => Ok(tip_height - height),
Some(height) => Ok(tip_height
.checked_sub(height)
.map(|diff| diff + 1)
.unwrap_or(0)),
None => Ok(0),
}
} else {
Expand Down
Loading