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

gRPC ListPeers fails due to missing variant SENT_REMOVE_COMMIT #6318

Closed
2Fast2BCn opened this issue Jun 8, 2023 · 1 comment · Fixed by #6323
Closed

gRPC ListPeers fails due to missing variant SENT_REMOVE_COMMIT #6318

2Fast2BCn opened this issue Jun 8, 2023 · 1 comment · Fixed by #6323
Assignees
Labels
rust Issue related to rust
Milestone

Comments

@2Fast2BCn
Copy link

When calling the gRPC we receive the following error:

rpc error:
code = Unknown
desc = Error calling method ListPeers:
  RpcError {
    code: None,
    message: "Malformed response from lightningd: unknown variant `SENT_REMOVE_COMMIT`, expected one of `SENT_ADD_HTLC`, `SENT_ADD_COMMIT`, `RCVD_ADD_REVOCATION`, `RCVD_ADD_ACK_COMMIT`, `SENT_ADD_ACK_REVOCATION`, `RCVD_ADD_ACK_REVOCATION`, `RCVD_REMOVE_HTLC`, `RCVD_REMOVE_COMMIT`, `SENT_REMOVE_REVOCATION`, `SENT_REMOVE_ACK_COMMIT`, `RCVD_REMOVE_ACK_REVOCATION`"
 }
@rustyrussell rustyrussell added this to the v23.08 milestone Jun 8, 2023
@rustyrussell rustyrussell added the rust Issue related to rust label Jun 8, 2023
@cdecker
Copy link
Member

cdecker commented Jun 12, 2023

The schemas appear to have sliced that enum based on where it is being used, which means that when we copied one instance to build the HtlcState enum in the Rust library we were missing the states that could not appear in that particular instance, however they may appear in other instances.

I have a version that combines all HTLC states into single enum. Interestingly enough I seem to have stumbled over this before and only the cln-grpc crate was missing some entires, but the error points at cln-rpc. I'll publish my fix, but leave this open because I'm not sure this is the fix we need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rust Issue related to rust
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants