Skip to content

Instantly share code, notes, and snippets.

@Sosthene00
Created May 12, 2019 16:13
Show Gist options
  • Select an option

  • Save Sosthene00/cd6f74689b0d630e735b5f1b4b72d93b to your computer and use it in GitHub Desktop.

Select an option

Save Sosthene00/cd6f74689b0d630e735b5f1b4b72d93b to your computer and use it in GitHub Desktop.
# Back-up the .lnd dir
`cp -r .lnd/ .lnd.old`
# copy the .lnd dir to another machine that runs a non-pruned full node
`scp [source] [target]`
# Install GO
`wget https://dl.google.com/go/go1.12.3.linux-amd64.tar.gz`
`sha256sum go1.12.3.linux-amd64.tar.gz | awk -F " " '{ print $1 }'`
# output should be `3924819eed16e55114f02d25d03e77c916ec40b7fd15c8acb5838b63135b03df`
`tar -C /usr/local -xzf go1.12.3.linux-amd64.tar.gz`
`export PATH=$PATH:/usr/local/go/bin`
# clone the btcwallet repo
`git clone https://github.com/btcsuite/btcwallet $GOPATH/src/github.com/btcsuite/btcwallet`
# run dropwtxmgr
`cd $GOPATH/src/github.com/btcsuite/btcwallet`
`GO111MODULE=on go install ./dropwtxmgr`
`cd $GOPATH/bin`
`dropwtxmgr --db=/path/to/data/chain/bitcoin/mainnet/wallet.db`
# Restart lnd, it should run a full rescan from genesis block, that might be a bit long though (24 hours on my machine)
@Sosthene00
Copy link
Author

Haha, yes, it makes you realise that lightning is still hardcore now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment