There currently exist seven (1, 2 3, 4, 5, 6, 7) implementations of a function called something similar to create_transaction in the functional tests, some of which are exact copies of each other.
This PR aims to clean this up into three different cases implemented in blocktools.py
create_tx_with_script: Return transaction object spending generic tx output optionally specifying scriptSig and scriptPubKeycreate_transaction: Return transaction object spending coinbase txcreate_raw_transaction: Return raw transaction (hex string) spending coinbase tx
I am not committed to any of these function names, so I'll gladly take suggestions on there.
Additionally there are some related cleanups to feature_block.py tests, specifically removing the PreviousSpendableOutput object, which seems like an unnecessary layer given that every instance spends the 0 output.