aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework/blocktools.py
AgeCommit message (Collapse)Author
2020-11-03test: Fix deser issue in create_blockMarcoFalke
Without the fix a hex-string can not be parsed: File "./test/functional/test_framework/blocktools.py", line 82, in create_block txo.deserialize(io.BytesIO(tx)) TypeError: a bytes-like object is required, not 'str' Also, remove io import and repace it with our FromHex() helper
2020-11-01Use separate watchonly wallet for multisig in feature_nulldummy.pyAndrew Chow
Create and import the multisig into a separate watchonly wallet so that feature_nulldummy.py works with descriptor wallets. blocktools.create_raw_transaction is also updated to use multiple nodes and wallets and to use PSBT so that this test passes.
2020-10-16Merge #19401: QA: Use GBT to get block versions correctMarcoFalke
d438d609cd64fe532d94e45000495de93ef99aa6 QA: Use GBT to get block versions correct (Luke Dashjr) 1df2cd1c8f468bd7a5b1335a46ccea28fbddaacb QA: blocktools: Accept block template to create_block (Luke Dashjr) Pull request description: The goal here is to decouple unrelated tests from the details of block versions. Currently, these tests are forcing specific versions of blocks for no real reason. ACKs for top commit: fjahr: re-ACK d438d609cd64fe532d94e45000495de93ef99aa6 benthecarman: ACK d438d60 Tree-SHA512: 523b1cd4dac8d65c88432e126ce7f60df96ca4b94f7ecc8e83ba4ffbade23e2afe7055fdf586ce3c195a533f2004e63fff83add4267b39473a581c9f1c6d5340
2020-10-12tests: functional tests for Schnorr/Taproot/TapscriptPieter Wuille
A large functional test is added that automatically generates random transactions which exercise various aspects of the new rules, and verifies they are accepted into the mempool (when appropriate), and correctly accepted/rejected in (Python-constructed) blocks. Includes sighashing code and many tests by Johnson Lau. Includes a test by Matthew Zipkin. Includes several tests and improvements by Greg Sanders.
2020-09-12QA: blocktools: Accept block template to create_blockLuke Dashjr
2020-06-03[test] CScriptNum Decode Check as Unit TestsGillian Chu
Migrates the CScriptNum decode tests into a unit test, and moved some changes made in #14816. Made possible by the integration of test_framework unit testing in #18576. Further extends the original test with larger ints, similar to the scriptnum_tests.cpp file. Adds test to blocktools.py testing fn create_coinbase() with CScriptNum decode.
2019-07-09test: Properly serialize BIP34 coinbase heightMarcoFalke
2019-03-02scripted-diff: test: Remove brackets after assertMarcoFalke
-BEGIN VERIFY SCRIPT- sed -i --regexp-extended -e 's/assert ?\((.+)\)(( )*)?(#.*)?$/assert \1\3\3\4/g' $(git grep -l --extended-regexp 'assert ?\(' test) -END VERIFY SCRIPT-
2019-03-02scripted-diff: test: Use py3.5 bytes::hex() methodMarcoFalke
-BEGIN VERIFY SCRIPT- sed -i -e "s/def bytes_to_hex_str/def b_2_x/g" $(git grep -l bytes_to_hex_str) export RE_B_0="[^()]*" # match no bracket export RE_B_1="${RE_B_0}\(${RE_B_0}\)${RE_B_0}" # match exactly one () export RE_B_2="${RE_B_0}\(${RE_B_1}\)${RE_B_0}" # match wrapped (()) export RE_M="(b2x|bytes_to_hex_str)\(((${RE_B_0}|${RE_B_1}|${RE_B_2})*)\)" sed -i --regexp-extended -e "s/${RE_M}/\2.hex()/g" $(git grep -l -E '(b2x|bytes_to_hex_str)') sed -i --regexp-extended -e "/ +bytes_to_hex_str( as b2x)?,/d" $(git grep -l bytes_to_hex_str) sed -i --regexp-extended -e "s/ +bytes_to_hex_str( as b2x)?,//g" $(git grep -l bytes_to_hex_str) sed -i --regexp-extended -e "s/, bytes_to_hex_str( as b2x)?//g" $(git grep -l bytes_to_hex_str) export RE_M="(binascii\.)?hexlify\(((${RE_B_0}|${RE_B_1}|${RE_B_2})*)\).decode\(${RE_B_0}\)" sed -i --regexp-extended -e "s/${RE_M}/\2.hex()/g" $(git grep -l hexlify -- ':(exclude)share') sed -i --regexp-extended -e "/from binascii import hexlify$/d" $(git grep -l hexlify -- ':(exclude)share') sed -i --regexp-extended -e "s/(from binascii import) .*hexlify/\1 unhexlify/g" $(git grep -l hexlify -- ':(exclude)share') sed -i -e 's/ignore-names "/ignore-names "b_2_x,/g' ./test/lint/lint-python-dead-code.sh -END VERIFY SCRIPT-
2019-02-12[rpc] mining: Omit uninitialized currentblockweight, currentblocktxMarcoFalke
2019-01-08Merge #15059: test: Add basic test for BIP34Wladimir J. van der Laan
fab17e8272f5f70213f186809479ee7a75898b1d test: Add basic test for BIP34 (MarcoFalke) Pull request description: BIP34 was disabled for testing, which explains why it had no test. Fix that by enabling it and adding a test. Tree-SHA512: 9cb5702d474117ce6420226eb93ee09d6fb5fc856fabc8b67abe56a088cd727674e0e5462000e1afa83b911374036f90abdbdde56a8c236a75572ed47e10a00f
2018-12-29test: Add basic test for BIP34MarcoFalke
2018-11-27test: add invalid tx templates for use in functional testsJames O'Beirne
Add templates for easily constructing different kinds of invalid transactions and use them in feature_block and p2p_invalid_tx.
2018-10-25Fix typo in test_framework/blocktoolsMeshCollider
2018-09-04Fix typos reported by codespellpracticalswift
2018-08-09qa: blocktools enforce named args for amountMarcoFalke
2018-08-09[Tests] Cleanup extra instances of create_transactionConor Scott
2018-08-09[Tests] Rename create_tx and move to blocktools.pyConor Scott
2018-07-27Update copyright headers to 2018DrahtBot
2018-04-20[tests] tidy up blocktools.pyJohn Newbery
Moves function comments to docstrings, and moves the module-level constant to the top of the file.
2018-04-20[tests] Fix flake8 warnings in blocktools.pyJohn Newbery
2018-04-20[doc][trivial] no retargeting in regtest modeJesse Cohen
2018-02-17scripted-diff: change signrawtransaction to signrawtransactionwithwallet in ↵Andrew Chow
tests -BEGIN VERIFY SCRIPT- sed -i 's/\<signrawtransaction\>/signrawtransactionwithwallet/g' test/functional/*.py sed -i 's/\<signrawtransaction\>/signrawtransactionwithwallet/g' test/functional/test_framework/*.py -END VERIFY SCRIPT-
2018-02-16scripted-diff: validateaddress to getaddressinfo in testsAndrew Chow
Change all instances of validateaddress to getaddressinfo since it seems that no test actually uses validateaddress for actually validating addresses. -BEGIN VERIFY SCRIPT- find ./test/functional -path '*py' -not -path ./test/functional/wallet_disable.py -not -path ./test/functional/rpc_deprecated.py -not -path ./test/functional/wallet_address_types.py -exec sed -i'' -e 's/validateaddress/getaddressinfo/g' {} \; -END VERIFY SCRIPT-
2018-01-15Merge #11796: [tests] Functional test naming conventionWladimir J. van der Laan
5fecd84 [tests] Remove redundant import in blocktools.py test (Anthony Towns) 9b20bb4 [tests] Check tests conform to naming convention (Anthony Towns) 7250b4e [tests] README.md nit fixes (Anthony Towns) 82b2712 [tests] move witness util functions to blocktools.py (John Newbery) 1e10854 [tests] [docs] update README for new test naming scheme (John Newbery) Pull request description: Splitting #11774 into two parts -- this part updates the README with the proposed naming convention, and adds some checks to test_runner.py that the number of tests violating the naming convention doesn't increase too much. Idea is this part of the change should not introduce merge conflicts or require much rebasing, so reviews of the complicated bits won't become invalidated too often; while the second part will just be file renames, which will require regular rebasing and will introduce merge conflicts with pending PRs, but can be merged later, and should also be much easier to review, since it will only include relatively trivial changes. Tree-SHA512: b96557d41714addbbfe2aed62fb5a48639eaeb1eb3aba30ac1b3a86bb3cb8d796c6247f9c414c4695c4bf54c0ec9968ac88e2f88fb62483bc1a2f89368f7fc80
2018-01-03[tests] Remove redundant import in blocktools.py testAnthony Towns
2018-01-03Increment MIT Licence copyright header year on files modified in 2017Akira Takizawa
2017-10-10[tests] move witness util functions to blocktools.pyJohn Newbery
This avoids importing from segwit.py to bumpfee.py
2017-04-20Tests: Refactor to create witness script creation functionJimmy Song
* Refactor blocktools.py so that witness script creation is its own function * Changed p2p-segwit to use new function
2017-03-20Rename rpc-tests directory to functionalJohn Newbery