fix: the restart of state sync doesn't work sometimes (#2687)

This commit is contained in:
Gary Yu 2019-03-19 01:44:51 +08:00 committed by Ignotus Peverell
parent dc59f67c7b
commit 52b5dc0e8d

View file

@ -113,7 +113,7 @@ impl StateSync {
}
// run fast sync if applicable, normally only run one-time, except restart in error
if header_head.height == highest_height {
if sync_need_restart || header_head.height == highest_height {
let (go, download_timeout) = self.state_sync_due();
if let SyncStatus::TxHashsetDownload { .. } = self.sync_state.status() {