Skip to content

Conversation

@xdustinface
Copy link
Collaborator

@xdustinface xdustinface commented Jan 29, 2026

It wont be used after the sync rewrite and dropping it now first removes some clutter.

Summary by CodeRabbit

  • Refactor

    • Removed SPV statistics retrieval API and related monitoring functionality.
    • Simplified internal statistics tracking by removing the dedicated statistics data structure.
  • Bug Fixes

    • Eliminated stats-related null pointer and memory management edge cases.
  • Tests

    • Removed statistics-related test coverage.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 29, 2026

📝 Walkthrough

Walkthrough

This pull request removes SPV statistics tracking functionality from the dash-spv and dash-spv-ffi libraries. The SpvStats struct, its FFI representation (FFISpvStats), associated client methods, and all related stats retrieval and management code are deleted across the codebase.

Changes

Cohort / File(s) Summary
Core Type Removals
dash-spv/src/types.rs, dash-spv-ffi/src/types.rs
Deleted SpvStats struct definition and FFISpvStats struct with their implementations and conversions, removing the statistics data structure from both core and FFI layers.
FFI API Surface
dash-spv-ffi/FFI_API.md, dash-spv-ffi/include/dash_spv_ffi.h, dash-spv-ffi/scripts/generate_ffi_docs.py
Removed FFI function declarations and documentation for dash_spv_ffi_client_get_stats and dash_spv_ffi_spv_stats_destroy, and removed FFISpvStats type from public documentation.
FFI Client Implementation
dash-spv-ffi/src/client.rs
Deleted FFI-exported functions that retrieved and destroyed SPV stats, removed FFISpvStats from public imports.
Core Client Implementation
dash-spv/src/client/core.rs, dash-spv/src/client/lifecycle.rs, dash-spv/src/client/progress.rs, dash-spv/src/client/status_display.rs
Removed stats field from DashSpvClient, eliminated stats-related initialization and display logic, removed stats() async method from client API, replaced SpvStats with SharedFilterHeights for filter height tracking.
Sync Manager
dash-spv/src/sync/legacy/manager.rs, dash-spv/src/sync/legacy/message_handlers.rs
Removed stats field and parameter from SyncManager, deleted statistics update operations in filter message handling.
Public Exports & Documentation
dash-spv/src/lib.rs, dash-spv/src/client/mod.rs, dash-spv/src/client/message_handler_test.rs
Removed SpvStats from public re-exports, updated lock-order documentation to remove stats lock references.
Tests & Examples
dash-spv-ffi/tests/c_tests/..., dash-spv-ffi/tests/unit/..., dash-spv-ffi/tests/integration/..., dash-spv/examples/simple_sync.rs
Removed stats retrieval and validation calls from integration tests, unit tests, and examples; removed test case test_spv_stats_extreme_values; adjusted test assertions and operations that previously depended on stats objects.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

📊 A stats struct once tracked every byte,
Filters and heights burning bright,
But now it's gone—a cleaner flight! 🐰
No more numbers clogging the way,
Just progress blooming fresh today! 🌱

🚥 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 title 'chore: drop SpvStats statistics' accurately and concisely summarizes the main change—removing SpvStats from the codebase. It is clear, specific, and directly reflects the primary objective.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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

✨ Finishing touches
  • 📝 Generate docstrings

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.

Copy link
Collaborator

@ZocoLini ZocoLini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just dropped this in iOS since it wasn't being used either xd

@xdustinface xdustinface merged commit 78ffd99 into v0.42-dev Jan 29, 2026
53 checks passed
@xdustinface xdustinface deleted the chore/drop-spv-stats branch January 29, 2026 22:06
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