lnd: ensure that we set the wallet birthday for --noencryptwallet

In this commit, we ensure that we always set the wallet birthday. If the
user has provided a seed, or is creating a new one, then it will be
overwritten below. However, before this commit, if a user started with
the --noencryptwallet flag, then we would _always_ start to rescan from
genesis with the recent bug fix to ensure that we always start after the
birthday.
This commit is contained in:
Olaoluwa Osuntokun 2018-09-05 18:58:48 -07:00
parent 055dc233a1
commit 1ac1092aaa
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21

2
lnd.go
View File

@ -204,7 +204,7 @@ func lndMain() error {
var (
privateWalletPw = lnwallet.DefaultPrivatePassphrase
publicWalletPw = lnwallet.DefaultPublicPassphrase
birthday time.Time
birthday = time.Now()
recoveryWindow uint32
unlockedWallet *wallet.Wallet
)