Skip to content

Conversation

@Forostovec
Copy link
Contributor

This change fixes incorrect error handling in partsToBlock where a false ok result from PartSet.AddPartWithoutProof led to returning nil, err with err being nil, effectively masking failures such as duplicate or otherwise non-added parts. By returning a concrete error with context (part index) when ok is false, we ensure block reconstruction errors are surfaced to callers, aligning with CometBFT semantics that reserve non-nil err for validation failures and use ok=false for non-added cases (commonly duplicates). This prevents silent success, improves diagnosability, and maintains correct behavior in higher-level consumers like receiveBlockByHeight/receiveBlockByHash, Listener, and Exchange.

@github-actions github-actions bot added the external Issues created by non node team members label Oct 17, 2025
@Wondertan Wondertan enabled auto-merge October 17, 2025 10:05
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 35.16%. Comparing base (2469e7a) to head (4ccb973).
⚠️ Report is 596 commits behind head on main.

Files with missing lines Patch % Lines
core/fetcher.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4644      +/-   ##
==========================================
- Coverage   44.83%   35.16%   -9.67%     
==========================================
  Files         265      304      +39     
  Lines       14620    24307    +9687     
==========================================
+ Hits         6555     8548    +1993     
- Misses       7313    14798    +7485     
- Partials      752      961     +209     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external Issues created by non node team members

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants