Sebastian Falbesoner
5fa34951ea
test: avoid unneeded block header hash -> integer conversions
2025-07-17 12:45:39 +02:00
Sebastian Falbesoner
23be0ec2f0
test: rename CBlockHeader .rehash()/.sha256 -> .hash_int for consistency
...
Note that we unfortunately can't use a scripted diff here, as the
`sha256` symbol is also used for other instances (e.g. as function
in hashlib, or in the `UTXO` class in p2p_segwit.py).
2025-07-17 11:59:10 +02:00
Sebastian Falbesoner
8b09cc350a
test: remove bare CBlockHeader .rehash()/.calc_sha256() calls
...
Since the previous commit, CBlockHeader/CBlock object calls to the
methods `.rehash()` and `.calc_sha256()` are effectively no-ops
if the returned value is not used, so we can just remove them.
2025-07-17 11:59:09 +02:00
MarcoFalke
fa9cf38ab6
scripted-diff: test: Rename send_message to send_without_ping
...
send_message only drops the bytes in a buffer and a sync is needed to
avoid intermittent test issues. Change the name of the method to make
this more apparent during review.
-BEGIN VERIFY SCRIPT-
sed -i 's/send_message(/send_without_ping(/g' $( git grep -l 'send_message(' )
-END VERIFY SCRIPT-
2025-03-14 12:45:20 +01:00
MarcoFalke
fa4356717d
test: Prefer send_and_ping over send_message+sync_with_ping
...
Also, add an explanation for the preference in the docs.
2025-03-14 12:44:34 +01: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
MarcoFalke
fae0b21e6c
test: Combine sync_send_with_ping and sync_with_ping
2023-09-05 12:11:10 +02:00
John Newbery
16730b64bb
[net processing] Only advertise support for version 2 compact blocks
...
Subsequent commits will remove support.
2022-05-15 15:37:56 -04:00
MarcoFalke
facc352648
test: Implicitly sync after generate*, unless opted out
2021-10-29 13:34:52 +02:00
Samuel Dobson
eb02dbba3c
Use self.generate not node.generate throughout tests
2021-10-06 12:18:33 +13:00
Niklas Gögge
18c5b23a0f
[test] Test that -blocksonly nodes still serve compact blocks.
2021-09-28 22:11:30 +02:00
Niklas Gögge
a79ad65fc2
[test] Test that getdata(CMPCT) is still sent on regular low bandwidth connections.
...
Co-authored-by: Amiti Uttarwar <amiti@uttarwar.org >
2021-09-28 22:11:30 +02:00
Niklas Gögge
5e231c116b
[test] Test that -blocksonly nodes do not send getdata(CMPCT) on a low bandwidth connection.
...
Co-authored-by: Amiti Uttarwar <amiti@uttarwar.org >
2021-09-28 22:11:30 +02:00
Niklas Gögge
5bf6587457
[test] Test that -blocksonly nodes do not request high bandwidth mode.
...
Co-authored-by: Amiti Uttarwar <amiti@uttarwar.org >
2021-09-28 22:11:30 +02:00