Page MenuHomePhabricator

Merge #10783: [RPC] Various rpc argument fixes
ClosedPublic

Authored by jasonbcox on Wed, Mar 13, 21:26.

Details

Reviewers
deadalnix
Fabien
Group Reviewers
Restricted Project
Commits
rABC33097f296256: Merge #10783: [RPC] Various rpc argument fixes
Summary

4dc1915 check for null values in rpc args and handle appropriately (Gregory Sanders)
999ef20 importmulti options are optional (Gregory Sanders)
a70d025 fixup some rpc param counting for rpc help (Gregory Sanders)

Pull request description:

Audited where named args will fail to use correct default values or may fail when additional optional arguments are added.

Previously for these parameters, it was fine to omit them as positional arguments, but it would trigger UniValue runtime errors to set them to null, or to omit them while passing named parameters with greater positions (which would internally set earlier missing arguments to null). Now null values are treated the same as missing values so these errors do not occur.

Included a few other small fixes while working on it.

I didn't bother fixing account-based rpc calls.

Tree-SHA512: 8baf781a35bd48de7878d4726850a580dab80323d3416c1c146b4fa9062f8a233c03f37e8ae3f3159e9d04a8f39c326627ca64c14e1cb7ce72538f934ab2ae1e

Backport of Core PR 10783
https://github.com/bitcoin/bitcoin/pull/10783/files
Completes T552

Test Plan

make check
test_runner.py

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

jasonbcox created this revision.Wed, Mar 13, 21:26
Herald added a reviewer: Restricted Project. · View Herald TranscriptWed, Mar 13, 21:26
Herald added a subscriber: schancel. · View Herald Transcript
Fabien accepted this revision.Thu, Mar 14, 14:37
This revision is now accepted and ready to land.Thu, Mar 14, 14:37
Closed by commit rABC33097f296256: Merge #10783: [RPC] Various rpc argument fixes (authored by Wladimir J. van der Laan <laanwj@gmail.com>, committed by jasonbcox). · Explain WhyThu, Mar 14, 17:59
This revision was automatically updated to reflect the committed changes.