Skip to content

Commit 6eb10aa

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 5d9d092 commit 6eb10aa

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
@@ -473,18 +473,7 @@ impl<S: StorageManager + Send + Sync + 'static, N: NetworkManager + Send + Sync
473473
self.chain_state.read().await.tip_height()
474474
);
475475

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

0 commit comments

Comments
 (0)