test: Correct ineffectual WithOrVersion from transactions_tests #14855
Dropped the 0-version test as there is no version-specific behavior in transaction serialization, and if there were, does not seem this would be the place to test it.
Maybe you can weigh in on: is it necessary to do this serialization round-trip at all? Could instantiate the tx from the mtx directly.
The version is used on https://github.com/bitcoin/bitcoin/blob/master/src/primitives/transaction.h#L200
I speculate that the intention of the
The roundtrip itself is just used to convert a
It is safe to drop the 0-version test.
…nsactions_tests 75778a0 test: Correct ineffectual WithOrVersion from transactions_tests (Ben Woosley) Pull request description: `WithOrVersion` uses `|` to combine the versions, and `|` with 0 is a no-op. NicolasDorier / sipa do you recall why the version is being overridden here? Introduced in ab48c5e Last updated 81e3228 Tree-SHA512: 2aea925497bab2da973f17752410a6759d67181a57c3b12a685d184fbfcca2984c45b702ab0bd641d75e086696a0424f1bf77c5578ca765d6882dc03b42d5f9a
@MarcoFalke yes, that's why I said
Then it was refactored for having witness in PROTOCOL_VERSION + a flag to disable witness. Unsure if it was before the merge or after the merge that this was refactored, but I am now almost sure it was the initial reason behind this weird code.