dash/test/functional/test_framework
MarcoFalke 20e1f4a8ef
Merge #13669: Tests: Cleanup create_transaction implementations
44bbceeef1 [Tests] Cleanup feature_block.py, remove unnecessary PreviousSpendableOutput object (Conor Scott)
736f941424 [Tests] Cleanup extra instances of create_transaction (Conor Scott)
157651855f [Tests] Rename create_tx and move to blocktools.py (Conor Scott)

Pull request description:

  There currently exist seven ([1](https://github.com/bitcoin/bitcoin/blob/master/test/functional/feature_cltv.py#L52-L60), [2](https://github.com/bitcoin/bitcoin/blob/master/test/functional/feature_csv_activation.py#L88-L95) [3](https://github.com/bitcoin/bitcoin/blob/master/test/functional/feature_dersig.py#L40-L48), [4](https://github.com/bitcoin/bitcoin/blob/master/test/functional/feature_nulldummy.py#L100-L108), [5](https://github.com/bitcoin/bitcoin/blob/master/test/functional/test_framework/util.py#L529-L535), [6](https://github.com/bitcoin/bitcoin/blob/master/test/functional/test_framework/blocktools.py#L120-L129), [7](https://github.com/bitcoin/bitcoin/blob/master/test/functional/feature_block.py#L1218-L1220)) 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](https://github.com/conscott/bitcoin/blob/create_tx_cleanup/test/functional/test_framework/blocktools.py#L121-L149)
  1. `create_tx_with_script`: Return transaction object spending generic tx output optionally specifying scriptSig and scriptPubKey
  2. `create_transaction`: Return transaction object spending coinbase tx
  2. `create_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](https://github.com/conscott/bitcoin/blob/master/test/functional/feature_block.py#L51-L54) object, which seems like an unnecessary layer given that every instance spends the 0 output.

Tree-SHA512: 63c6233b6f0942c81ba1ca67ea6770809b8c9409314c6d4cf8e5a3991cb9ee92b22bebe88c0dde45cd71e754eb351230c4c404b70ff118f5f43c034452ada65c
2021-07-06 20:29:31 +03:00
..
__init__.py Merge bitcoin#9956: Reorganise qa directory (#2912) 2019-05-19 23:20:34 +03:00
address.py Partial merge #8499: Add several policy limits and disable uncompressed keys for segwit scripts 2021-06-05 22:12:55 +03:00
authproxy.py Merge #12284: Remove assigned but never used local variables. Enable Travis checking for unused local variables. 2020-10-26 20:35:28 -04:00
bignum.py Merge #10781: Python cleanups 2020-01-02 22:01:29 -06:00
blocktools.py Merge #13669: Tests: Cleanup create_transaction implementations 2021-07-06 20:29:31 +03:00
coverage.py Some Dashification (#3513) 2020-06-11 11:39:04 +03:00
key.py Partial merge #8499: Add several policy limits and disable uncompressed keys for segwit scripts 2021-06-05 22:12:55 +03:00
messages.py merge #19954: Complete the BIP155 implementation and upgrade to TORv3 2021-05-29 23:24:52 +03:00
mininode.py Merge pull request #4224 from Munkybooty/backports-0.18-pr5 2021-07-03 12:33:17 -05:00
netutil.py Merge #13963: tests: Replace usage of tostring() with tobytes() 2021-07-01 16:33:23 -05:00
script.py Consensus: DIP-0020: Dash opcode updates. Remaining dip0020 opcodes (#3893) 2021-01-13 14:45:04 -06:00
siphash.py Merge bitcoin#9956: Reorganise qa directory (#2912) 2019-05-19 23:20:34 +03:00
socks5.py Merge #12987: tests/tools: Enable additional Python flake8 rules for automatic linting via Travis 2020-07-22 12:12:46 -05:00
test_framework.py Merge #13837: qa: Extract rpc_timewait as test param 2021-07-02 12:59:29 +03:00
test_node.py Merge #13916: qa: wait_for_verack by default 2021-07-06 20:29:31 +03:00
util.py Merge #13669: Tests: Cleanup create_transaction implementations 2021-07-06 20:29:31 +03:00