Skip to content

Commit

Permalink
Update LibWallet recovery task event handling
Browse files Browse the repository at this point in the history
The recovery task broke out of its monitoring loop before getting the `UtxoScannerEvent::Completed` event. This PR just moves that break statement so that the final completed callback is made.

Also Ignore `test_store_and_forward_send_tx` due to it being flakey on CI and the functionality is covered by Cucumber tests.
  • Loading branch information
philipr-za committed Jul 28, 2021
1 parent 08f2675 commit 263e87f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 2 additions & 0 deletions base_layer/wallet/tests/wallet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,8 @@ fn test_20_store_and_forward_send_tx() {
}

#[test]
#[ignore = "Flakey on CI, theory is that it is due to SAF neighbourhoods. Retry after Kademlia style neighbourhoods \
are included"]
fn test_store_and_forward_send_tx() {
let mut shutdown_a = Shutdown::new();
let mut shutdown_b = Shutdown::new();
Expand Down
5 changes: 1 addition & 4 deletions base_layer/wallet_ffi/src/tasks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,6 @@ pub async fn recovery_event_monitoring(
(recovery_progress_callback)(RecoveryEvent::Progress as u8, current, total);
}
info!(target: LOG_TARGET, "Recovery progress: {}/{}", current, total);
if current == total {
info!(target: LOG_TARGET, "Recovery complete: {}/{}", current, total);
break;
}
},
Ok(UtxoScannerEvent::Completed {
number_scanned: num_scanned,
Expand All @@ -118,6 +114,7 @@ pub async fn recovery_event_monitoring(
unsafe {
(recovery_progress_callback)(RecoveryEvent::Completed as u8, num_scanned, u64::from(total_amount));
}
break;
},
Ok(UtxoScannerEvent::ScanningRoundFailed {
num_retries,
Expand Down

0 comments on commit 263e87f

Please sign in to comment.