Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Assert that RPCArg names are equal to CRPCCommand ones (blockchain)
Summary: > This is split out from #18531 to just touch some RPC methods. Description from the main pr: > Motivation > > RPCArg names in the rpc help are currently only used for documentation. However, in the future they could be used to teach the server the named arguments. Named arguments are currently registered by the CRPCCommands and duplicate the RPCArg names from the documentation. This redundancy is fragile, and has lead to errors in the past (despite having linters to catch those kind of errors). See section "bugs found" for a list of bugs that have been found as a result of the changes here. > > Changes > The changes here add an assert in the CRPCCommand constructor that the RPCArg names are identical to the ones in the CRPCCommand. This is a backport of [[bitcoin/bitcoin#19849 | core#19849]] [1/2] bitcoin/bitcoin@fa80c81 Test Plan: `ninja all check-all` Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Differential Revision: https://reviews.bitcoinabc.org/D10298
- Loading branch information