This is a backport of core#18027 [1/4]
https://github.com/bitcoin/bitcoin/pull/18027/commits/9e7b23b73387600d175aff8bd5e6624dd51f86e7
Note: the test was intentionnaly skipped in D8104. It does not work with Bitcoin ABC (error message: `TX decode failed CDataStream::read(): end of data: iostream error (-22)`