Wrap generation of randomized outpoint in tests
Summary: This also ensures that TxId is used properly.
Test Plan:
make check
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D3641