Skip to content

refactor: remove duplicate get_peer_count method#455

Open
xdustinface wants to merge 1 commit intov0.42-devfrom
chore/drop-unused-get-peer-count
Open

refactor: remove duplicate get_peer_count method#455
xdustinface wants to merge 1 commit intov0.42-devfrom
chore/drop-unused-get-peer-count

Conversation

@xdustinface
Copy link
Collaborator

@xdustinface xdustinface commented Feb 18, 2026

Identical to peer_count() and unused by any caller.

Based on:

Summary by CodeRabbit

  • Refactor
    • Removed a redundant method for retrieving peer count. Use the primary method instead to access the number of connected peers.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 18, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

Removed a redundant async helper method get_peer_count() from the DashSpvClient queries module. This duplicate method wrapped the existing peer_count() functionality without adding value. The public API now exposes only peer_count() for retrieving connected peer count.

Changes

Cohort / File(s) Summary
Duplicate Code Removal
dash-spv/src/client/queries.rs
Deleted redundant pub async fn get_peer_count() method that duplicated peer_count() functionality. No logic changes or control flow alterations.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A duplicate hops away,
Leaving one true path to stay,
Cleaner code, less clutter's sway,
Hopping toward a brighter day! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title 'refactor: remove duplicate get_peer_count method' directly and accurately describes the main change: removing a redundant async wrapper method.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/drop-unused-get-peer-count

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

Comment @coderabbitai help to get the list of available commands and usage tips.

Base automatically changed from refactor/clonable-client to v0.42-dev February 19, 2026 18:57
Identical to `peer_count()` and unused by any caller.
@xdustinface xdustinface force-pushed the chore/drop-unused-get-peer-count branch from 223b6f0 to 7d37870 Compare February 19, 2026 18:58
@xdustinface xdustinface marked this pull request as ready for review February 19, 2026 18:59
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

Comments