From ddc4cef037c6146e3e4aea5b98d620c701ec6ba4 Mon Sep 17 00:00:00 2001 From: viraladmin <00purple@gmail.com> Date: Wed, 27 May 2026 10:19:59 -0600 Subject: [PATCH] fixed prphan correction status bug --- src/orphans/replay_errors.rs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/orphans/replay_errors.rs b/src/orphans/replay_errors.rs index d811eb1..402b1f4 100644 --- a/src/orphans/replay_errors.rs +++ b/src/orphans/replay_errors.rs @@ -1,17 +1,22 @@ pub fn should_retry_staged_candidate(error: &str) -> bool { - // These errors mean the torrent metadata may still describe the winning - // block, but this node could not fetch enough block data to prove it yet. - error.contains("No available peer could provide remaining pieces") + // Explicit "not found" responses mean connected peers cannot seed this + // candidate anymore. Keep retry behavior for local timing/concurrency + // conditions only. + if error.contains("No available peer could provide remaining pieces") || error.contains("piece not found") || error.contains("Requested candidate not found") || error.contains("Block not found") || (error.contains("Block ") && error.contains(" not found")) - || error.contains("Timed out waiting for piece") + || error.contains("Downloaded candidate length does not match torrent metadata") + { + return false; + } + + error.contains("Timed out waiting for piece") || error.contains("Timed out waiting for replacement torrent") || error.contains("No replacement torrent received") || error.contains("Piece reply channel closed") || error.contains("Replay waiting for block pieces") || error.contains("Candidate download already active") || error.contains("Timed out waiting for active candidate download") - || error.contains("Downloaded candidate length does not match torrent metadata") }