Skip to content

Commit

Permalink
chore: cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
lgalabru committed Jul 20, 2021
1 parent 06d13f8 commit 9c7c2e8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/burnchains/burnchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use std::sync::{
Arc,
};
use std::thread;
use std::time::{Instant, Duration};
use std::time::{Duration, Instant};

use crate::types::chainstate::StacksAddress;
use crate::types::proof::TrieHash;
Expand Down Expand Up @@ -1190,9 +1190,7 @@ impl Burnchain {
// is on a smaller fork than the one we just
// invalidated. Wait for more blocks.
while end_block < db_height {
let end_height = target_block_height_opt
.unwrap_or(0)
.max(db_height);
let end_height = target_block_height_opt.unwrap_or(0).max(db_height);
info!("Burnchain reorg happened at height {} invalidating chain tip {} but only {} headers presents on canonical chain. Retry in 1s", sync_height, db_height, end_block);
thread::sleep(Duration::from_millis(1000));
end_block = indexer.sync_headers(sync_height, Some(end_height))?;
Expand Down

0 comments on commit 9c7c2e8

Please sign in to comment.