lnd: fix gosimple warnings
This commit is contained in:
1 parent
f5fd4138a0
commit
8fb54782e2
30 files changed
+73
-319
No files matched your search
@@ -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
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user