aboutsummaryrefslogtreecommitdiff
path: root/test/functional/p2p-fullblocktest.py
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2017-11-30 16:49:01 -0800
committerPieter Wuille <pieter.wuille@gmail.com>2018-01-09 15:27:55 -0800
commit57273f2b302949d4ca3511f703627b5d717be40c (patch)
tree1802905af456623f59bbe3cef222e9cc67cc6201 /test/functional/p2p-fullblocktest.py
parentcf2c0b6f5cde584d7004ff1b5b476ef54de6b74b (diff)
downloadbitcoin-57273f2b302949d4ca3511f703627b5d717be40c.tar.xz
[test] Serialize CTransaction with witness by default
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):