diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2017-10-11 20:25:18 -0700 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2017-11-06 19:29:20 -0800 |
commit | d618458184742b15a7ab0349127ede7a2946a182 (patch) | |
tree | 5c08e3162c6ac3f53dd8362fe0ae1b505c5186ad /test/functional/zmq_test.py | |
parent | 4bd89210a1484d00abba27c50ac4c07dcc05c2e0 (diff) |
Have SegWit active by default
Diffstat (limited to 'test/functional/zmq_test.py')
-rwxr-xr-x | test/functional/zmq_test.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/functional/zmq_test.py b/test/functional/zmq_test.py index 165f9192dd..fa30318416 100755 --- a/test/functional/zmq_test.py +++ b/test/functional/zmq_test.py @@ -8,10 +8,12 @@ import os import struct from test_framework.test_framework import BitcoinTestFramework, SkipTest +from test_framework.mininode import CTransaction from test_framework.util import (assert_equal, bytes_to_hex_str, hash256, ) +from io import BytesIO class ZMQSubscriber: def __init__(self, socket, topic): @@ -93,7 +95,10 @@ class ZMQTest (BitcoinTestFramework): # Should receive the coinbase raw transaction. hex = self.rawtx.receive() - assert_equal(hash256(hex), txid) + tx = CTransaction() + tx.deserialize(BytesIO(hex)) + tx.calc_sha256() + assert_equal(tx.hash, bytes_to_hex_str(txid)) # Should receive the generated block hash. hash = bytes_to_hex_str(self.hashblock.receive()) |