From 1e46d8ae897aded3367a2dd63a76991882d170fa Mon Sep 17 00:00:00 2001 From: Russell Yanofsky Date: Mon, 19 Mar 2018 15:57:11 -0400 Subject: Get rid of ambiguous OutputType::NONE value Based on suggestion by Pieter Wuille at https://github.com/bitcoin/bitcoin/pull/12119#issuecomment-357982763 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 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. --- doc/release-notes.md | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc/release-notes.md') diff --git a/doc/release-notes.md b/doc/release-notes.md index 48ee364c18..3f28456628 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -104,6 +104,11 @@ Low-level RPC changes now the empty string `""` instead of `"wallet.dat"`. If bitcoin is started with any `-wallet=` options, there is no change in behavior, and the name of any wallet is just its `` string. +- Passing an empty string (`""`) as the `address_type` parameter to + `getnewaddress`, `getrawchangeaddress`, `addmultisigaddress`, + `fundrawtransaction` RPCs is now an error. Previously, this would fall back + to using the default address type. It is still possible to pass null or leave + the parameter unset to use the default address type. ### Logging -- cgit v1.2.3