What changed, and why it matters
This commit simply removes an unused internal data structure called PreSelectedInputs from a wallet header file. It is a code cleanup change with no functional behavior change and no apparent security relevance.
No security action needed. Treat as routine code cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff deletes the PreSelectedInputs struct from src/wallet/spend.h. This struct was a helper type for tracking manually selected inputs and their total amount, but it is no longer referenced anywhere in the codebase. The removal is purely dead-code elimination and does not alter any transaction construction, coin selection, or validation logic.
Changed components
src/wallet/spend.hInspect captured patch +0 / −20
diff --git a/src/wallet/spend.h b/src/wallet/spend.h
index 5a6ad246..b615aea2 100644
--- a/src/wallet/spend.h
+++ b/src/wallet/spend.h
@@ -156,26 +156,6 @@ util::Result<SelectionResult> AttemptSelection(interfaces::Chain& chain, const C
*/
util::Result<SelectionResult> ChooseSelectionResult(interfaces::Chain& chain, const CAmount& nTargetValue, Groups& groups, const CoinSelectionParams& coin_selection_params);
-// User manually selected inputs that must be part of the transaction
-struct PreSelectedInputs
-{
- OutputSet coins;
- // If subtract fee from outputs is disabled, the 'total_amount'
- // will be the sum of each output effective value
- // instead of the sum of the outputs amount
- CAmount total_amount{0};
-
- void Insert(const COutput& output, bool subtract_fee_outputs)
- {
- if (subtract_fee_outputs) {
- total_amount += output.txout.nValue;
- } else {
- total_amount += output.GetEffectiveValue();
- }
- coins.insert(std::make_shared<COutput>(output));
- }
-};
-
/**
* Fetch and validate coin control selected inputs.
* Coins could be internal (from the wallet) or external.
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.