-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Forever pending wallet balance after channel closing. #1056
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I have same issue. Closed channels almost 2 days ago. One of the txid i got in response coudnt be found in block explorers. Now after i restareted ln i see this 2 channels as pending closing. Thing is they both have 351+ conf atm. Ps. I was closing channels with closeallchannels command. transactions: Using lnd: 0.4.1
Restarting lnd dosent help. Lnd log after restart: Plus i think lnd stucked. It stayd for like 8-10min with nothing new in logs (look link above) untill i made payinvoice, then it start syncing with network. Maybe im wrong but normaly it starts syncing pretty fast after restart. |
Are you sure you're running with a |
If you connect to a |
Does your What's the minrelay fee on your node? |
Looking at the logs, it looks like we paid a very low fee, which possibly |
Strange thing happens after lnd restart and resync with network. Look at unconfirmed balance and pending channels balance: http://wklej.org/id/3404754/
How to check if? All opening and closing transactions as far were bench32 addresses. Now after few more restarts of btcd and lnd after both syncs i have this: |
Yah, I believe bitcoind might not have relayed it.... Is there any way to fix this? And should I set a new minrelay fee in bitcoind to prevent it happening again? |
It seems that |
These are the relevant transactions: Sent at 13:28:50. Not shown in my full node: Sent 23:17:14 |
Have you tried lowering your |
Yes - after the fact, of course. I can't see any of the transactions I was missing, but that is "fine", because I guess the funds are all in Problem is, my wallet knows nothing about this address :) |
Focusing on the OP now... Looking at the logs, that channel was fully resolved:
Upon startup, if you set |
…op variable In this commit, we fix a long standing bug where at times a co-op channel closure wouldn't be properly marked as fully closed in the database. The culprit was a re-occurring code flaw we've seen many times in the codebase: a closure variable that closes over a loop iterator variable. Before this instance, I assumed that this could only pop up when goroutines bind to the loop iterator within a closure. However, this instance is the exact same issue, but within a regular closure that has _delayed_ execution. As the closure doesn't execute until long after the loop has finished executing, it may still be holding onto the _last_ item the loop iterator variable was assigned to. The fix for this issue is very simple: re-assign the channel point before creating the closure. Without this fix, we would go to call db.MarkChanFullyClosed on a channel that may not have yet actually be in the pending close state, causing all executions to fail. Fixes lightningnetwork#1054. Fixes lightningnetwork#1056. Fixes lightningnetwork#1075.
Background
I closed a channel, cooperatively, 2018-04-08 13:28:50
The TXIDs for this never appeared in any blockchain explorers. Maybe my full node never accepted it? There's no useful logs from bitcoind, however, from this point...
Later in the evening, I restarted my node. At 23:17:14, a new TX, with ID 83aa451a5cdbe82542abc3007d5231f61b6c1d102f12b58f64cb7514332799f9, was sent, for closing the same channel point. That one I can see is confirmed pretty instantly.
After this, the channel is completely closed in LND, but there is unconfirmed wallet balance corresponding to my share of the channel.
bitcoin@thundroid:~/.bitcoin$ date;lncli walletbalance
ma. 09. april 10:08:04 +0200 2018
{
"total_balance": "3394015",
"confirmed_balance": "1394198",
"unconfirmed_balance": "1999817"
}
lnd.log
Your environment
lnd version 0.4.1-beta commit=13945de8060ad42e077988c1cf69e205dc11e528
Linux thundroid 4.14.24-113 Fix name typo in README #1 SMP PREEMPT Mon Mar 5 12:21:35 UTC 2018 armv7l armv7l armv7l GNU/Linux
*bi tcoin@thundroid:~/log/lnd/bitcoin/mainnet$ bitcoind --version
Bitcoin Core Daemon version v0.16.0
any other relevant environment details
Steps to reproduce
Expected behaviour
Funds appear confirmed in wallet after channel is confirmed closed.
Actual behaviour
walletbalance having an eternal "unconfirmed balance".
The text was updated successfully, but these errors were encountered: