Closed Sosthene00 closed 5 years ago
Looking at the closing tx on a block explorer, It looks like it has been swept successfully, and the funds sent to the address bc1qp7cecfzq6k0s5syz62un6p09ur7t84957lk93t
. These funds should be recognized during rescan, so check if you see them.
That's my point, I've already done a rescan and nothing showed up.
Hypothesis: maybe the tx hasn't been through yet when I've done my previous rescan, if I do a whole scan again it will eventually show up, does it make sense?
I want to be sure it might work before doing it again, because I've already done it twice, it took 24 hours each time and I don't like moving all those data around and messing with my other LND at home.
Since it's a very recent tx, isn't there a way to force a rescan from a said block_height instead of birthday block (which unfortunately is genesis block for my wallet)?
The wallet rescan when upgrading from 0.5 to 0.5.1 was done to fix an issue with the wallet not tracking UTXOs properly. This issue could have caused your wallet balance to be inaccurate. To ensure the funds have been returned to your wallet, you can check if the transaction (https://www.smartbit.com.au/tx/0211724bdb4b00c8fa71dbd56ac64b2cdd105b4b88085e755ec081e5ee66b003) exists within the wallet with lncli listchaintxns
.
Hi, I can confirm that unfortunately the tx doesn't show up with lncli listchaintxns
I'll try to do a full rescan once again when I'll some time (except if there's a way to do only a partial rescan of course :smile: )
Looking on chain, all outputs from that channel have been swept.
If the server was very active, you may need to increase the look ahead distance for your rescan.
It wasn't very active afaik, and if by "increase the look ahead distance" you mean scanning earlier blocks, I already did a rescan from genesis block, not sure how to look further than that :sweat_smile:
By "very active" it means that you requested a lot of addresses that wasn't used.
For instance if you create 10 new addresses, and then only use the last of them, a look ahead distance of < 10 won't find the payment.
Ping on issue @BobleChinois on chain, all the outputs have been swept.
Hi, sorry it has been quite busy these days. I don't remember creating that much addresses, but since it is on BTCPay I don't know all that happen under the hood I guess. I just checked it again, still nothing shows up. Is the "look ahead distance" something I can modify?
The look-ahead distance only applies when restoring from your seed and can be set with the lncli unlock --recovery_window
, which I don't think is the case here?
Ok, point is, I don't think I will ever get the chance to use the unlock
command, as BTCPay's LND wallet is unencrypted (and no seed too), and it seems by looking at the code this flag can't be used elsewhere, is it?
Sorry for the headache guys!
Correct, and you won't be able to recover without a seed. Your best bet is just to run another manual rescan from the wallet birthday using the dropwtxmgr
tool as we can see on-chain that the funds have been swept.
I don't get it, dropwtxmgr
is a tool of btcwallet, right? I run LND with Core as a backend, should I be able to run this somehow?
LND uses btcwallet
internally, so the tool can be used. Check maybe https://github.com/lightningnetwork/lnd/issues/1494#issuecomment-421908735
Ok I had a look at it, still not very clear how to run it and I have no time to tackle that right now anyway. Maybe we can close the issue for now and I'll reopen it later
Ok after doing the dropwtxmgr
and running a full rescan again, the lost funds at last appeared in LND's wallet and are SAFU!
Thanks everyone for your help, I think I'll write a detailed how-to of what I have done, just in case someone else run into the same trouble
Background
After an update of BTCPay server that upgraded LND from 5.0 to 5.1, all my channels were inactive (see this issue). Since BTCPay's node is pruned, I copied the content of
.lnd
file inside another, unpruned, node and let LND do a full rescan. After the rescan I copied the data back in my BTCPay server. It appeared that most of my channels have been simultaneously force closed on the same block. One of these force closed channels had a positive balance on my side, but even as the closure appears to be settled funds are not in my wallet.Here is the channel in
closedchannels
output:The amount in
settled balance
does not show withwalletbalance
.Just in case, here is the logs on startup:
Your environment
lnd
: 0.5.1-beta commit=basedon-v0.5.1-beta-dirtyuname -a
on *Nix): 4.15.0-43-generic #46-Ubuntubtcd
,bitcoind
, or other backend: /Satoshi:0.17.0/lnd.conf
:Steps to reproduce
Upgrade LND with BTCPay, copy the data of
.lnd
to another node to allow LND to do a full rescan, copy the data back inside BTCPay.Expected behaviour
Funds from a force closed channel should appear on my wallet.
Actual behaviour
The funds are nowhere to be seen.