Skip to content

Unify CLN swap premium limit argument names - #461

Draft
YusukeShimizu wants to merge 1 commit into
ElementsProject:masterfrom
YusukeShimizu:codex/unify-cln-premium-limit
Draft

YusukeShimizu wants to merge 1 commit into
ElementsProject:masterfrom
YusukeShimizu:codex/unify-cln-premium-limit

Conversation

@YusukeShimizu

Copy link
Copy Markdown
Contributor

CLN swap-in advertises and accepts premium_limit_ppm, while swap-out uses premium_rate_limit_ppm. Rename the swap-in JSON parameter so both commands expose premium_rate_limit_ppm in their help and named arguments.

This changes the swap-in named argument: scripts must replace premium_limit_ppm with premium_rate_limit_ppm. No alias is retained; the old name may be silently ignored, leaving the limit at zero. The usage guide documents the migration. Positional arguments and premium calculations are unchanged.

Validation:

  • Added regression tests for generated RPC usage and named/positional parsing with positive and negative premium limits for both commands. The tests reproduced the swap-in failures before the fix.
  • go test ./clightning passed.
  • git diff --check passed.
  • Documentation lint still reports the same pre-existing 35 errors and 11 warnings; the added text introduces no new findings.

Swap-in exposes premium_limit_ppm while swap-out exposes
premium_rate_limit_ppm, making CLN help and named arguments
inconsistent.

Rename the swap-in JSON parameter to premium_rate_limit_ppm and
document the required migration without retaining an alias. Add
regression tests for generated usage and named and positional
arguments with positive and negative premium limits.
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.

1 participant