Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

close_type missing from REST API /v1/channels/closed response #3385

Closed
kaipila opened this issue Aug 8, 2019 · 1 comment
Closed

close_type missing from REST API /v1/channels/closed response #3385

kaipila opened this issue Aug 8, 2019 · 1 comment

Comments

@kaipila
Copy link

kaipila commented Aug 8, 2019

Background

I noticed the close_type parameter is missing from the REST API /v1/channels/ response for some reason. The documentation at /api.lightning.community/rest/ says that it should be there but it is not

lncli shows me this field and it uses the GRPC API so I am guessing there is something wrong with the REST API implementation.

Your environment

0.7.1-beta commit=v0.7.1-beta-rc1
Darwin Anttis-MBP 18.6.0 Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64

Steps to reproduce

curl -X GET https://localhost:8081/v1/channels/closed
lncli closedchannels

And compare the results.

Expected behaviour

I would expect the close_type field be available in both API's.

Actual behaviour

REST API does not have it.

@wpaulino
Copy link
Contributor

wpaulino commented Aug 8, 2019

Related to #2087.

At the moment with REST if the response doesn't include one of its fields, then you can assume it's the default value. In this case the default value for close_type is COOPERATIVE_CLOSE (https://api.lightning.community/rest/index.html#channelclosesummaryclosuretype).

@wpaulino wpaulino closed this as completed Aug 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants