From b9a6ee04033c9f4fea4857473363ffcd3e73b880 Mon Sep 17 00:00:00 2001 From: zhiqiangxu <652732310@qq.com> Date: Wed, 6 Dec 2023 13:22:18 +0800 Subject: [PATCH] avoid unnecessary call to is_synced --- .../subspace-farmer/src/single_disk_farm/plotting.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/subspace-farmer/src/single_disk_farm/plotting.rs b/crates/subspace-farmer/src/single_disk_farm/plotting.rs index 556ebc97e3..5d0f0c9b69 100644 --- a/crates/subspace-farmer/src/single_disk_farm/plotting.rs +++ b/crates/subspace-farmer/src/single_disk_farm/plotting.rs @@ -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