Merge pull request #10228 from ellemouton/fixNilAssignment
autopilot: fix nil map assignment
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{}{}
|
nodes[nID] = struct{}{}
|
||||||
return nil
|
return nil
|
||||||
}, func() {
|
}, func() {
|
||||||
nodes = nil
|
clear(nodes)
|
||||||
addresses = nil
|
clear(addresses)
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
return fmt.Errorf("unable to get graph nodes: %w", err)
|
return fmt.Errorf("unable to get graph nodes: %w", err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -249,7 +249,7 @@ func (c *ChannelGraphBootstrapper) SampleNodeAddrs(_ context.Context,
|
|||||||
|
|
||||||
return errFound
|
return errFound
|
||||||
}, func() {
|
}, func() {
|
||||||
a = nil
|
clear(a)
|
||||||
})
|
})
|
||||||
if err != nil && !errors.Is(err, errFound) {
|
if err != nil && !errors.Is(err, errFound) {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|||||||
+1
-1
@@ -7284,7 +7284,7 @@ func (r *rpcServer) GetNetworkInfo(ctx context.Context,
|
|||||||
totalNetworkCapacity = 0
|
totalNetworkCapacity = 0
|
||||||
minChannelSize = math.MaxInt64
|
minChannelSize = math.MaxInt64
|
||||||
maxChannelSize = 0
|
maxChannelSize = 0
|
||||||
allChans = nil
|
clear(allChans)
|
||||||
clear(seenChans)
|
clear(seenChans)
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in new issue
Block a user