Skip to content

Conversation

@DashCoreAutoGuix
Copy link
Owner

Bitcoin PR

bitcoin#26066

Summary

Backport of Bitcoin Core PR bitcoin#26066 - Refactors CoinControl class for better maintainability:

  • Moves function definitions from coincontrol.h to coincontrol.cpp
  • Adds comprehensive documentation for all public methods
  • Changes GetExternalOutput to return std::optional<CTxOut> instead of bool with output parameter
  • Changes ListSelected to return std::vector<COutPoint> directly instead of void with output parameter
  • Adds input weight management functions (SetInputWeight, HasInputWeight, GetInputWeight)
  • Renames setSelected to m_selected_inputs (via scripted-diff)

Dash-specific adaptations

  • Preserved Dash-specific CoinType enum and helpers (UseCoinJoin, IsUsingCoinJoin)
  • Updated all call sites in src/wallet/spend.cpp to use new API
  • Updated fuzz tests to match new signatures
  • No changes to Dash-specific wallet features (CoinJoin integration remains intact)

Changes

  • src/wallet/coincontrol.h: Method declarations with documentation
  • src/wallet/coincontrol.cpp: Method implementations including new weight management
  • src/wallet/spend.cpp: Updated API usage for ListSelected() and GetExternalOutput()
  • src/qt/coincontroldialog.cpp: Updated API usage
  • src/wallet/test/fuzz/coincontrol.cpp: Updated fuzz tests

Testing

  • Code compiles successfully
  • All modified functions maintain backward-compatible behavior
  • Fuzz tests updated to match new API

Original Bitcoin commit: 0e70a1b

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

daba957 refactor: Make ListSelected return vector (Sebastian Falbesoner)
9477662 wallet: Move CoinCointrol definitions to .cpp (Aurèle Oulès)
1db23da wallet: Use std::optional for GetExternalOutput and fixups (Aurèle Oulès)
becc45b scripted-diff: Rename setSelected->m_selected_inputs (Aurèle Oulès)

Pull request description:

  - Moves CoinControl function definitions from `coincontrol.h` to `coincontrol.cpp`
  - Adds more documentation
  - Renames class member for an improved comprehension
  - Use `std::optional` for `GetExternalOutput`

ACKs for top commit:
  achow101:
    ACK daba957
  Xekyo:
    ACK daba957

Tree-SHA512: 3bf2dc834a3246c2f53f8c55154258e605fcb169431d3f7b156931f33c7e3b1ae28e03e16b37f9140a827890eb7798be485b2c36bfc23ff29bb01763f289a07c
@coderabbitai
Copy link

coderabbitai bot commented Sep 30, 2025

Warning

Rate limit exceeded

@DashCoreAutoGuix has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 12 minutes and 36 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 54e2588 and c186614.

📒 Files selected for processing (5)
  • src/qt/coincontroldialog.cpp (1 hunks)
  • src/wallet/coincontrol.cpp (1 hunks)
  • src/wallet/coincontrol.h (3 hunks)
  • src/wallet/spend.cpp (3 hunks)
  • src/wallet/test/fuzz/coincontrol.cpp (2 hunks)
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch backport-0.25-batch-415-pr-26066

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.

3 participants