Skip to content

test: add 200 block regtest blockchain support#537

Draft
xdustinface wants to merge 1 commit intov0.42-devfrom
tests/minimal-blockchain-support
Draft

test: add 200 block regtest blockchain support#537
xdustinface wants to merge 1 commit intov0.42-devfrom
tests/minimal-blockchain-support

Conversation

@xdustinface
Copy link
Collaborator

This improves the full rust dashd integration tests runtime on my MBP M2pro (including the coming mempool tests) from ~65s to ~35s.

The 40k chain is still included for better coverage in wallet integration tests where it matter but this PR also adjusts few other tests where the 40k chain is not needed.

Overview:

  • Rename DASHD_DATADIR to DASHD_TEST_DATA (root containing all variants)
  • Parameterize setup-dashd.py to download both regtest-40000 and regtest-200 variants into the shared root
  • Add DashCoreConfig::from_env_variant() to select a data variant
  • Extract shared init logic into DashdTestContext::create()
  • Add new TestChain enum, integrate it into DashdTestContext::new
  • Update TEST_DATA_VERSION to v0.0.3

This improves the full rust dashd integration tests runtime on my MBP M2pro (including the coming mempool tests) from ~65s to ~35s.

The 40k chain is still included for better coverage in wallet integration tests where it matter but this PR also adjusts few other tests where the 40k chain is not needed.

Overview:
- Rename `DASHD_DATADIR` to `DASHD_TEST_DATA` (root containing all variants)
- Parameterize `setup-dashd.py` to download both `regtest-40000` and
  `regtest-200` variants into the shared root
- Add `DashCoreConfig::from_env_variant()` to select a data variant
- Extract shared init logic into `DashdTestContext::create()`
- Add new `TestChain` enum, integrate it into `DashdTestContext::new`
- Update `TEST_DATA_VERSION` to `v0.0.3`
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 14, 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.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6946dd4e-9537-4598-a817-e8c9689e3e1f

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 tests/minimal-blockchain-support
📝 Coding Plan
  • Generate coding plan for human review comments

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.

@codecov
Copy link

codecov bot commented Mar 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.85%. Comparing base (b946271) to head (20b3854).

Additional details and impacted files
@@              Coverage Diff              @@
##           v0.42-dev     #537      +/-   ##
=============================================
- Coverage      66.89%   66.85%   -0.05%     
=============================================
  Files            313      313              
  Lines          64753    64753              
=============================================
- Hits           43317    43289      -28     
- Misses         21436    21464      +28     
Flag Coverage Δ *Carryforward flag
core 75.02% <ø> (ø)
dash-network 75.00% <ø> (ø) Carriedforward from b946271
dash-network-ffi 34.76% <ø> (ø) Carriedforward from b946271
dash-spv 68.26% <ø> (ø) Carriedforward from b946271
dash-spv-ffi 34.76% <ø> (ø) Carriedforward from b946271
dashcore 75.00% <ø> (ø) Carriedforward from b946271
dashcore-private 75.00% <ø> (ø) Carriedforward from b946271
dashcore-rpc 19.92% <ø> (ø) Carriedforward from b946271
dashcore-rpc-json 19.92% <ø> (ø) Carriedforward from b946271
dashcore_hashes 75.00% <ø> (ø) Carriedforward from b946271
ffi 37.14% <ø> (+0.54%) ⬆️
key-wallet 65.64% <ø> (ø) Carriedforward from b946271
key-wallet-ffi 34.76% <ø> (ø) Carriedforward from b946271
key-wallet-manager 65.64% <ø> (ø) Carriedforward from b946271
rpc 19.92% <ø> (ø)
spv 80.95% <ø> (-0.14%) ⬇️
wallet 65.67% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.
see 15 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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