Skip to content

Commit

Permalink
Merge pull request lightningnetwork#2205 from valentinewallace/better…
Browse files Browse the repository at this point in the history
…-sync-info

lnwallet/btcwallet: return best header timestamp while wallet is resc…
  • Loading branch information
Roasbeef authored Nov 22, 2018
2 parents d3b4454 + 3c1e0f2 commit 712fc3e
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lnwallet/btcwallet/btcwallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -714,11 +714,6 @@ func (b *BtcWallet) SubscribeTransactions() (lnwallet.TransactionSubscription, e
//
// This is a part of the WalletController interface.
func (b *BtcWallet) IsSynced() (bool, int64, error) {
// First, we'll ensure the wallet is not currently undergoing a rescan.
if !b.wallet.ChainSynced() {
return false, 0, nil
}

// Grab the best chain state the wallet is currently aware of.
syncState := b.wallet.Manager.SyncedTo()

Expand All @@ -735,7 +730,7 @@ func (b *BtcWallet) IsSynced() (bool, int64, error) {

// If the wallet hasn't yet fully synced to the node's best chain tip,
// then we're not yet fully synced.
if syncState.Height < bestHeight {
if syncState.Height < bestHeight || !b.wallet.ChainSynced() {
return false, bestTimestamp, nil
}

Expand Down

0 comments on commit 712fc3e

Please sign in to comment.