Based on suggestion by @sipa #12119 (comment)
After #12119, the NONE output type was overloaded to refer to either an output type that couldn't be parsed, or to an automatic change output mode. This change drops the NONE enum and uses a simple bool to indicate parse failure, and a new CHANGE_AUTO enum to refer the change output type.
This change is almost a pure refactoring except it makes RPCs reject empty string ("") address types instead of treating them like they were unset. This simplifies the parsing code a little bit and could prevent RPC usage mistakes. It's noted in the release notes.
Follows up #12408 by @MarcoFalke
Followups for future PRs:
- Add explicit support for specifying "auto" in
ParseOutputTypeas suggested by promag and sipa: #12729 (comment) and #12729 (review) - Add wallet
AddressChangeTypemethod to complementTransactionChangeType: #12729 (review).