From d280617bf569f84457eaea546541dc74c67cd1e4 Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Wed, 20 Jun 2018 16:03:25 -0400 Subject: [qa] Add a test for merkle proof malleation --- test/functional/test_framework/messages.py | 46 ++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) (limited to 'test/functional/test_framework') diff --git a/test/functional/test_framework/messages.py b/test/functional/test_framework/messages.py index ca2e425bd6..df8d424d01 100755 --- a/test/functional/test_framework/messages.py +++ b/test/functional/test_framework/messages.py @@ -841,6 +841,52 @@ class BlockTransactions(): def __repr__(self): return "BlockTransactions(hash=%064x transactions=%s)" % (self.blockhash, repr(self.transactions)) +class CPartialMerkleTree(): + def __init__(self): + self.nTransactions = 0 + self.vHash = [] + self.vBits = [] + self.fBad = False + + def deserialize(self, f): + self.nTransactions = struct.unpack("