Skip to content

rpc: return raw peerswaprpc.PremiumRate pointers #371

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

Merged

Conversation

YusukeShimizu
Copy link
Contributor

@YusukeShimizu YusukeShimizu commented Apr 6, 2025

Fix returning proto definitions to ease unmarshal for PremiumRate.
We previously format peerswaprpc.PremiumRate for readability. #264 (comment)

But, that makes unmarshal over RPC calls inconvenient.
To callable, return raw proto definitions directly to fix RPC usage issues.

Some 0-value fields may be omitted due to proto generation limits.
Removing omit empty tags later may resolve those readability issues.

In cln, CLI output and RPC calls are not separated.
Because of this, it is not possible to make the CLI output human-readable while returning raw proto for RPC.

Fix returning proto definitions to ease unmarshal for PremiumRate.
- We previously format peerswaprpc.PremiumRate for readability.
- That makes unmarshal over RPC calls inconvenient.
- cln does not distinguish API and CLI outputs, preventing separation.
- Return raw proto definitions directly to fix RPC usage issues.
- Some 0-value fields may be omitted due to proto generation limits.
- Removing omit empty tags later may resolve those readability issues.
@YusukeShimizu YusukeShimizu changed the title rpc: return raw PremiumRate proto rpc: return raw peerswaprpc.PremiumRate pointers Apr 6, 2025
@YusukeShimizu YusukeShimizu marked this pull request as ready for review April 7, 2025 00:42
@Impa10r
Copy link
Contributor

Impa10r commented Apr 9, 2025

Merged into my testnet4 branch and it fixed the issue with CLN premiums. Thanks!

@Impa10r Impa10r mentioned this pull request Apr 9, 2025
@grubles
Copy link
Collaborator

grubles commented Apr 9, 2025

tACK b242fae

@grubles grubles merged commit d99ec96 into ElementsProject:master Apr 9, 2025
9 checks passed
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

Successfully merging this pull request may close these issues.

3 participants