Repository navigation
fix(dash-spv): replaced TARGET_PEERS with already existing max_peers config fields - #827
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (5)
📝 WalkthroughWalkthroughReplaces the fixed peer-limit constant with per-instance ChangesConfigurable peer limit
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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.40% -0.05%
==========================================
Files 324 324
Lines 72577 72583 +6
==========================================
- Hits 53306 53277 -29
- Misses 19271 19306 +35
|
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
9f14e05 to
bc68e0e
Compare
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.
|
done |
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/client/config.rs`:
- Line 89: ClientConfig::default() currently changed max_peers to 3, which
conflicts with the existing expected default of 8 in the config tests and
surrounding network assumptions. Update the default back in
ClientConfig::default if 8 is the intended behavior; otherwise, keep 3 and make
sure all affected tests, docs, and any code that relies on the default peer
capacity are updated consistently.
🪄 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: 96a2eb97-1572-4675-bfee-c97656143acf
📒 Files selected for processing (6)
dash-spv/src/client/config.rsdash-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
🚧 Files skipped from review as they are similar to previous changes (4)
- dash-spv/tests/peer_test.rs
- dash-spv/src/network/tests.rs
- dash-spv/src/network/manager.rs
- dash-spv/src/network/pool.rs
Summary by CodeRabbit