2

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?

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. Jan 14 at 10:56

1 Answer 1

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 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.

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

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.