cmd/lncli: use bitsize of 64 to read output index

In the lnrpc proto, we use either int64 or uint32 for output index. So
to keep things consistent, we should use a bitsize of 64 when reading an
output index from a string. Otherwise, we fail could fail to parse an
index that is valid based on the types we define in the protos.
This commit is contained in:
Elle Mouton 2022-08-11 11:28:18 +02:00
parent 027e4cdf11
commit bd857ee298
No known key found for this signature in database
GPG key ID: D7D916376026F177

View file

@ -2052,7 +2052,7 @@ func parseChanPoint(s string) (*lnrpc.ChannelPoint, error) {
return nil, errBadChanPoint
}
index, err := strconv.ParseInt(split[1], 10, 32)
index, err := strconv.ParseInt(split[1], 10, 64)
if err != nil {
return nil, fmt.Errorf("unable to decode output index: %v", err)
}