lnd: [bug]: Force closed channel has settled balance of 0
Background
Several weeks ago my client force closed a channel with 9 million sats on my side. (tx id f8adec183549f675a388f33b37acca74c7657989af432aa2e49a85681164fa1b
) This is showing as a settled balance of “0” on my node and my change output does not show up as spendable anywhere.
The anchors from the closing transaction and the other party’s balance have all been spent but one 9 million sat output remains unspent (bc1q80l0qp4e09w05up6rc23vp78a9nz0u3r0hvu6d049lhvzv99s2xqqmgn2p
). I assume this is still spendable by me somehow but so far I have no way of verifying that.
I have tried running rescan multiple times.
Output from lncli closedchannels
:
$ lncli closedchannels | jq '.[][] | select(.closing_tx_hash=="f8adec183549f675a388f33b37acca74c7657989af432aa2e49a85681164fa1b")'
{
"channel_point": "881e6c795eb3050b30ff430a1ebce39268ca6850acc62305103dc5d9592a6c23:1",
"chan_id": "795035967417483265",
"chain_hash": "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f",
"closing_tx_hash": "f8adec183549f675a388f33b37acca74c7657989af432aa2e49a85681164fa1b",
"remote_pubkey": "035e4ff418fc8b5554c5d9eea66396c227bd429a3251c8cbc711002ba215bfc226",
"capacity": "50000000",
"close_height": 780164,
"settled_balance": "0",
"time_locked_balance": "0",
"close_type": "LOCAL_FORCE_CLOSE",
"open_initiator": "INITIATOR_LOCAL",
"close_initiator": "INITIATOR_LOCAL",
"resolutions": [],
"alias_scids": [],
"zero_conf_confirmed_scid": "0"
}
Your environment
- version of
lnd
: Originally 0.15.4; since upgraded to 0.16.0-beta - which operating system (
uname -a
on *Nix): Linux raspberrypi 5.15.32-v8+ - version of
btcd
,bitcoind
, or other backend: v23.0.0 - any other relevant environment details: Raspiblitz
Steps to reproduce
Channel was automatically self closed. (I was not monitoring my node at the time.) Unsure what makes this one different than all my other channels that force closed and I was successfully able to recover the balance after waiting for the time lock.
Expected behaviour
My remaining balance should be added to my wallet balance.
Actual behaviour
Settled balance of 0 and the change output is not spendable.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 19 (1 by maintainers)
Issue resolved – I was successfully able to recover the funds using
chantools sweeptimelockmanual
! Thank you very much for your help @guggero.Ah yes, you’re right. I forgot that your node force closed. You’ll need to use
chantools sweeptimelockmanual
. And maybe you’ll need an old channel backup file that still includes the channel (since the current one won’t as lnd thinks the channel is closed). Or you usechantools dumpchannels --closed
to get the value for--remoterevbasepoint
(you’ll need to stop lnd to access the channel DB with chantools though).That’s not correct. chantools doesn’t look at the channel DB at all when sweeping, that’s the whole point. So it doesn’t care what the state of the channel is from the point of view of lnd.