Skip to content

Commit

Permalink
Merge pull request #2292 from zhiqiangxu/avoid_unnecessary_is_synced
Browse files Browse the repository at this point in the history
chore: avoid unnecessary call to `is_synced`
  • Loading branch information
nazar-pc authored Dec 6, 2023
2 parents 486b56f + b9a6ee0 commit 25e9cc4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions crates/subspace-farmer/src/single_disk_farm/plotting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -553,14 +553,14 @@ where
info!("Node is not synced yet, pausing plotting until sync status changes");

loop {
if node_sync_status.is_synced() {
info!("Node is synced, resuming plotting");
continue 'outer;
}

match node_sync_status_change_notifications.next().await {
Some(new_node_sync_status) => {
node_sync_status = new_node_sync_status;

if node_sync_status.is_synced() {
info!("Node is synced, resuming plotting");
continue 'outer;
}
}
None => {
// Subscription ended, nothing left to do
Expand Down

0 comments on commit 25e9cc4

Please sign in to comment.