mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
Merge #19396: refactor: Remove confusing OutputType::CHANGE_AUTO
fa927ff884Enable Wswitch for OutputType (MarcoFalke)faddad71f6Remove confusing OutputType::CHANGE_AUTO (MarcoFalke)fa2eb38352interfaces: 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 ACKfa927ff884. laanwj: Code review ACKfa927ff884Tree-SHA512: 24fd809757aa343866c94dafe9a7130b50cda4f77c97666d407f99b813f75b115a7d8e688a6bc2a737e87cba64ddd4e43f2b3c5538fd35fabb5845807bb39134
This commit is contained in:
@@ -1900,8 +1900,8 @@ bool DescriptorScriptPubKeyMan::SetupDescriptorGeneration(const CExtKey& master_
|
||||
desc_prefix = "wpkh(" + xpub + "/84'";
|
||||
break;
|
||||
}
|
||||
default: assert(false);
|
||||
}
|
||||
} // no default case, so the compiler can warn about missing cases
|
||||
assert(!desc_prefix.empty());
|
||||
|
||||
// Mainnet derives at 0', testnet and regtest derive at 1'
|
||||
if (Params().IsTestChain()) {
|
||||
|
||||
Reference in New Issue
Block a user