dashpay / dash

Dash - Reinventing Cryptocurrency
https://www.dash.org
MIT License
1.49k stars 1.2k forks source link

refactor: proper support for composite commands such as 'bls generate' #6051

Closed knst closed 3 months ago

knst commented 3 months ago

Issue being fixed or feature implemented

We have composite commands such as 'bls generate' that do not exist in bitcoin's implementation of rpc. It doesn't let to backport yet bitcoin#18531 which enforced extra checks for arguments name (name of rpc and list arguments in rpc help and actual implementation must match).

What was done?

This PR improves support of composite commands in Dash Core. New style of composite commands are applied for bls composite commands: bls generate and bls fromsecret as proof of concept. Once this PR is merged, I will provide similar fixes for other "compose" rpc commands: protx, masternode (and everything else if any).

Beside better validation of arguments and command names, it improves suggest menu in Qt app (see a screenshot) for composite commands.

image

How Has This Been Tested?

Run unit and functional tests. Also extra tests to conduct in qt app:

Breaking Changes

N/A

Checklist:

knst commented 3 months ago

just note for history: it seems as this PR breaks help for composite commands that has not been refactored yet, such as help protx list