mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 01:43:16 +01:00
lnrpc: channel point for GetChanInfo
This commit is contained in:
parent
0fadf97e72
commit
1936aa7261
File diff suppressed because it is too large
Load Diff
@ -1555,6 +1555,10 @@ func local_request_Lightning_GetNodeMetrics_0(ctx context.Context, marshaler run
|
||||
|
||||
}
|
||||
|
||||
var (
|
||||
filter_Lightning_GetChanInfo_0 = &utilities.DoubleArray{Encoding: map[string]int{"chan_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
|
||||
)
|
||||
|
||||
func request_Lightning_GetChanInfo_0(ctx context.Context, marshaler runtime.Marshaler, client LightningClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq ChanInfoRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
@ -1576,6 +1580,13 @@ func request_Lightning_GetChanInfo_0(ctx context.Context, marshaler runtime.Mars
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "chan_id", err)
|
||||
}
|
||||
|
||||
if err := req.ParseForm(); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Lightning_GetChanInfo_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.GetChanInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
@ -1602,6 +1613,13 @@ func local_request_Lightning_GetChanInfo_0(ctx context.Context, marshaler runtim
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "chan_id", err)
|
||||
}
|
||||
|
||||
if err := req.ParseForm(); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Lightning_GetChanInfo_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := server.GetChanInfo(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
|
@ -3443,6 +3443,10 @@ message ChanInfoRequest {
|
||||
output index for the channel.
|
||||
*/
|
||||
uint64 chan_id = 1 [jstype = JS_STRING];
|
||||
|
||||
// The channel point of the channel in format funding_txid:output_index. If
|
||||
// chan_id is specified, this field is ignored.
|
||||
string chan_point = 2;
|
||||
}
|
||||
|
||||
message NetworkInfoRequest {
|
||||
|
@ -1204,6 +1204,13 @@
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"format": "uint64"
|
||||
},
|
||||
{
|
||||
"name": "chan_point",
|
||||
"description": "The channel point of the channel in format funding_txid:output_index. If\nchan_id is specified, this field is ignored.",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
|
Loading…
Reference in New Issue
Block a user