Просмотр исходного кода

darkfid/task/sync: skip peer on response hash mismatch

lofanator 1 неделя назад
Родитель
Сommit
72e7cd79a9
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      bin/darkfid/src/task/sync.rs

+ 1 - 1
bin/darkfid/src/task/sync.rs

@@ -561,7 +561,7 @@ async fn retrieve_blocks(
                 if block.hash() != headers_hashes[i] {
                     debug!(target: "darkfid::task::sync::retrieve_blocks", "Invalid header in `SyncResponse` from peer: {peer:?}");
                     *failed = true;
-                    continue
+                    continue 'peers_loop
                 }
             }