Skip to content

test(dash-spv): compare the SlowPeer address in a test - #1363

Merged
ZocoLini merged 1 commit into
devfrom
fix/spv-underserving-peer-test
Nov 7, 2026
Merged

ZocoLini merged 1 commit into
devfrom
fix/spv-underserving-peer-test

Conversation

@ZocoLini

@ZocoLini ZocoLini commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

Dev no longer builds the dash-spv tests. #1334 made underserving_peer return a SlowPeer instead of a SocketAddr, and the test #1333 added still compared the result to a peer address. Each PR passed on its own, so the break only showed after both were merged.

This compares against SlowPeer::addr.

@coderabbitai

coderabbitai Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The only_bandwidth_bound_service_condemns_a_peer test now compares a peer’s address with the address in the SlowPeer result returned by underserving_peer.

Changes: Slow-peer test

Layer / File(s) Summary
Slow-peer address assertion
dash-spv/src/network/manager.rs
The test compares each peer’s address with the address in the returned SlowPeer.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Possibly related PRs

Suggested reviewers: xdustinface

Merge Risk: Minimal · up to 2840f

The change corrects a test assertion without changing production behavior. No merge-blocking risk was identified.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly describes the test change to compare the SlowPeer address.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 1 files.

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between d3d1e4f and 2840f67.

Files selected for processing: 1

  • dash-spv/src/network/manager.rs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Waiting for bot review — coderabbitai not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@github-actions github-actions Bot added the waiting-bots Waiting for the review bots to report on this head label Nov 7, 2026
@ZocoLini

ZocoLini commented Nov 7, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai approve

#1334 made `underserving_peer` return a `SlowPeer` instead of a `SocketAddr`, and the test #1333 added still compared the result to a peer address, so dev fails to build its tests.
@ZocoLini
ZocoLini force-pushed the fix/spv-underserving-peer-test branch from 2840f67 to 289888f Compare November 7, 2026 14:53
@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Waiting for bot review — coderabbitai not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@coderabbitai

coderabbitai Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor
Action performed

Comments resolved and changes approved.

@ZocoLini

ZocoLini commented Nov 7, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai approve

@ZocoLini
ZocoLini merged commit a51eefc into dev Nov 7, 2026
33 of 35 checks passed
@coderabbitai

coderabbitai Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor
Action performed

Comments resolved. CodeRabbit has already approved this PR, so no new approval was submitted.

@ZocoLini
ZocoLini deleted the fix/spv-underserving-peer-test branch November 7, 2026 14:54
@github-actions github-actions Bot removed the waiting-bots Waiting for the review bots to report on this head label Nov 7, 2026
@codecov

codecov Bot commented Nov 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.32%. Comparing base (d3d1e4f) to head (289888f).
⚠️ Report is 2 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1363      +/-   ##
==========================================
+ Coverage   80.87%   85.32%   +4.45%     
==========================================
  Files         171      268      +97     
  Lines       45774    68815   +23041     
==========================================
+ Hits        37018    58718   +21700     
- Misses       8756    10097    +1341     
Flag Coverage Δ
core 82.42% <ø> (ø)
rpc 52.10% <ø> (ø)
spv 94.17% <100.00%> (?)
wallet 83.39% <ø> (ø)
Files with missing lines Coverage Δ
dash-spv/src/network/manager.rs 89.61% <100.00%> (ø)

... and 96 files with indirect coverage changes

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.

1 participant