Skip to content

Commit f181098

Browse files
refactor(headers2): Remove speculative genesis decompression comment
The defensive fallback mechanism (headers2_failed flag) is kept, but the speculative comment about genesis compression state issues is removed. With the C++ compatibility fix, this scenario should not occur. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent e3bc216 commit f181098

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

dash-spv/src/sync/headers/manager.rs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -475,18 +475,7 @@ impl<S: StorageManager + Send + Sync + 'static, N: NetworkManager + Send + Sync
475475
self.chain_state.read().await.tip_height()
476476
);
477477

478-
// If we failed due to missing previous header, and we're at genesis,
479-
// this might be a protocol issue where peer expects us to have genesis in compression state
480-
if matches!(e, crate::sync::headers2::ProcessError::DecompressionError(0, _))
481-
&& self.chain_state.read().await.tip_height() == 0
482-
{
483-
tracing::warn!(
484-
"Headers2 decompression failed at genesis. Peer may be sending compressed headers that reference genesis. Consider falling back to regular headers."
485-
);
486-
}
487-
488-
// Return a specific error that can trigger fallback
489-
// Mark that headers2 failed for this sync session
478+
// Mark that headers2 failed for this sync session to trigger fallback to regular headers
490479
self.headers2_failed = true;
491480
return Err(SyncError::Headers2DecompressionFailed(format!(
492481
"Failed to decompress headers: {}",

0 commit comments

Comments
 (0)