lbrycrd/test/functional/test_framework
Wladimir J. van der Laan df894fa69a
Merge #14457: test: add invalid tx templates for use in functional tests
59e387705c test: add invalid tx templates for use in functional tests (James O'Beirne)

Pull request description:

  This change adds a list of `CTransaction`-generating templates which each correspond to a specific type of invalid transaction. We then use this list to test for a wider variety of invalid tx types in `p2p_invalid_tx.py` and `feature_block.py`.

  Consolidating all invalid tx types will allow us to more easily cover all tx reject cases from a variety of tests without repeating ourselves. Validation logic doesn't differ much between mempool and block acceptance, but there *is* a difference and we should be sure we're testing both comprehensively.

  Right now, I've only added templates covering the tx reject types listed below but if this approach seems worthwhile I will expand the list to be fully comprehensive.
  ```
  bad-txns-in-belowout
  bad-txns-inputs-duplicate
  bad-txns-too-many-sigops
  bad-txns-vin-empty
  bad-txns-vout-empty
  bad-txns-vout-negative
  ```

Tree-SHA512: 05407f4a953fbd7c44c08bb49bb989cefd39a2b05ea00f5b3c92197a3f05e1b302f789e33832445734220e1c333d133aba385740b77b84139b170c583471ce20
2019-01-02 14:44:14 +01:00
..
__init__.py Rename rpc-tests directory to functional 2017-03-20 10:40:31 -04:00
address.py qa: Run more tests with wallet disabled 2018-09-25 18:08:08 -04:00
authproxy.py tests: Make it possible to run functional tests on Windows 2018-09-17 09:56:49 +08:00
bignum.py Remove unused variables and/or function calls 2017-08-28 15:18:14 +02:00
blocktools.py test: add invalid tx templates for use in functional tests 2018-11-27 17:53:53 -05:00
coverage.py Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
key.py tests: Remove compatibility code not needed now when we're on Python 3 2018-04-16 09:54:27 +02:00
messages.py Merge #14926: test: consensus: Check that final transactions are valid 2018-12-13 14:22:31 +01:00
mininode.py qa: Check specific reject reasons in feature_block 2018-11-13 11:05:24 -05:00
netutil.py tests: Replace usage of tostring() with tobytes() 2018-08-13 19:05:31 -07:00
script.py [test] functional framework: add CScript hex() for Python 3.4 2018-12-12 11:09:04 +01:00
segwit_addr.py Use BIP173 addresses in segwit.py test 2017-09-28 17:29:01 -07:00
siphash.py Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
socks5.py tests: Remove unused testing code 2018-11-07 18:07:49 +01:00
test_framework.py Merge #15026: [test] Rename rpc_timewait to rpc_timeout 2018-12-29 20:18:50 +01:00
test_node.py Compare to None with is/is not 2018-12-10 15:11:37 -05:00
util.py tests: check readability of cookie file 2018-11-24 02:32:38 +08:00