Page MenuHomePhabricator

D2086.id5889.diff
No OneTemporary

D2086.id5889.diff

diff --git a/test/functional/abc-p2p-fullblocktest.py b/test/functional/abc-p2p-fullblocktest.py
--- a/test/functional/abc-p2p-fullblocktest.py
+++ b/test/functional/abc-p2p-fullblocktest.py
@@ -163,6 +163,7 @@
# Now that we added a bunch of transaction, we need to recompute
# the merkle root.
+ make_conform_to_ctor(block)
block.hashMerkleRoot = block.calc_merkle_root()
# Check that the block size is what's expected
@@ -211,6 +212,7 @@
block = self.blocks[block_number]
self.add_transactions_to_block(block, new_transactions)
old_sha256 = block.sha256
+ make_conform_to_ctor(block)
block.hashMerkleRoot = block.calc_merkle_root()
block.solve()
# Update the internal state just like in next_block
diff --git a/test/functional/test_framework/blocktools.py b/test/functional/test_framework/blocktools.py
--- a/test/functional/test_framework/blocktools.py
+++ b/test/functional/test_framework/blocktools.py
@@ -28,6 +28,14 @@
return block
+def make_conform_to_ctor(block):
+ for tx in block.vtx:
+ pad_tx(tx)
+ tx.rehash()
+ block.vtx = [block.vtx[0]] + \
+ sorted(block.vtx[1:], key=lambda tx: tx.get_id())
+
+
def serialize_script_num(value):
r = bytearray(0)
if value == 0:

File Metadata

Mime Type
text/plain
Expires
Thu, Feb 6, 17:31 (18 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5082780
Default Alt Text
D2086.id5889.diff (1 KB)

Event Timeline