mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 22:45:27 +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. |
||
---|---|---|
.. | ||
examples | ||
src | ||
Cargo.toml | ||
Makefile | ||
README.md |