Sync and multi-client updates (#1044)

* Update finalized/head sync logic

* Correct sync logging

* Handle status during sync gracefully
This commit is contained in:
Age Manning
2020-04-23 19:01:29 +10:00
committed by GitHub
parent 6784a8b42a
commit 79cc9473c1
8 changed files with 146 additions and 90 deletions

View File

@@ -634,10 +634,7 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
) -> ProcessingResult {
batch.retries += 1;
// TODO: Handle partially downloaded batches. Update this when building a new batch
// processor thread.
if batch.retries > MAX_BATCH_RETRIES {
if batch.retries > MAX_BATCH_RETRIES || self.peer_pool.is_empty() {
// chain is unrecoverable, remove it
ProcessingResult::RemoveChain
} else {