aboutsummaryrefslogtreecommitdiff
path: root/test/functional/zmq_test.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2017-11-07 17:03:00 -0500
committerMarcoFalke <falke.marco@gmail.com>2017-11-07 17:05:46 -0500
commitdd561667cb7ccbbfed3134b05a565971ef6f5873 (patch)
tree2fece731c25e136f3de44b4f2f33cb02c2bf222d /test/functional/zmq_test.py
parent6f01dcf63873a5e42798635ab4026c9a5f9fa213 (diff)
parentd618458184742b15a7ab0349127ede7a2946a182 (diff)
downloadbitcoin-dd561667cb7ccbbfed3134b05a565971ef6f5873.tar.xz
Merge #11389: Support having SegWit always active in regtest (sipa, ajtowns, jnewbery)
d61845818 Have SegWit active by default (Pieter Wuille) 4bd89210a Unit tests for always-active versionbits. (Anthony Towns) d07ee77ab Always-active versionbits support (Pieter Wuille) 18e071841 [consensus] Pin P2SH activation to block 173805 on mainnet (John Newbery) 526023aa7 Improve handling of BIP9Deployment limits (Anthony Towns) Pull request description: Most tests shouldn't have to deal with the now-historical SegWit activation transition (and other deployments, but SegWit is certainly the hardest one to accomodate). This PR makes a versionbits starttime of -1 equal to "always active", and enables it by default for SegWit on regtest. Individual tests can override this by using the existing `-vbparams` option. A few unit tests and functional tests are adapted to indeed override vbparams, as they specifically test the transition. This is in preparation for wallet SegWit support, but I thought having earlier eyes on it would be useful. Tree-SHA512: 3f07a7b41cf46476e6c7a5c43244e68c9f41d223482cedaa4c02a3a7b7cd0e90cbd06b84a1f3704620559636a2268f5767d4c52d09c1b354945737046f618fe5
Diffstat (limited to 'test/functional/zmq_test.py')
-rwxr-xr-xtest/functional/zmq_test.py7
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())