test(platform-wallet): fund wallet fixture with a chain-locked tx#4034
Conversation
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>
|
Warning Review limit reached
Next review available in: 51 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
✅ Review complete (commit 8b0cb99) |
thepastaclaw
left a comment
There was a problem hiding this comment.
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.
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::teststests fail withCoin 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 sharedfunded_wallet_managerfixture funds its single UTXO with aTransactionContext::Mempooltransaction, 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 ofMempool, 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_rowrejected_asset_lock_broadcast_untracks_row_and_releases_reservationrejected_broadcast_racing_concurrent_resume_keeps_row_and_reservationBreaking Changes
None (test-only).
Checklist:
🤖 Generated with Claude Code