Skip to content

Commit

Permalink
Use previous completed checkpoint index for min interval check
Browse files Browse the repository at this point in the history
  • Loading branch information
keppel committed Feb 13, 2024
1 parent aa05e22 commit 1c3a43b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/bitcoin/signer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,9 @@ where
.await? as u64;
let last_signed_btc_height: Option<u64> = self
.client()
.query(|app: InnerApp| Ok(app.bitcoin.checkpoints.get(index)?.signed_at_btc_height))
.query(|app: InnerApp| {
Ok(app.bitcoin.checkpoints.get(index - 1)?.signed_at_btc_height)
})
.await?
.map(|v| v as u64);

Expand Down

0 comments on commit 1c3a43b

Please sign in to comment.