This is a followup to #10783.
- The first commit doesn’t change behavior at all, just simplifies code.
- The second commit just changes RPC methods to treat null arguments the same as missing arguments instead of throwing type errors.
- The third commit updates developer notes after the cleanup.
- The forth commit does some additional code cleanup in
getbalance
.
Followup changes that should happen in future PRs:
- Replace uses of
.isTrue()
with calls to.get_bool()
so numbers, objects, and strings cause type errors instead of being interpreted as false. #11050 (review) - Add braces around if statements. #11050 (review)
- Maybe improve UniValue type error exceptions and eliminate RPCTypeCheck and RPCTypeCheckArgument functions. #11050 (review)