From 26d12faeb80a749a287642538d87f3dd2d11c936 Mon Sep 17 00:00:00 2001 From: Konstantin Akimov Date: Sun, 30 Aug 2026 16:20:42 +0700 Subject: [PATCH 01/15] refactor: carry the coin type in CoinSelectionParams CoinType is threaded through AttemptSelection and ChooseSelectionResult as a defaulted trailing parameter. Upstream keeps rewriting exactly these signatures (bitcoin#26661, bitcoin#27183), so every backport has to re-resolve the Dash-only argument, and a resolution that drops the trailing argument silently falls back to CoinType::ALL_COINS, losing the fully-mixed selection restrictions. Store the coin type in CoinSelectionParams instead, which is built once per selection request and already flows through the whole pipeline. The enum moves from coincontrol.h to coinselection.h so the field can be declared there without pulling the much heavier coincontrol.h into the selection module; coin control is a consumer of the selection layer, so the include direction stays sound. --- src/wallet/coincontrol.h | 14 +------------- src/wallet/coinselection.h | 16 ++++++++++++++++ src/wallet/spend.cpp | 7 +++++-- 3 files changed, 22 insertions(+), 15 deletions(-) diff --git a/src/wallet/coincontrol.h b/src/wallet/coincontrol.h index a07a4cf2182f..b5ada332d828 100644 --- a/src/wallet/coincontrol.h +++ b/src/wallet/coincontrol.h @@ -12,6 +12,7 @@ #include