fix(dash-spv): replaced TARGET_PEERS with already existing max_peers config fields#827
fix(dash-spv): replaced TARGET_PEERS with already existing max_peers config fields#827ZocoLini wants to merge 1 commit into
Conversation
|
Warning Review limit reached
Next review available in: 8 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughRemoves the fixed Configurable peer limit
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #827 +/- ##
==========================================
+ Coverage 73.44% 73.49% +0.05%
==========================================
Files 324 324
Lines 72577 72583 +6
==========================================
+ Hits 53306 53348 +42
+ Misses 19271 19235 -36
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@dash-spv/src/network/pool.rs`:
- Around line 24-28: PeerPool::new currently allows max_peers to be zero, which
makes the pool permanently behave as full and breaks add_peer, needs_more_peers,
and can_accept_peers. Update the PeerPool::new constructor to enforce the
invariant that max_peers is at least 1, mirroring the clamping already done in
manager.rs, so callers of PeerPool::new cannot create an unusable pool.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 61770d09-2eec-422d-b7ed-1eb571ba9c76
📒 Files selected for processing (5)
dash-spv/src/network/constants.rsdash-spv/src/network/manager.rsdash-spv/src/network/pool.rsdash-spv/src/network/tests.rsdash-spv/tests/peer_test.rs
💤 Files with no reviewable changes (1)
- dash-spv/src/network/constants.rs
xdustinface
left a comment
There was a problem hiding this comment.
This makes the client connect to 8 peers by default.. it's a bit overkill and takes up more connections slots form the network than needed. I think we should target more like 3-4 peers generally for SPV clients.
Summary by CodeRabbit