This allows us to easily create transaction chains for package
validation. We don't test_accept if submit=false because we want to be
able to make transactions that wouldn't pass ATMP (i.e. a child
transaction in a package would fail due to missing inputs).
This is a backport of core#20833 [3/13]
https://github.com/bitcoin/bitcoin/pull/20833/commits/cd9a11ac96c01e200d0086b2f011f4a614f5a705
Depends on D12106