multi: pass reset to ForEachNodeCached

This commit is contained in:
Elle Mouton committed 2025-07-15 11:23:27 +02:00
1 parent e5fbca8299
commit c32bf642d2
14 files changed
+61 -25

No files matched your search

+6
View File
@@ -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
}