electrum icon indicating copy to clipboard operation
electrum copied to clipboard

txbatcher: don't spend anchors if ctx fee is already sufficient

Open f321x opened this issue 5 months ago • 0 comments

If the tx fee of the ctx is already higher than the required target it is not useful to spend the anchor so instead it is skipped.

As a side effect the closing tx is not shown in the history anymore until any output got claimed, only the lightning part of the closing group is shown, but the closing tx can be found in the channel details: image This is because sweep_commitment_transaction only adds the anchor and to_local outputs to the accounting addresses once there is a (nonlocal) spending tx, so it is missed by get_onchain_history(), same issue(?) for SRK channels. However only declaring them "accounting address" after the sweep seems intentional: https://github.com/spesmilo/electrum/blob/dfd480d5dd86b3a5c358a0b4605fd88438fed93e/electrum/wallet.py#L420

f321x avatar Jul 31 '25 13:07 f321x