Skip to content

Commit

Permalink
Add message on last block scan
Browse files Browse the repository at this point in the history
Current code breaks out of loop before final message is shown, this can be confusing as it may appear to be stuck.

Moved status message before break and added complete message before break.
  • Loading branch information
reqlez committed Mar 8, 2023
1 parent f97cf6c commit c95b59d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/src/oracle_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -448,11 +448,12 @@ pub fn register_and_save_scans(node_api: &NodeApi) -> std::result::Result<(), Er
loop {
let wallet_height = node_api.node.wallet_status()?.height;
let block_height = node_api.node.current_block_height()?;
println!("Scanned {}/{} blocks", wallet_height, block_height);
if wallet_height == block_height {
println!("Wallet Scan Complete!");
break;
}
std::thread::sleep(std::time::Duration::from_secs(1));
println!("Scanned {}/{} blocks", wallet_height, block_height);
}
Ok(())
}
Expand Down

0 comments on commit c95b59d

Please sign in to comment.