Repository navigation
doc: name parsefeerate's parameter feerate, as lightningd does - #9703
Open
amartya1523 wants to merge 2 commits into
Open
amartya1523 wants to merge 2 commits into
amartya1523 wants to merge 2 commits into
Conversation
lightningd's parsefeerate takes a parameter called `feerate` (that's also how multifundchannel calls it), but the schema calls it `feerate_str`, so passing it by name fails schema validation. Changelog-None
json_parse_feerate() has always taken `feerate`, and multifundchannel passes it by that name, but the schema (and so the man page) called it `feerate_str`. Anyone following the docs and passing it by name got a "missing required parameter" error. Positional calls are unaffected. Changelog-Fixed: JSON-RPC: the `parsefeerate` documentation now names its parameter `feerate`, which is what lightningd actually accepts.
Andezion
requested changes
Nov 11, 2026
| "properties": { | ||
| "feerate_str": { | ||
| "feerate": { | ||
| "type": "string", |
Collaborator
There was a problem hiding this comment.
the type should be feerate, not string?
| way), so the schema should accept it by name too.""" | ||
| l1 = node_factory.get_node() | ||
|
|
||
| assert l1.rpc.call('parsefeerate', {'feerate': '9999perkw'}) == {'perkw': 9999} |
Collaborator
There was a problem hiding this comment.
add assert l1.rpc.call('parsefeerate', {'feerate': 10000}) == {'perkw': 2500}
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
json_parse_feerate()takesp_req("feerate", ...), andmultifundchannelcalls it with"feerate", butdoc/schemas/parsefeerate.json(and so the man page andschema.json) names the parameterfeerate_str. lightningd rejects a call that passes it by name the way the docs say, since it doesn't knowfeerate_str.This renames it to
feeratein the schema and regeneratescontrib/msggen/msggen/schema.json. lightningd's behaviour doesn't change, and positional calls work the same as before. It's a leftover of the same kind #9471 fixed for required fields.Test:
test_parsefeerate_named_paramcalls it with a dict. pyln-testing validates named requests against the schema, so it fails before the rename. It's committed first asxfail(strict=True).Checklist
tools/lightning-downgrade(none)