Solved… I think. Either time or the restart of LND fixed it.
So, LND lost some balances. I resolved that by going to ‘Actions’ and selecting to ‘Reset Wallet Transactions’. This resynced the graph. Took about an hour and a half and it worked. When balances were misplaced it was LND. Lightning Terminal, Thunder Hub and RTL all showed the same balance before and the corrected balance after LND resync. Next Problem…
I tried to open a channel and it failed due to being smaller than their minimum channel. After that my balance was off again by the amount of the attempted open.
Any way to avoid this or fix it without another resync? What might I be doing wrong other than not catching the channel partners minimum channel size?
Sure. All BTC and Lightning services had been restarted and were reporting healthy because I fixed it the first time by doing that and resyncing LND. That’s always the first thing I check, so I’m positive about that. No config changes on this one.
I then attempted to use Lightning Terminal to batch open two channels. The batch failed because I hadn’t noticed that one of the channels had a minimum channels size larger than my attempt. After that my balances were off by exactly the amount of the opening attempts batch total. I waited a while to see if it might just ‘catch up’. It didn’t. Not wanting to resync the graph in LND again. I just restarted it.
That solved the problem (at least this time). I was able to batch open channels at that point and did it twice.
In Thunderhub and RTL, all my UTXOs (from previous to the failed opening) showed so the balance was just incorrect as if something was still processing. There were no TXs matching the missing funds.
When I Reset the Wallet Transactions, all of the UTXOs showed as before. The balance was just correct. Same when I simply restarted LND.
No. All services showed the wrong balance and by the same amount. LTerm, TH and RTL. This is why I figured LND was the problem.
I logged out of all those services, closed their tabs, reopened and logged back in. LTerm, RTL and TH still had the wrong balance. Closed them all again and only restarted LND. Opened them again and the balance was correct.
You can skip what’s next. I’m just thinking out loud.
I have a few investigative thoughts but I’m not positive now I remember correctly enough OTHER details to make it more than speculation.
For instance, where is the math done to determine the balance? In the interfaces or are they simply reporting from LND? I’m pretty darn sure my onchain and lightning TXs were always showing correctly in their respective TX histories. Like it was simply a math error. This led me to also believe RTL, ETC… (for the total balances entry) are just reporting what they get from LND and are not even doing the math inside the interfaces.
And maybe because of that, LND glitched on the failed TXs and somehow reported the reduction of onchain balance without a supporting TX to forward to the interface. Plus, without incoming lightning info for those failed channels it also didn’t report a corresponding increase in the lightning balance. Onchain was lowered but lightning remained the same.
Anything pointing to your Lightning node is using that as a source of truth. It would only point to an interface bug if there were discrepancies between them.
So LND is where the bug is. As long as a simple restart fixes it when a channel open fails, I can live with it. Also, it doesnt always do it. I had another channel opening fail since then and all balances showed correct and unchanged after that one