lnd: fix gosimple warnings

This commit is contained in:
Andrey Samokhvalov authored and Olaoluwa Osuntokun committed 2017-03-13 16:30:23 -07:00
1 parent f5fd4138a0
commit 8fb54782e2
30 files changed
+73 -319

No files matched your search

+1 -5
View File
@@ -281,11 +281,7 @@ func (b *BtcWallet) FetchRootKey() (*btcec.PrivateKey, error) {
rootBucket := tx.RootBucket()
rootAddrHash = rootAddr[0].Address().ScriptAddress()
if err := rootBucket.Put(rootKey, rootAddrHash); err != nil {
return err
}
return nil
return rootBucket.Put(rootKey, rootAddrHash)
}); err != nil {
return nil, err
}
+8 -11
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()