<p>This is indeed a behaviour change starting with version 23.0, released in April 2022.</p>
<p>This change was implemented in <a href="https://github.com/bitcoin/bitcoin/pull/23789" rel="nofollow noreferrer">Bitcoin Core PR #23789</a> over a concern that users of a less-common address type would immediately expose their change output. This was especially <a href="https://bitcoinops.org/en/newsletters/2021/10/06/#preparing-for-taproot-16-output-linking" rel="nofollow noreferrer">a concern for early adopters of newly introduced Taproot addresses</a>.</p>
<p>This behaviour can be overridden through the <code>changetype</code> option in case a user wants to always receive a specific output type (h/t @Murch).</p>

CC BY-SA 4.0
2024-01-14T11:14:42.223Z
2024-01-15T15:04:06.397Z
2024-01-15T15:04:06.397Z
Antoine Poinsot
<p>Using the Bitcoin Core wallet making a transaction which spends a native segwit output and pays to a p2sh-wrapped segwit output will create a p2sh-wrapped change output.</p>
<p>It is different from my expectation that the change output type would match the spent output's type. I'm using version 25.0. I believe this different was different in previous versions (such as 22.0).</p>
<p>Did the behaviour of the Bitcoin Core wallet change? And what is the purpose of matching the payment output type instead of the spent output type?</p>

CC BY-SA 4.0
2024-01-14T10:56:01.040Z
I assume the difference you make between "native segwit" and "segwit" is the latter (confusingly) actually is p2sh-wrapped segwit? Let me know if my edit doesn't reflect your original question.
Antoine Poinsot
<bitcoin-core><wallet><address><privacy><change>
Change output matches payment output type, not previous output type
david
# Change output matches payment output type, not previous output type

(Asked by: username_0 on 2024-01-14)

Using the Bitcoin Core wallet making a transaction which spends a native segwit output and pays to a p2sh-wrapped segwit output will create a p2sh-wrapped change output.

It is different from my expectation that the change output type would match the spent output's type. I'm using version 25.0. I believe this different was different in previous versions (such as 22.0).

Did the behaviour of the Bitcoin Core wallet change? And what is the purpose of matching the payment output type instead of the spent output type?

**Tags:** bitcoin-core, wallet, address, privacy, change

> **Comments:**
> **username_1**: I assume the difference you make between "native segwit" and "segwit" is the latter (confusingly) actually is p2sh-wrapped segwit? Let me know if my edit doesn't reflect your original question.  

---

## 1 answers

### Answer by username_1 on 2024-01-14. Score: 3

This is indeed a behaviour change starting with version 23.0, released in April 2022.

This change was implemented in [Bitcoin Core PR #23789](https://github.com/bitcoin/bitcoin/pull/23789) over a concern that users of a less-common address type would immediately expose their change output. This was especially [a concern for early adopters of newly introduced Taproot addresses](https://bitcoinops.org/en/newsletters/2021/10/06/#preparing-for-taproot-16-output-linking).

This behaviour can be overridden through the `changetype` option in case a user wants to always receive a specific output type (h/t @Murch).


---

