Commit graph

80 commits

Author SHA1 Message Date
ivanlele
aa41e29f97
Merge 3a29ff5dea into merged_master (Bitcoin PR bitcoin/bitcoin#30463) 2026-03-09 16:54:19 +00:00
ivanlele
62e3eef45b
Merge 3c88eac28e into merged_master (Bitcoin PR bitcoin/bitcoin#29736) 2026-02-18 16:50:21 +00:00
Byron Hambly
2e41574d5a Merge ecb20563b6 into merged_master (Bitcoin PR bitcoin/bitcoin#28123) 2025-07-04 18:23:38 +02:00
Byron Hambly
9b1ff12050 Merge 79954903b2 into merged_master (Bitcoin PR bitcoin/bitcoin#27620) 2025-07-03 08:57:49 +02:00
Byron Hambly
a81ae75df3 Merge b22408df16 into merged_master (Bitcoin PR bitcoin/bitcoin#27603) 2025-06-27 11:42:32 +02:00
Byron Hambly
b4405ba453 Merge e9262ea32a into merged_master (Bitcoin PR bitcoin/bitcoin#26750) 2025-03-31 16:37:52 +02:00
Byron Hambly
ca0a68b350
Merge UP TO 551c8e9526 into merged_master (UP TO bitcoin/bitcoin#26349)
Includes FIXMEs for a few functional tests
2025-02-05 09:50:17 +02:00
James Dorfman
c40923460a Fix test/functional/mining_basic which broke in merge of bitcoin/bitcoin#24753 in 372f1a3c25.
Please review the last merge (not this commit) carefully. The bitcoin merge of bitcoin/bitcoin#24753
did not lead to any changes in the mining_basic functional test, so it's possible I made a mistake
which caused this test to be affected.
2024-07-29 15:23:45 +00:00
Hennadii Stepanov
a0473442d1
scripted-diff: Add __file__ argument to BitcoinTestFramework.init()
-BEGIN VERIFY SCRIPT-
sed -i -e 's/\s*().main\s*()/(__file__).main()/' $(git ls-files test/functional/*.py)
sed -i -e 's/def __init__(self)/def __init__(self, test_file)/' test/functional/test_framework/test_framework.py
-END VERIFY SCRIPT-
2024-07-16 22:06:47 +01:00
Sergi Delgado Segura
c4f857cc30 test: Extends wait_for_getheaders so a specific block hash can be checked
Previously, `wait_for_getheaders` would check whether a node had received **any**
getheaders message. This implied that, if a test needed to check for a specific block
hash within a headers message, it had to make sure that it was checking the desired message.
This normally involved having to manually clear `last_message`. This method, apart from being
too verbose, was error prone, given an undesired `getheaders` would make tests pass.

This adds the ability to check for a specific block_hash within the last `getheaders` message.
2024-04-04 13:36:45 +02:00
Byron Hambly
b59e244da3
lint: fix issues from lint-python.sh 2023-09-01 16:04:39 +02:00
Luke Dashjr
5e3e83b005 RPC/Mining: Document template_request better for getblocktemplate 2023-07-22 01:29:11 +00:00
Sebastian Falbesoner
bbbb89d238 test: miner: add coverage for -blockmintxfee setting
Co-authored-by: glozow <gloriajzhao@gmail.com>
2023-07-07 15:56:24 +02:00
Byron Hambly
1df9b75777 Merge e00e990606 into merged_master (Bitcoin PR bitcoin/bitcoin#23978) 2023-06-15 07:29:23 +00:00
Byron Hambly
bd68371fb6 Merge ffdab41f94 into merged_master (Bitcoin PR bitcoin/bitcoin#23474) 2023-05-26 10:32:04 +00:00
Byron Hambly
af3fe60b69 Merge 94db963de5 into merged_master (Bitcoin PR bitcoin/bitcoin#23300) 2023-05-17 13:44:36 +00:00
kevkevin
a7b46a1fea
test: added coverage to mining_basic.py
Included a test that checks if we call submitblock with
block.vtx.empty() then it throws an rpc deserialization error, currently
we only test if !block.vtx->IsCoinBase() throws an rpc deserialization
error
2023-05-10 07:50:46 -05:00
James Dorfman
ae89c4bc51 Merge a5d00d4baf into merged_master (Bitcoin PR bitcoin/bitcoin#22788) 2023-04-21 04:02:55 +00:00
Byron Hambly
e7704c0b25 Merge 38975eccd4 into merged_master (Bitcoin PR bitcoin/bitcoin#22229) 2023-04-10 10:17:32 +00:00
James Dorfman
17e6efe7fe Merge 5d83e7d714 into merged_master (Bitcoin PR bitcoin/bitcoin#21090)
We comment out a newly-added assert from the Bitcoin
side, because it's unclear how to replicate it
correctly in Elements.

Co-authored-by: Glenn Willen <gwillen@nerdnet.org>
2023-03-22 01:11:20 +00:00
Hennadii Stepanov
306ccd4927
scripted-diff: Bump copyright headers
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-

Commits of previous years:
- 2021: f47dda2c58
- 2020: fa0074e2d8
- 2019: aaaaad6ac9
2022-12-24 23:49:50 +00:00
MacroFake
fafc96aaf4
test: Test year 2106 block timestamps
* Use maximum timestamp in getblocktemplate test
* Mine block with maximum timestamp and MTP in blockchain test
2022-10-20 14:45:50 +02:00
Sebastian Falbesoner
7746606cfa test: use MiniWallet for mining_basic.py
This test can now be run even with the Bitcoin Core wallet disabled.
2022-01-04 19:39:23 +01:00
MarcoFalke
fac23c2114
scripted-diff: Bump copyright headers
The previous diff touched most files in ./test/, so bump the headers to
avoid having to touch them again for a bump later.

-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./test/
-END VERIFY SCRIPT-
2021-11-10 11:10:24 +01:00
MarcoFalke
facc352648
test: Implicitly sync after generate*, unless opted out 2021-10-29 13:34:52 +02:00
MarcoFalke
fa0b916971
scripted-diff: Use generate* from TestFramework
-BEGIN VERIFY SCRIPT-
 sed --regexp-extended -i \
     's/((self\.)?(nodes\[[^]]+\]|[a-z_]*(wallet|node)[0-9a-z_]*))\.(generate(|toaddress|block|todescriptor)(\(|, ))/self.\5\1, /g' \
     $(git grep -l generate ./test | grep -v 'test_framework/' | grep -v 'feature_rbf')
-END VERIFY SCRIPT-
2021-09-02 10:34:35 +02:00
fanquake
68faa87881
test: use f-strings in mining_*.py tests 2021-08-18 12:39:20 +08:00
Dhruv Mehta
eba5b1cd64 [test] remove or move tests using -segwitheight=-1 2021-07-07 22:12:04 -07:00
Andrew Poelstra
10ea7f1e54 Merge 83363f7b62 into merged_master (Bitcoin PR #20167) 2020-12-01 17:32:41 +00:00
Andrew Poelstra
6f267e338a Merge 47fc883106 into merged_master (Bitcoin PR #19967) 2020-12-01 14:36:58 +00:00
Andrew Poelstra
52c2d8e525 Merge 78f912c901 into merged_master (Bitcoin PR #19804) 2020-11-29 21:58:22 +00:00
Andrew Poelstra
66ad009d69 Merge e80e5b3e4f into merged_master (Bitcoin PR #19760) 2020-11-28 13:25:26 +00:00
Andrew Poelstra
511c24864c Merge 45a6811d36 into merged_master (Bitcoin PR #19206) 2020-11-26 01:09:03 +00:00
Andrew Poelstra
d5082ffa37 Merge 39afe5b1c6 into merged_master (Bitcoin PR #19082) 2020-11-26 01:08:58 +00:00
Andrew Poelstra
fd37b7c5d6 Merge 54f812d9d2 into merged_master (Bitcoin PR #18673) 2020-11-26 01:08:23 +00:00
Andrew Poelstra
11487538e9 Merge df2b743759 into merged_master (Bitcoin PR #17675) 2020-11-14 16:51:55 +00:00
Andrew Poelstra
b24be4b1a7 Merge 59c138d2f1 into merged_master (Bitcoin PR #16898) 2020-11-09 21:20:27 +00:00
Andrew Poelstra
67d718b048 Merge a74d588f21 into merged_master (Bitcoin PR #14954) 2020-10-27 22:32:24 +00:00
MarcoFalke
fa9b48549c
test: Add test for -blockversion 2020-10-26 16:31:25 +01:00
Prayank
4b16c61461 scripted-diff: test: Replace uses of (dis)?connect_nodes global
-BEGIN VERIFY SCRIPT-

 # max-depth=0 excludes test/functional/test_framework/...
 FILES=$(git grep -l --max-depth 0 "connect_nodes" test/functional)

 # Replace (dis)?connect_nodes(self.nodes[a], b) with self.(dis)?connect_nodes(a, b)
 sed -i 's/\b\(dis\)\?connect_nodes(self\.nodes\[\(.*\)\]/self.\1connect_nodes(\2/g' $FILES

 # Remove imports in the middle of a line
 sed -i 's/\(dis\)\?connect_nodes, //g' $FILES
 sed -i 's/, \(dis\)\?connect_nodes//g' $FILES

 # Remove imports on a line by themselves
 sed -i '/^\s*\(dis\)\?connect_nodes,\?$/d' $FILES
 sed -i '/^from test_framework\.util import connect_nodes$/d' $FILES

-END VERIFY SCRIPT-

Co-authored-by: Elliott Jin <elliott.jin@gmail.com>
2020-10-20 00:42:00 -07:00
gzhao408
784f757994 [refactor] clarify tests by referencing p2p objects directly
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.
2020-09-10 07:37:14 -07:00
John Newbery
85165d4332 scripted-diff: Rename mininode to p2p
-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-
2020-08-21 15:52:20 +01:00
MarcoFalke
fa98e10d5e
test: Remove leftover comment in mining_basic 2020-06-08 08:10:37 -04:00
MarcoFalke
faedb50d89
test: pep-8 mining_basic
Can be reviewed with the git options
--word-diff-regex=. --ignore-all-space  -U0
2020-06-08 08:10:23 -04:00
Gillian Chu
7daffc6a90 [test] CScriptNum Decode Check as Unit Tests
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.
2020-06-03 07:18:01 -07:00
MarcoFalke
fa488f131f
scripted-diff: Bump copyright headers
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-
2020-04-16 13:33:09 -04:00
MarcoFalke
f32564f0a7
Merge #16681: Tests: Use self.chain instead of 'regtest' in all current tests
1abcecc40c 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 1abcecc40c
  ryanofsky:
    Code review ACK 1abcecc40c.
  ryanofsky:
    Code review ACK 1abcecc40c

Tree-SHA512: 5620de6dab235ca8bd8670d6366c7b9f04f0e3ca9c5e7f87765b38e16ed80c17d7d1630c0d5fd7c5526f070830d94dc74cc2096d8ede87dc7180ed20569509ee
2020-02-04 20:55:26 +00:00
practicalswift
993e38a4e2 tests: Mark functional tests not supporting bitcoin-cli (--usecli) as such 2019-12-06 14:40:28 +00:00
Jorge Timón
1abcecc40c
Tests: Use self.chain instead of 'regtest' in almost all current tests 2019-10-26 13:24:39 +02:00
MarcoFalke
fa3b9ee8b2
scripted-diff: test: Replace connect_nodes_bi with connect_nodes
-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-
2019-09-17 13:08:21 -04:00