autopilot: fix nil map assignment
Use the `clear` call to reset a map on `reset` instead of assigning nil to the entry.
This commit is contained in:
3 files changed
+4
-4
No files matched your search
+2
-2
@@ -644,8 +644,8 @@ func (a *Agent) openChans(ctx context.Context, availableFunds btcutil.Amount,
|
||||
nodes[nID] = struct{}{}
|
||||
return nil
|
||||
}, func() {
|
||||
nodes = nil
|
||||
addresses = nil
|
||||
clear(nodes)
|
||||
clear(addresses)
|
||||
}); err != nil {
|
||||
return fmt.Errorf("unable to get graph nodes: %w", err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user