Skip to content

Commit

Permalink
[qa] Fix bug in mininode witness deserialization
Browse files Browse the repository at this point in the history
Also improve tx printing
  • Loading branch information
sdaftuar authored and sipa committed Oct 4, 2016
1 parent 6aa28ab commit f5b9b8f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions qa/rpc-tests/test_framework/mininode.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ def deserialize(self, f):
else:
self.vout = deser_vector(f, CTxOut)
if flags != 0:
self.wit.vtxinwit = [CTxInWitness()]*len(self.vin)
self.wit.vtxinwit = [CTxInWitness() for i in range(len(self.vin))]
self.wit.deserialize(f)
self.nLockTime = struct.unpack("<I", f.read(4))[0]
self.sha256 = None
Expand Down Expand Up @@ -518,8 +518,8 @@ def is_valid(self):
return True

def __repr__(self):
return "CTransaction(nVersion=%i vin=%s vout=%s nLockTime=%i)" \
% (self.nVersion, repr(self.vin), repr(self.vout), self.nLockTime)
return "CTransaction(nVersion=%i vin=%s vout=%s wit=%s nLockTime=%i)" \
% (self.nVersion, repr(self.vin), repr(self.vout), repr(self.wit), self.nLockTime)


class CBlockHeader(object):
Expand Down

0 comments on commit f5b9b8f

Please sign in to comment.