mirror of
https://github.com/LBRYFoundation/lbcwallet.git
synced 2025-08-23 17:47:29 +00:00
Remove unneeded check of closed channel.
This commit is contained in:
parent
6a72a0ad4d
commit
a87f827fb9
1 changed files with 4 additions and 7 deletions
|
@ -1047,16 +1047,13 @@ func (s *Store) UnspentOutputs() ([]Credit, error) {
|
||||||
i++
|
i++
|
||||||
}
|
}
|
||||||
|
|
||||||
unspent := make([]Credit, 0, len(s.unspent))
|
unspent := make([]Credit, len(s.unspent))
|
||||||
for _, c := range creditChans {
|
for i, c := range creditChans {
|
||||||
cc, ok := <-c
|
cc := <-c
|
||||||
if !ok {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
if cc.err != nil {
|
if cc.err != nil {
|
||||||
return nil, cc.err
|
return nil, cc.err
|
||||||
}
|
}
|
||||||
unspent = append(unspent, cc.credit)
|
unspent[i] = cc.credit
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, r := range s.unconfirmed.txs {
|
for _, r := range s.unconfirmed.txs {
|
||||||
|
|
Loading…
Add table
Reference in a new issue