aboutsummaryrefslogtreecommitdiff
path: root/test/functional/mining_basic.py
Commit message (Collapse)AuthorAgeFilesLines
* Change regtest block interval to match DogecoinRoss Nicoll2021-05-201-2/+3
| | | | Change regtest block interval to match Dogecoin mainnet. Note this differs from 1.14, which used special regtest values, however regtest should by default match mainnet and the server time is adjusted to make it feasible to mine blocks quickly.
* test: Add test for -blockversionMarcoFalke2020-10-261-3/+14
|
* [refactor] clarify tests by referencing p2p objects directlygzhao4082020-09-101-3/+3
| | | | | | Use object returned from add_p2p_connection to refer to p2ps. Add a test class attribute if it needs to be used across many methods. Don't use the p2p property.
* scripted-diff: Rename mininode to p2pJohn Newbery2020-08-211-1/+1
| | | | | | | -BEGIN VERIFY SCRIPT- sed -i 's/\.mininode/\.p2p/g' $(git grep -l "mininode") git mv test/functional/test_framework/mininode.py test/functional/test_framework/p2p.py -END VERIFY SCRIPT-
* test: Remove leftover comment in mining_basicMarcoFalke2020-06-081-1/+0
|
* test: pep-8 mining_basicMarcoFalke2020-06-081-10/+21
| | | | | Can be reviewed with the git options --word-diff-regex=. --ignore-all-space -U0
* [test] CScriptNum Decode Check as Unit TestsGillian Chu2020-06-031-8/+0
| | | | | | | | | 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.
* scripted-diff: Bump copyright headersMarcoFalke2020-04-161-1/+1
| | | | | | -BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
* Merge #16681: Tests: Use self.chain instead of 'regtest' in all current testsMarcoFalke2020-02-041-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1abcecc40c518a98b7d17880657ec0247abdf125 Tests: Use self.chain instead of 'regtest' in almost all current tests (Jorge Timón) Pull request description: Simply avoiding the hardcoded string in more places for consistency. It can also allow for more easily reusing tests for other chains other than regtest. Separated from #8994 . Continues #16509 . It is still not complete (ie to be complete, we need the -chain parameter in #16680 and make whether acceptnonstdtxs is allowed for that chain or not customizable for regtest [or for custom chains like in #8994 ] ). But while being incomplete like #16509 , it's quite simple to review and another step forward IMO. ACKs for top commit: Sjors: re-ACK 1abcecc. I think it's an improvement even if incomplete and if some PR's might accidentally bring "regtest" back. Subsequent improvements hopefully don't have to touch 16 files. elichai: Code review ACK 1abcecc40c518a98b7d17880657ec0247abdf125 ryanofsky: Code review ACK 1abcecc40c518a98b7d17880657ec0247abdf125. ryanofsky: Code review ACK 1abcecc40c518a98b7d17880657ec0247abdf125 Tree-SHA512: 5620de6dab235ca8bd8670d6366c7b9f04f0e3ca9c5e7f87765b38e16ed80c17d7d1630c0d5fd7c5526f070830d94dc74cc2096d8ede87dc7180ed20569509ee
| * Tests: Use self.chain instead of 'regtest' in almost all current testsJorge Timón2019-10-261-1/+1
| |
* | tests: Mark functional tests not supporting bitcoin-cli (--usecli) as suchpracticalswift2019-12-061-0/+1
|/
* scripted-diff: test: Replace connect_nodes_bi with connect_nodesMarcoFalke2019-09-171-2/+2
| | | | | | | -BEGIN VERIFY SCRIPT- sed -i --regexp-extended -e 's/connect_nodes_bi\(self.nodes,\s*(.),\s*/connect_nodes(self.nodes[\1], /g' $(git grep -l connect_nodes_bi) sed -i --regexp-extended -e 's/connect_nodes_bi(,| )/connect_nodes\1/g' $(git grep -l connect_nodes_bi) -END VERIFY SCRIPT-
* scripted-diff: test: Use py3.5 bytes::hex() methodMarcoFalke2019-03-021-24/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | -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-
* tests: remove byte.hex() to keep compatibilityAkio Nakamura2019-02-191-1/+1
| | | | | Use test_framework.util.bytes_to_hex_str() instead of bytes.hex() that new in Python 3.5, to support minimum version of Python(test).
* Merge #15383: [rpc] mining: Omit uninitialized currentblockweight, ↵MarcoFalke2019-02-151-5/+23
|\ | | | | | | | | | | | | | | | | | | | | | | currentblocktx fa178a6385 [rpc] mining: Omit uninitialized currentblockweight, currentblocktx (MarcoFalke) Pull request description: Previously we'd report "0", which could be mistaken for a valid number. E.g. the number of transactions is 0 or the block weight is 0, whatever that means. Tree-SHA512: ee94ab203a329e272211b726f4c23edec4b09c650ec363b77fd59ad9264165d73064f78ebb9e11b5c2c543b73c157752410a307655560531c7d5444d203aa0ea
| * [rpc] mining: Omit uninitialized currentblockweight, currentblocktxMarcoFalke2019-02-121-5/+23
| |
* | submitheader: more directly test missing prev block headerGregory Sanders2019-01-241-1/+1
| |
* | remove some magic mining constants in functional testsGregory Sanders2019-01-241-6/+6
|/
* [mining] segwit option must be set in GBTJohn Newbery2018-12-101-4/+7
| | | | | | | Calling getblocktemplate without the segwit rule specified is most likely a client error, since it results in lower fees for the miner. Prevent this client error by failing getblocktemplate if called without the segwit rule specified.
* Add CScriptNum decode python implementation in functional suiteGregory Sanders2018-11-291-2/+10
|
* rpc: Correctly name argumentsJon Layton2018-11-131-1/+2
|
* Changed functional tests which do not require wallets to run withoutsanket17292018-09-171-5/+2
| | | | | | skipping .Addreses #14216. Changed get_deterministic_priv_key() to a named tuple
* Merge #13983: rpc: Return more specific reject reason for submitblockMarcoFalke2018-09-131-2/+19
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | fa6ab8ada1 rpc: Return more specific reject reason for submitblock (MarcoFalke) Pull request description: The second commit in #13439 made the `TODO` in the first commit impossible to solve. The meaning of `fNewBlock` changed from "This is the first time we process this block" to "We are about to write the new *valid* block". So whenever `fNewBlock` is true, the block was valid. And whenever the `fNewBlock` is false, the block is either valid or invalid. If it was valid and not new, we know it is a `"duplicate"`. In all other cases, the `BIP22ValidationResult()` will return the reason why it is invalid. Tree-SHA512: 4b6edf7a912339c3acb0fccfabbdd6d812a0321fb1639c244c2714e58dc119aa2b8c6bf8f7d61ea609a1b861bbc23f920370fcf989c48452721e259a8ce93d24
| * rpc: Return more specific reject reason for submitblockMarcoFalke2018-08-151-2/+19
| |
* | qa: Run all tests even if wallet is not compiledMarcoFalke2018-09-101-0/+3
| |
* | qa: Use named args in some testsMarcoFalke2018-08-291-1/+1
|/
* qa: Add tests for submitheaderMarcoFalke2018-08-131-5/+74
|
* tests: Use explicit importspracticalswift2018-08-131-1/+1
|
* Update copyright headers to 2018DrahtBot2018-07-271-1/+1
|
* [tests] Rename misc functional tests.Anthony Towns2018-01-251-0/+135