Skip to content

Commit

Permalink
fix: only consider target block if relevant
Browse files Browse the repository at this point in the history
  • Loading branch information
lgalabru committed Jul 26, 2021
1 parent d2cdefb commit 7d7479b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/burnchains/burnchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1213,7 +1213,10 @@ impl Burnchain {
);

if let Some(target_block_height) = target_block_height_opt {
if target_block_height < end_block {
// target_block_height is used as a hint, but could also be completely off
// in certain situations. The current function is directly reading the
// headers and syncing with the bitcoin-node.
if target_block_height > start_block && target_block_height < end_block {
debug!(
"Will download up to max burn block height {}",
target_block_height
Expand Down

0 comments on commit 7d7479b

Please sign in to comment.