mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-23 06:35:07 +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:
parent
027e4cdf11
commit
bd857ee298
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue