From cd9a2458c74260f0d39520c766660f58714cdd23 Mon Sep 17 00:00:00 2001 From: stickz Date: Sun, 15 Sep 2024 10:54:26 -0400 Subject: [PATCH] Revert "libtorrent: Mark invalid chunks for redownload" This reverts commit 19f8d483f0de54f4111752d0abd68480ce3da896. --- libtorrent/src/torrent/data/file_list.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libtorrent/src/torrent/data/file_list.cc b/libtorrent/src/torrent/data/file_list.cc index ada0a156..7f895fd9 100644 --- a/libtorrent/src/torrent/data/file_list.cc +++ b/libtorrent/src/torrent/data/file_list.cc @@ -661,10 +661,7 @@ FileList::create_chunk_index(uint32_t index, int prot) { void FileList::mark_completed(uint32_t index) { if (index >= size_chunks() || completed_chunks() >= size_chunks()) - { - LT_LOG_FL(ERROR, "FileList::mark_completed(...) received an invalid index: %s", data()->hash()); - return; - } + throw internal_error("FileList::mark_completed(...) received an invalid index.", data()->hash()); if (bitfield()->empty()) throw internal_error("FileList::mark_completed(...) bitfield is empty.", data()->hash());