autopilot: make n uint32 in chooseN

To avoid negative values being input, as it doesn't really make sense.
This commit is contained in:
Johan T. Halseth committed 2018-12-19 08:27:34 +01:00
1 parent 2f17030e8c
commit a202860ce1
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -551,7 +551,7 @@ func (a *Agent) openChans(availableFunds btcutil.Amount, numChans uint32,
// Now use the score to make a weighted choice which
// nodes to attempt to open channels to.
chanCandidates, err := chooseN(int(numChans), scores)
chanCandidates, err := chooseN(numChans, scores)
if err != nil {
return fmt.Errorf("Unable to make weighted choice: %v",
err)