Merge bitcoin/bitcoin#25685: wallet: Faster transaction creation by removing pre-set-inputs fetching responsibility from Coin Selection#1230
Conversation
…pre-set-inputs fetching responsibility from Coin Selection This backport: - Introduces FetchSelectedInputs() to handle pre-selected input validation - Refactors SelectCoins() to use PreSelectedInputs parameter - Adds AddInputs() and Merge() methods to SelectionResult - Updates AutomaticCoinSelection() to handle coin selection separately - Removes const from SelectionResult::m_target and m_algo to support Merge Dash-specific adaptations: - Uses 1-parameter ComputeAndSetWaste (Dash does not have GetChange yet) - Removes HasInputWeight/GetInputWeight calls (not in Dash CCoinControl) - Adapts tests to use LEGACY output type (Dash has no SegWit) - Excludes wallet_create_tx benchmark (requires kernel/chain.h infrastructure) - Updates preset_inputs_test to reflect new behavior Generated with Claude Code Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Warning Rate limit exceeded@DashCoreAutoGuix has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 8 minutes and 21 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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. 📒 Files selected for processing (12)
✨ 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 |
Summary
Backport of Bitcoin PR bitcoin#25685 which refactors coin selection to improve transaction creation performance by separating pre-selected input handling.
Key changes:
FetchSelectedInputs()to validate and fetch pre-selected inputsSelectCoins()to acceptPreSelectedInputsparameterAddInputs()andMerge()methods toSelectionResultAutomaticCoinSelection()for cleaner separation of concernsDash-specific adaptations
ComputeAndSetWaste()(Dash lacksGetChange()from wallet: return change from SelectionResult bitcoin/bitcoin#25647)HasInputWeight/GetInputWeightcalls (not in DashCCoinControl)wallet_create_txbenchmark (requireskernel/chain.hinfrastructure)preset_inputs_testto reflect new behavior where all preset inputs are usedTest plan
coinselector_testsunit tests passBitcoin PR: bitcoin#25685
🤖 Generated with Claude Code