Skip to content

test(platform-wallet): fund wallet fixture with a chain-locked tx#4034

Merged
QuantumExplorer merged 1 commit into
v4.1-devfrom
fix/asset-lock-test-fixture-confirmed-funding
Jul 7, 2026
Merged

test(platform-wallet): fund wallet fixture with a chain-locked tx#4034
QuantumExplorer merged 1 commit into
v4.1-devfrom
fix/asset-lock-test-fixture-confirmed-funding

Conversation

@QuantumExplorer

Copy link
Copy Markdown
Member

Issue being fixed or feature implemented

The "Rust wallet tests / Wallet tests (macOS)" check is red on every PR targeting v4.1-dev: three wallet::asset_lock::build::tests tests fail with Coin selection error: No UTXOs available for selection. Verified they fail on the base branch itself (at e9aae0d) — bisected to the rust-dashcore bump #4022.

Root cause: rust-dashcore#836 ("don't build asset locks on unconfirmed funds", in the 647fa98 bump) intentionally restricts asset-lock coin selection to final inputs (is_confirmed || is_instantlocked). The shared funded_wallet_manager fixture funds its single UTXO with a TransactionContext::Mempool transaction, which is now correctly ineligible for asset-lock funding — so the three asset-lock broadcast tests can no longer build their transaction. The production behavior is right; the fixture is stale.

What was done?

Fund the fixture UTXO via TransactionContext::InChainLockedBlock(BlockInfo::new(1, BlockHash::all_zeros(), ...)) instead of Mempool, so the input is final and selectable by the asset-lock builder, matching what production requires since #836.

How Has This Been Tested?

cargo test -p platform-wallet --lib — all 394 tests pass, including the three previously failing:

  • ambiguous_asset_lock_broadcast_keeps_reservation_and_built_row
  • rejected_asset_lock_broadcast_untracks_row_and_releases_reservation
  • rejected_broadcast_racing_concurrent_resume_keeps_row_and_reservation

Breaking Changes

None (test-only).

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed

🤖 Generated with Claude Code

rust-dashcore#836 (in the 647fa98 bump, #4022) restricts asset-lock
coin selection to final inputs (confirmed or InstantSend-locked), so
the mempool-funded funded_wallet_manager fixture left the three
asset-lock broadcast tests with no eligible UTXO and they failed with
"No UTXOs available for selection" on every v4.1-dev PR.

Fund the fixture UTXO via an InChainLockedBlock context instead so it
is final, matching what the asset-lock builder now requires.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions github-actions Bot added this to the v4.1.0 milestone Jul 7, 2026
@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@QuantumExplorer, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 51 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f620db77-da72-44e6-89a4-f44bacf12c75

📥 Commits

Reviewing files that changed from the base of the PR and between e9aae0d and 8b0cb99.

📒 Files selected for processing (1)
  • packages/rs-platform-wallet/src/test_support.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/asset-lock-test-fixture-confirmed-funding

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.

@thepastaclaw

thepastaclaw commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

✅ Review complete (commit 8b0cb99)

@QuantumExplorer QuantumExplorer merged commit 6760fe6 into v4.1-dev Jul 7, 2026
16 of 17 checks passed
@QuantumExplorer QuantumExplorer deleted the fix/asset-lock-test-fixture-confirmed-funding branch July 7, 2026 06:10

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Code Review

Verified the checked-out worktree is at 8b0cb99 and reviewed the only PR change in packages/rs-platform-wallet/src/test_support.rs. The fixture now records the funding transaction as InChainLockedBlock, which maps to a confirmed UTXO and matches the rust-dashcore asset-lock builder's final-input requirement; no in-scope defects were found. No CodeRabbit inline findings were supplied to validate.

Source: reviewers claude/opus and codex/gpt-5.5 for general; verifier codex/gpt-5.5. Failed lanes: claude/opus general, claude/opus security-auditor, claude/opus rust-quality.

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.

2 participants