aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/zmq_test.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2016-05-14 13:01:31 +0200
committerMarcoFalke <falke.marco@gmail.com>2016-05-15 12:58:53 +0200
commitfac93497986b5f74716383bf26c78406253c625a (patch)
tree10656400cfb00351ed99475fbf98eff13d4e4d9a /qa/rpc-tests/zmq_test.py
parent169d379c98357a17e634f34b5e72033c69f9a7cb (diff)
downloadbitcoin-fac93497986b5f74716383bf26c78406253c625a.tar.xz
[qa] Remove hardcoded "4 nodes" from test_framework
Diffstat (limited to 'qa/rpc-tests/zmq_test.py')
-rwxr-xr-xqa/rpc-tests/zmq_test.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/qa/rpc-tests/zmq_test.py b/qa/rpc-tests/zmq_test.py
index f5617a084d..3a116317fe 100755
--- a/qa/rpc-tests/zmq_test.py
+++ b/qa/rpc-tests/zmq_test.py
@@ -17,6 +17,10 @@ import urllib.parse
class ZMQTest (BitcoinTestFramework):
+ def __init__(self):
+ super().__init__()
+ self.num_nodes = 4
+
port = 28332
def setup_nodes(self):
@@ -25,7 +29,7 @@ class ZMQTest (BitcoinTestFramework):
self.zmqSubSocket.setsockopt(zmq.SUBSCRIBE, b"hashblock")
self.zmqSubSocket.setsockopt(zmq.SUBSCRIBE, b"hashtx")
self.zmqSubSocket.connect("tcp://127.0.0.1:%i" % self.port)
- return start_nodes(4, self.options.tmpdir, extra_args=[
+ return start_nodes(self.num_nodes, self.options.tmpdir, extra_args=[
['-zmqpubhashtx=tcp://127.0.0.1:'+str(self.port), '-zmqpubhashblock=tcp://127.0.0.1:'+str(self.port)],
[],
[],