aboutsummaryrefslogtreecommitdiff
path: root/test/functional/p2p-fullblocktest.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/p2p-fullblocktest.py')
-rwxr-xr-xtest/functional/p2p-fullblocktest.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/functional/p2p-fullblocktest.py b/test/functional/p2p-fullblocktest.py
index 010dbdccad..8d85a4a934 100755
--- a/test/functional/p2p-fullblocktest.py
+++ b/test/functional/p2p-fullblocktest.py
@@ -36,12 +36,15 @@ class CBrokenBlock(CBlock):
self.vtx = copy.deepcopy(base_block.vtx)
self.hashMerkleRoot = self.calc_merkle_root()
- def serialize(self):
+ def serialize(self, with_witness=False):
r = b""
r += super(CBlock, self).serialize()
r += struct.pack("<BQ", 255, len(self.vtx))
for tx in self.vtx:
- r += tx.serialize()
+ if with_witness:
+ r += tx.serialize_with_witness()
+ else:
+ r += tx.serialize_without_witness()
return r
def normal_serialize(self):