mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-23 06:55:13 +01:00
**Problem Description** In previous commits I introduced some new fields to `msggen`. One example is `CustomMsgResponse` in `cln-grpc/src/notification.rs`. ```rust pub struct CustomMsgResponse { #[serde(skip_serializing_if = "Option::is_none")] pub peer_id: Option<PublicKey>, #[serde(skip_serializing_if = "Option::is_none")] pub payload: Option<String>, } ``` The `peer_id` and `payload` are required parameters. However, the generated code is still marking them as `Optional`. This is a choice made by `msggen`. It does this because `payload` and `peer_id` are recently added fields. By marking the field as optional the language bindings would also work when used on an older version of Core-Lightning. In this scenario. Marking them as optional is overkill. The `CustomMsgStruct` and `payload` field are created in the same version of CoreLightning. This commit solves this behavior. |
||
---|---|---|
.. | ||
pyln/grpc | ||
Makefile | ||
poetry.lock | ||
pyproject.toml | ||
README.md |
pyln-grpc-proto
The python protobuf library is rather restrictive when it comes to importing them multiple times. So this package just contains the compiled protobuf files and serves as the canonical place to load them from.