multi: pass reset to ForEachNodeCached

This commit is contained in:
Elle Mouton
2025-07-11 10:44:06 +02:00
parent e5fbca8299
commit c32bf642d2
14 changed files with 61 additions and 25 deletions

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
}