multi: let ForEachNodeChannel take a reset param

This commit is contained in:
Elle Mouton committed 2025-07-15 11:23:27 +02:00
1 parent 16126d7703
commit e5fbca8299
13 files changed
+57 -43

No files matched your search

+3
View File
@@ -1758,6 +1758,9 @@ func (d *AuthenticatedGossiper) retransmitStaleAnns(ctx context.Context,
}
return nil
}, func() {
havePublicChannels = false
edgesToUpdate = nil
})
if err != nil && !errors.Is(err, graphdb.ErrGraphNoEdgesFound) {
return fmt.Errorf("unable to retrieve outgoing channels: %w",
+3 -5
View File
@@ -213,7 +213,7 @@ func (r *mockGraphSource) ForEachNode(
func (r *mockGraphSource) ForAllOutgoingChannels(_ context.Context,
cb func(i *models.ChannelEdgeInfo,
c *models.ChannelEdgePolicy) error) error {
c *models.ChannelEdgePolicy) error, _ func()) error {
r.mu.Lock()
defer r.mu.Unlock()
@@ -3728,10 +3728,8 @@ out:
})
return nil
})
if err != nil {
t.Fatal(err)
}
}, func() {})
require.NoError(t, err)
err = ctx.gossiper.PropagateChanPolicyUpdate(edgesToUpdate)
require.NoError(t, err, "unable to chan policies")