Resetting last shard syncing flags when sync is abandoned.

This commit is contained in:
Savinda Senevirathne
2021-03-12 17:31:57 +05:30
parent b6a69e5824
commit af4c9df9dc
2 changed files with 8 additions and 0 deletions

View File

@@ -157,4 +157,11 @@ namespace ledger
candidate_hpfs_responses.splice(candidate_hpfs_responses.end(), p2p::ctx.collected_msgs.ledger_hpfs_responses);
}
void ledger_sync::on_sync_abandoned()
{
// Reset these flags since we are abandoning the sync.
is_last_primary_shard_syncing = false;
is_last_blob_shard_syncing = false;
}
} // namespace ledger

View File

@@ -13,6 +13,7 @@ namespace ledger
private:
void swap_collected_responses();
void on_current_sync_state_acheived(const hpfs::sync_target &synced_target);
void on_sync_abandoned();
public:
std::atomic<bool> is_last_primary_shard_syncing = false;