HomePhabricator

RPCHelpMan: Check default values are given at compile-time

Authored by MarcoFalke <falke.marco@gmail.com> on Dec 10 2018, 21:56.

Description

RPCHelpMan: Check default values are given at compile-time

Summary:
This is a backport of Core PR14918

In order to automate somewhat the process, I used the following commands:

sed -n '1h; 1!H; ${ g; s@/\* opt \*/ true,\n \+@/* opt */ true, @g; p}' -i ../src/wallet/rpc*.cpp ../src/rpc/*.cpp
sed -n '1h; 1!H; ${ g; s@/\* opt \*/ false,\n \+@/* opt */ false, @g; p}' -i ../src/wallet/rpc*.cpp ../src/rpc/*.cpp
sed -e 's@/\* opt \*/ false, /\* default_val \*/ ""@RPCArg::Optional::NO@' -i ../src/wallet/rpc*.cpp ../src/rpc/*.cpp
# Manual edit for OMITTED and OMITTED_NAMED_ARG
sed -e 's@/\* opt \*/ true, /\* default_val \*/@/* default */@' -i ../src/wallet/rpc*.cpp ../src/rpc/*.cpp

Test Plan:

ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D6064

Details

Committed
deadalnixFri, May 22, 17:18
Pushed
deadalnixFri, May 22, 17:18
Reviewer
Restricted Project
Differential Revision
D6064: RPCHelpMan: Check default values are given at compile-time
Parents
rABC5a5256baa9ab: rpc: Document default values for optional arguments
Branches
Unknown
Tags
Unknown