Merge pull request #591 from halseth/not-is-current-at-0
wallet/wallet: assume not current if best height is 0
This commit is contained in:
commit
b51c1adeee
1 changed files with 6 additions and 0 deletions
|
@ -471,6 +471,12 @@ func (w *Wallet) scanChain(startHeight int32,
|
||||||
Checkpoints[len(w.chainParams.Checkpoints)-1].Height
|
Checkpoints[len(w.chainParams.Checkpoints)-1].Height
|
||||||
}
|
}
|
||||||
isCurrent := func(bestHeight int32) bool {
|
isCurrent := func(bestHeight int32) bool {
|
||||||
|
// If the best height is zero, we assume the chain backend
|
||||||
|
// still is looking for peers to sync to.
|
||||||
|
if bestHeight == 0 {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
switch c := chainClient.(type) {
|
switch c := chainClient.(type) {
|
||||||
case *chain.NeutrinoClient:
|
case *chain.NeutrinoClient:
|
||||||
return c.CS.IsCurrent()
|
return c.CS.IsCurrent()
|
||||||
|
|
Loading…
Reference in a new issue