-
Notifications
You must be signed in to change notification settings - Fork 37.8k
rpc: normalize parameter names #20013
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
Conversation
0c8b364
to
bd1d751
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK
As an intermediate step I was thinking request.params
could have both keys, the original and the normalized (obviously should assert that the normalized key doesn't conflict with another one). This way it's not necessary to call NormalizedObject
on the RPC methods.
A next intermediate step would be to remove original keys and only keep the normalized ones, this behavior could be turned on in RPCHelpMan
on each RPC method to support small changes.
bd1d751
to
fe3e936
Compare
@promag I tried to work on a solution based on always providing the entire Since it also adds to named parameters, patches are needed in various places to make it not yell about missing or unknown parameters. Still digging, but this seems to increase complexity quite a bit. |
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
fe3e936
to
560f3b4
Compare
When using -named, this converts all variants of case and underscores into a normalized lower case no underscore parameter name.
I extended this a slight bit to now also normalize the
In the process, I ran into linker issues with QT build, so I inlined the |
This PR initiates the transition to using normalized parameter names in objects in RPC commands.
Because this transition all at once would be huge, the PR also includes a during-transition temporary structure which will make it transparent to the user whether the object has been normalized or not.
There is also one conversion in here, for the send RPC, to show what conversion would entail.
This is an alternative to #19957. (A much better alternative, IMO.)