aboutsummaryrefslogtreecommitdiff
path: root/test/functional/p2p_compactblocks.py
diff options
context:
space:
mode:
authorSebastian Falbesoner <sebastian.falbesoner@gmail.com>2021-06-16 00:32:18 +0200
committerSebastian Falbesoner <sebastian.falbesoner@gmail.com>2021-06-21 14:30:03 +0200
commita79396fe5f8f81c78cf84117a87074c6ff6c9d95 (patch)
tree6d5a3a187d6968bd1c5236f1b20bb5ba7759628e /test/functional/p2p_compactblocks.py
parent2ce7b47958c4a10ba20dc86c011d71cda4b070a5 (diff)
downloadbitcoin-a79396fe5f8f81c78cf84117a87074c6ff6c9d95.tar.xz
test: remove `ToHex` helper, use .serialize().hex() instead
Diffstat (limited to 'test/functional/p2p_compactblocks.py')
-rwxr-xr-xtest/functional/p2p_compactblocks.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/test/functional/p2p_compactblocks.py b/test/functional/p2p_compactblocks.py
index 3c771df0aa..6b8e2b3050 100755
--- a/test/functional/p2p_compactblocks.py
+++ b/test/functional/p2p_compactblocks.py
@@ -34,7 +34,6 @@ from test_framework.messages import (
NODE_NETWORK,
P2PHeaderAndShortIDs,
PrefilledTransaction,
- ToHex,
calculate_shortid,
msg_block,
msg_blocktxn,
@@ -62,7 +61,10 @@ from test_framework.script import (
OP_TRUE,
)
from test_framework.test_framework import BitcoinTestFramework
-from test_framework.util import assert_equal, softfork_active
+from test_framework.util import (
+ assert_equal,
+ softfork_active,
+)
# TestP2PConn: A peer we use to send messages to bitcoind, and store responses.
class TestP2PConn(P2PInterface):
@@ -715,9 +717,9 @@ class CompactBlocksTest(BitcoinTestFramework):
[l.clear_block_announcement() for l in listeners]
- # ToHex() won't serialize with witness, but this block has no witnesses
- # anyway. TODO: repeat this test with witness tx's to a segwit node.
- node.submitblock(ToHex(block))
+ # serialize without witness (this block has no witnesses anyway).
+ # TODO: repeat this test with witness tx's to a segwit node.
+ node.submitblock(block.serialize().hex())
for l in listeners:
l.wait_until(lambda: "cmpctblock" in l.last_message, timeout=30)