mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-20 11:06:54 +01:00
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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user