Skip to content

Comments

feat: add dashd integration tests for SPV sync#464

Draft
xdustinface wants to merge 1 commit intofeat/sync-cyclefrom
feat/dashd-integration-tests
Draft

feat: add dashd integration tests for SPV sync#464
xdustinface wants to merge 1 commit intofeat/sync-cyclefrom
feat/dashd-integration-tests

Conversation

@xdustinface
Copy link
Collaborator

Adds comprehensive integration tests that verify SPV sync against a real dashd instance with pre-generated regtest blockchain: dashpay/regtest-blockchain

Includes:

  • CI infrastructure: contrib/setup-dashd.py for cross-platform dashd/test-data setup, GitHub Actions caching and log retention on test failure
  • Shared test utilities in dash-spv/src/test_utils/: DashCoreNode (dashd process management, RPC), DashdTestContext (common setup), filesystem helpers
  • FFI test utilities in dash-spv-ffi/src/test_utils/: CallbackTracker (callback verification), FFITestContext (FFI client wrapper lifecycle management)
  • Thread-local logging support for parallel test isolation
  • SPV tests: basic sync, empty wallet, multi-wallet, restart consistency, restart with fresh wallet, multiple restarts, random restarts, peer disconnection (exclusive and non-exclusive mode), incremental transactions (single block, across blocks)
  • FFI tests: wallet sync, incremental sync, restart consistency, all-callbacks verification, post-sync transaction and disconnect callbacks

Based on:

Adds comprehensive integration tests that verify SPV sync against a real `dashd` instance
with pre-generated regtest blockchain: [dashpay/regtest-blockchain](https://github.com/dashpay/regtest-blockchain)

### Includes:
- CI infrastructure: `contrib/setup-dashd.py` for cross-platform dashd/test-data setup, GitHub Actions caching and log retention on test failure
- Shared test utilities in `dash-spv/src/test_utils/`: `DashCoreNode` (`dashd` process management, RPC), `DashdTestContext` (common setup), filesystem helpers
- FFI test utilities in `dash-spv-ffi/src/test_utils/`: `CallbackTracker` (callback verification), `FFITestContext` (FFI client wrapper lifecycle management)
- Thread-local logging support for parallel test isolation
- SPV tests: basic sync, empty wallet, multi-wallet, restart consistency, restart with fresh wallet, multiple restarts, random restarts, peer disconnection (exclusive and non-exclusive mode), incremental transactions (single block, across blocks)
- FFI tests: wallet sync, incremental sync, restart consistency, all-callbacks verification, post-sync transaction and disconnect callbacks
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 21, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/dashd-integration-tests

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.

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