This test works without any changes, for Bitcoin ABC.
For Bitcoin Core, there were some changes in segwit related tests. They also had to add a new test_framework module `script_util.py` that we don't need for now.
This is a backport of [[https://github.com/bitcoin/bitcoin/pull/18788 | core#18788]] [6/15]
https://github.com/bitcoin/bitcoin/pull/18788/commits/0bd1860300b13b12a25d330ba3a93ff2d13aa379