lnd: fix gosimple warnings

This commit is contained in:
Andrey Samokhvalov
2017-02-23 21:59:50 +03:00
committed by Olaoluwa Osuntokun
parent f5fd4138a0
commit 8fb54782e2
30 changed files with 73 additions and 319 deletions

View File

@@ -311,17 +311,14 @@ func loadTestCredits(miner *rpctest.Harness, w *lnwallet.LightningWallet, numOut
// Wait until the wallet has finished syncing up to the main chain.
ticker := time.NewTicker(100 * time.Millisecond)
expectedBalance := btcutil.Amount(satoshiPerOutput * int64(numOutputs))
out:
for {
select {
case <-ticker.C:
balance, err := w.ConfirmedBalance(1, false)
if err != nil {
return err
}
if balance == expectedBalance {
break out
}
for range ticker.C {
balance, err := w.ConfirmedBalance(1, false)
if err != nil {
return err
}
if balance == expectedBalance {
break
}
}
ticker.Stop()