Skip to content

Fix relayer extract_peer_id unwrap and add bounds check in block filter processing - #286

Merged
quake merged 1 commit into
nervosnetwork:developfrom
eval-exec:fix/peer-relayer-and-index
Jun 28, 2026
Merged

Fix relayer extract_peer_id unwrap and add bounds check in block filter processing#286
quake merged 1 commit into
nervosnetwork:developfrom
eval-exec:fix/peer-relayer-and-index

Conversation

@eval-exec

Copy link
Copy Markdown
Contributor
  • Replace .unwrap() on extract_peer_id with let Some(...) else in relay protocol connected handler to avoid panic when peer address format is unexpected
  • Add bounds check before indexing into cached_block_filter_hashes in block filters processing

@eval-exec
eval-exec force-pushed the fix/peer-relayer-and-index branch 2 times, most recently from 86af34a to 0d3ffb5 Compare June 28, 2026 07:16
@eval-exec
eval-exec force-pushed the fix/peer-relayer-and-index branch from 0d3ffb5 to b33db72 Compare June 28, 2026 07:17
@eval-exec

Copy link
Copy Markdown
Contributor Author

Invite @quake to review.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.43%. Comparing base (58c0ce7) to head (b33db72).

Files with missing lines Patch % Lines
...otocols/filter/components/block_filters_process.rs 0.00% 5 Missing ⚠️
light-client-lib/src/protocols/relayer.rs 0.00% 2 Missing ⚠️

❌ Your patch status has failed because the patch coverage (0.00%) is below the target coverage (60.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #286      +/-   ##
===========================================
- Coverage    72.49%   72.43%   -0.06%     
===========================================
  Files           32       32              
  Lines         6674     6679       +5     
===========================================
  Hits          4838     4838              
- Misses        1836     1841       +5     
Flag Coverage Δ
unittests 72.43% <0.00%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@quake
quake merged commit 473da0b into nervosnetwork:develop Jun 28, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants