mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-28 22:50:58 +02:00
multi: pass reset to ForEachNodeCached
This commit is contained in:
@@ -105,6 +105,9 @@ func (p *PrefAttachment) NodeScores(ctx context.Context, g ChannelGraph,
|
||||
}
|
||||
|
||||
return nil
|
||||
}, func() {
|
||||
allChans = nil
|
||||
clear(seenChans)
|
||||
}); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -162,6 +165,9 @@ func (p *PrefAttachment) NodeScores(ctx context.Context, g ChannelGraph,
|
||||
log.Tracef("Counted %v channels for node %x", nodeChans, nID[:])
|
||||
|
||||
return nil
|
||||
}, func() {
|
||||
maxChans = 0
|
||||
clear(nodeChanNum)
|
||||
}); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user