Merge #19396: refactor: Remove confusing OutputType::CHANGE_AUTO

fa927ff884 Enable Wswitch for OutputType (MarcoFalke)
faddad71f6 Remove confusing OutputType::CHANGE_AUTO (MarcoFalke)
fa2eb38352 interfaces: Remove unused getDefaultChangeType (MarcoFalke)

Pull request description:

  `OutputType::CHANGE_AUTO` is problematic for several reasons:

  * An output that is not change must never be described by `CHANGE_AUTO`. Simply allowing that option makes the code confusing and review harder than it needs to be.
  * To make review even harder, `CHANGE_AUTO` requires `-Wswitch` to be disabled for `OutputType`

  Fix both issues by removing `CHANGE_AUTO` and then enabling `-Wswitch` for `OutputType`

ACKs for top commit:
  promag:
    Code review ACK fa927ff884.
  laanwj:
    Code review ACK fa927ff884

Tree-SHA512: 24fd809757aa343866c94dafe9a7130b50cda4f77c97666d407f99b813f75b115a7d8e688a6bc2a737e87cba64ddd4e43f2b3c5538fd35fabb5845807bb39134
This commit is contained in:
Wladimir J. van der Laan
2020-07-02 16:02:09 +02:00
8 changed files with 35 additions and 37 deletions

View File

@@ -256,9 +256,6 @@ public:
// Get default address type.
virtual OutputType getDefaultAddressType() = 0;
// Get default change type.
virtual OutputType getDefaultChangeType() = 0;
//! Get max tx fee.
virtual CAmount getDefaultMaxTxFee() = 0;