diff options
| author | Suhas Daftuar <[email protected]> | 2016-09-17 22:11:00 -0400 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2016-10-04 19:10:49 +0200 |
| commit | f5b9b8f437c040205896ad0d7a6656efa08b5601 (patch) | |
| tree | 45bf7ac6c8837f58becb3f50ac662ef6b2e6e7ee | |
| parent | Use cmpctblock type 2 for segwit-enabled transfer (diff) | |
| download | discoin-f5b9b8f437c040205896ad0d7a6656efa08b5601.tar.xz discoin-f5b9b8f437c040205896ad0d7a6656efa08b5601.zip | |
[qa] Fix bug in mininode witness deserialization
Also improve tx printing
| -rwxr-xr-x | qa/rpc-tests/test_framework/mininode.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/qa/rpc-tests/test_framework/mininode.py b/qa/rpc-tests/test_framework/mininode.py index 88a3b7e0f..34beb0d30 100755 --- a/qa/rpc-tests/test_framework/mininode.py +++ b/qa/rpc-tests/test_framework/mininode.py @@ -452,7 +452,7 @@ class CTransaction(object): 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 @@ -518,8 +518,8 @@ class CTransaction(object): 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): |