MOVEONLY; no change in behavior. Rename because there is another helper
function in chain_transaction in test_framework.util.py
This is a backport of core#21800 [6/9]
https://github.com/bitcoin/bitcoin/pull/21800/commits/f8253d69d6f02850995a11eeb71fedc22e6f6575
Notes:
- Commit backported out of order (refactorings first)
- due to missing backports, we don't have the `tx_from_hex` helper function