From bd857ee298fd056e0f1e480c5871d744e0e0019e Mon Sep 17 00:00:00 2001 From: Elle Mouton Date: Thu, 11 Aug 2022 11:28:18 +0200 Subject: [PATCH] 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. --- cmd/lncli/commands.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/lncli/commands.go b/cmd/lncli/commands.go index 98f39c549..7e46f1570 100644 --- a/cmd/lncli/commands.go +++ b/cmd/lncli/commands.go @@ -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) }