In https://github.com/bitcoin/bitcoin/commit/7c4bf779e8b74e474551982a24f5acc265293abd , @jl2012 updated getrawtransaction()
to return the witness data for transaction inputs spending P2WPK and P2WSH.
bitcoin-tx doesn’t call into this function and instead calls TxToUniv()
in core_write.cpp
, so bitcoin-tx calls don’t return witness data.
This PR adds code to TxToUniv()
to return witness data.
The full fix is to have getrawtransaction()
call into TxToUniv()
so there isn’t duplicate code. I’ll open a separate PR for that change.