lightning icon indicating copy to clipboard operation
lightning copied to clipboard

[lightning-listfunds] Missing field

Open bubelov opened this issue 2 years ago • 3 comments

It looks like reserved_to_block field is missing from gRPC mapping:

https://github.com/ElementsProject/lightning/blob/5444a843b60e0b1d1f6742fa9e912fcdfe5736f8/cln-grpc/proto/node.proto#L261-L277

Is it intentional? It looks like CLI can return this field under certain conditions:

https://github.com/ElementsProject/lightning/blob/9a880a0932e7d8575620a1f7b48038c52b4b126f/wallet/walletrpc.c#L284-L286

bubelov avatar Jun 25 '22 16:06 bubelov

Yeah this was reported in some other issue as well, I think the code generator has bug for the optional filed

vincenzopalazzo avatar Jun 25 '22 17:06 vincenzopalazzo

@vincenzopalazzo does it generate from this?

https://github.com/ElementsProject/lightning/blob/9a880a0932e7d8575620a1f7b48038c52b4b126f/.msggen.json#L580-L589

https://github.com/ElementsProject/lightning/blob/9a880a0932e7d8575620a1f7b48038c52b4b126f/cln-rpc/src/model.rs#L1273-L1292

It has a bunch of optional fields already so it doesn't look like it can't parse Rust's Option enums or something

bubelov avatar Jun 26 '22 14:06 bubelov

The optional field can be also filed that exist only in a if-else JSON schema clause

vincenzopalazzo avatar Jun 26 '22 17:06 vincenzopalazzo