mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-09 21:56:47 +01:00
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:
@@ -249,7 +249,7 @@ func (c *ChannelGraphBootstrapper) SampleNodeAddrs(_ context.Context,
|
||||
|
||||
return errFound
|
||||
}, func() {
|
||||
a = nil
|
||||
clear(a)
|
||||
})
|
||||
if err != nil && !errors.Is(err, errFound) {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user