Coincontrol to backend - #10732
Draft
accumulator wants to merge 8 commits into
Draft
Conversation
accumulator
marked this pull request as draft
July 2, 2026 13:53
accumulator
force-pushed
the
coincontrol_to_backend
branch
8 times, most recently
from
July 3, 2026 11:33
a7a0ab0 to
00eeab5
Compare
accumulator
marked this pull request as ready for review
July 7, 2026 09:59
Move the coin control "spend set" out of the Qt UTXOList widget and into Abstract_Wallet, so the coin selection is owned by the backend and can be accessed more broadly and code is shared across GUIs. - add add/remove/clear/query helpers for coin control on Abstract_Wallet - drop coins from coin control when their coin or address is frozen - refactor the Qt UTXOList to delegate to the wallet instead of keeping a local _spend_set - move update_coincontrol_bar into the Qt main window
…able_coins
into get_spendable_coins
accumulator
force-pushed
the
coincontrol_to_backend
branch
from
August 3, 2026 12:36
00eeab5 to
1619a75
Compare
…sed in or returned PartialTxInputs
accumulator
force-pushed
the
coincontrol_to_backend
branch
from
August 3, 2026 13:43
cc3c81e to
bf8e6a2
Compare
accumulator
force-pushed
the
coincontrol_to_backend
branch
from
August 3, 2026 13:47
bf8e6a2 to
2765b0e
Compare
accumulator
marked this pull request as draft
August 3, 2026 14:16
accumulator
force-pushed
the
coincontrol_to_backend
branch
from
August 3, 2026 14:22
b70df12 to
28d77d8
Compare
accumulator
force-pushed
the
coincontrol_to_backend
branch
from
August 3, 2026 19:22
f6e4092 to
1828339
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactor coin control from GUI to backend, in preparation of adding coin control features to QML
Edit: Opus 5 found a number of issues (1619a75) Opus 4.8 didn't find. I've tried to resolve these but this ripples out to a bit more code than I'd like. Now analyzing the coincontrol state of
master, and it finds basically the same issues pre-existing.Short summary:
main_window.py:1419docstring declares coincontrol a tri-state, and wallet layer honours it (get_spendable_coins), but GUI'sutxo_list.get_spend_listcollapses empty set toNone, so it might inadvertendly select coins outside coincontrol if the last coin is removed from coincontrol.add_to_coincontrolfrozen-filters only at insertion time.update_coincontrol_barfrozen-filters, butget_spend_listdoesn't, so the status bar can understate the number and amount. Frozen coins can be spent (add to CC, freeze, send)get_coins(**kwargs)discards all kwargs when a spend list exists, so nomature_only,nonlocal_only,confirmed_onlyetc. Think of funding a channel from a local, never broadcasted tx, orget_candidates_for_batchingwanting a conservative coin selection but getting the unfiltered coin set.I'm tempted to limit this PR to just the refactor to the backend, without regressing, but also without fixing all of the above issues, and incrementally fix the issues in other PRs