mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-03 11:39:52 +02:00
docs: update in-place rescan section
This commit is contained in:
parent
a7c81eb595
commit
eaf60a63e3
@ -190,30 +190,25 @@ rescan.
|
|||||||
The recovery methods described above assume a clean slate for a node, so
|
The recovery methods described above assume a clean slate for a node, so
|
||||||
there's no existing UTXO or key data in the node's database. However, there're
|
there's no existing UTXO or key data in the node's database. However, there're
|
||||||
times when an _existing_ node may want to _manually_ rescan the chain. We have
|
times when an _existing_ node may want to _manually_ rescan the chain. We have
|
||||||
a tool for that! The tool is called
|
a command line flag for that! Just start `lnd` and add the following flag:
|
||||||
[`dropwtxmgr`](https://github.com/btcsuite/btcwallet/tree/master/cmd/dropwtxmgr).
|
|
||||||
It can be installed with the following command:
|
|
||||||
```
|
```
|
||||||
⛰ go get -v -u github.com/btcsuite/btcwallet/cmd/dropwtxmgr
|
⛰ lnd --reset-wallet-transactions
|
||||||
```
|
```
|
||||||
|
|
||||||
The `dropwtxmgr` tool will _reset_ the best synced height of the wallet back to
|
The `--reset-wallet-transactions` flag will _reset_ the best synced height of
|
||||||
its birthday, or genesis if the birthday isn't known (for some older wallets).
|
the wallet back to its birthday, or genesis if the birthday isn't known (for
|
||||||
In order to run the tool, you must first **shutdown `lnd`**. Once `lnd` is
|
some older wallets).
|
||||||
shutdown, the rescan can be initiated with the following commands:
|
|
||||||
```
|
|
||||||
⛰ cp $HOME/.lnd/data/chain/bitcoin/mainnet/wallet.db $HOME/wallet.db # Copy the existing databse just in case!
|
|
||||||
⛰ dropwtxmgr --db=$HOME/.lnd/data/chain/bitcoin/mainnet/wallet.db
|
|
||||||
```
|
|
||||||
|
|
||||||
Once the above command returns (if it hangs for a while, then `lnd` may not
|
Just run `lnd` with the flag, unlock it, then the wallet should begin
|
||||||
actually be shutdown, so double check!), `lnd` can be restarted. After it's
|
rescanning. An entry resembling the following will show up in the logs once it's
|
||||||
restarted, then the wallet should being rescanning. An entry resembling the
|
complete:
|
||||||
following will show up in the logs once it's complete:
|
|
||||||
```
|
```
|
||||||
[INF] LNWL: Finished rescan for 800 addresses (synced to block 3032830c812a4a6ea305d8ead13b52e9e69d6400ff3c997970b6f76fbc770920, height 748)
|
[INF] LNWL: Finished rescan for 800 addresses (synced to block 3032830c812a4a6ea305d8ead13b52e9e69d6400ff3c997970b6f76fbc770920, height 748)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Remember to remove the flag once the rescan was completed successfully to
|
||||||
|
avoid rescanning again for every restart of lnd**.
|
||||||
|
|
||||||
## Off-Chain Recovery
|
## Off-Chain Recovery
|
||||||
|
|
||||||
After version `v0.6-beta` of `lnd`, the daemon now ships with a new feature
|
After version `v0.6-beta` of `lnd`, the daemon now ships with a new feature
|
||||||
|
Loading…
x
Reference in New Issue
Block a user