From a38648c911708c33bb65bd2d61e058de8327f040 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Tue, 6 Mar 2018 19:02:57 +0100 Subject: [PATCH 1/2] Merge #12588: [Utils] Remove deprecated PyZMQ call from Python ZMQ example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6058766de Remove deprecated PyZMQ call from Python ZMQ example (MichaƂ Zabielski) Pull request description: PyZMQ 17.0.0 has deprecated and removed zmq.asyncio.install() call with advice to use asyncio native run-loop instead of zmq specific. This caused exception when running the contrib/zmq/zmq_sub*.py examples. This commit simply follows the advice and fixes mentioned examples. Tree-SHA512: af357aafa5eb9506cfa3f513f06979bbc49f6132fddc1e96fbcea175da4f8e2ea298be7c7055e7d3377f0814364e13bb88b5c195f6a07898cd28c341d23a93c5 --- contrib/zmq/zmq_sub.py | 2 +- contrib/zmq/zmq_sub3.4.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) mode change 100755 => 100644 contrib/zmq/zmq_sub.py mode change 100755 => 100644 contrib/zmq/zmq_sub3.4.py diff --git a/contrib/zmq/zmq_sub.py b/contrib/zmq/zmq_sub.py old mode 100755 new mode 100644 index 2a1dd5277b05..6f43bf8a71f5 --- a/contrib/zmq/zmq_sub.py +++ b/contrib/zmq/zmq_sub.py @@ -38,7 +38,7 @@ class ZMQHandler(): def __init__(self): - self.loop = zmq.asyncio.install() + self.loop = asyncio.get_event_loop() self.zmqContext = zmq.asyncio.Context() self.zmqSubSocket = self.zmqContext.socket(zmq.SUB) diff --git a/contrib/zmq/zmq_sub3.4.py b/contrib/zmq/zmq_sub3.4.py old mode 100755 new mode 100644 index 446e4103e88b..e4a026518493 --- a/contrib/zmq/zmq_sub3.4.py +++ b/contrib/zmq/zmq_sub3.4.py @@ -42,7 +42,7 @@ class ZMQHandler(): def __init__(self): - self.loop = zmq.asyncio.install() + self.loop = asyncio.get_event_loop() self.zmqContext = zmq.asyncio.Context() self.zmqSubSocket = self.zmqContext.socket(zmq.SUB) From 216cbfdd9c5e431af74affc917ad67bec610cffe Mon Sep 17 00:00:00 2001 From: Jonas Schnelli Date: Wed, 29 Nov 2017 14:17:24 -1000 Subject: [PATCH 2/2] Merge #11792: Trivial: fix comments for ZeroMQ bitcoind args 33698c94b Trivial: fix comments for ZeroMQ bitcoind args (aaron-hanson) Pull request description: The ZeroMQ command-line args suggested here had the "-zmqpubhashblock" arg duplicated and the "-zmqpubrawblock" arg missing. Tree-SHA512: ef3a90f6d82367104aa751778074f6f56d2aaa9cbbf980731f60ee77393db256551423f5414c5b41f09707d08828afc663d06661152ef504a690ceb13c80bc0d Signed-off-by: Pasta # Conflicts: # contrib/zmq/zmq_sub.py # contrib/zmq/zmq_sub3.4.py --- contrib/zmq/zmq_sub.py | 2 +- contrib/zmq/zmq_sub3.4.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/zmq/zmq_sub.py b/contrib/zmq/zmq_sub.py index 6f43bf8a71f5..9307dcd251c3 100644 --- a/contrib/zmq/zmq_sub.py +++ b/contrib/zmq/zmq_sub.py @@ -8,8 +8,8 @@ Dash should be started with the command line arguments: dashd-testnet -daemon \ - -zmqpubhashblock=tcp://127.0.0.1:28332 \ -zmqpubrawtx=tcp://127.0.0.1:28332 \ + -zmqpubrawblock=tcp://127.0.0.1:28332 \ -zmqpubhashtx=tcp://127.0.0.1:28332 \ -zmqpubhashblock=tcp://127.0.0.1:28332 diff --git a/contrib/zmq/zmq_sub3.4.py b/contrib/zmq/zmq_sub3.4.py index e4a026518493..19aa5996d81f 100644 --- a/contrib/zmq/zmq_sub3.4.py +++ b/contrib/zmq/zmq_sub3.4.py @@ -8,8 +8,8 @@ Dash should be started with the command line arguments: dashd -testnet -daemon \ - -zmqpubhashblock=tcp://127.0.0.1:28332 \ -zmqpubrawtx=tcp://127.0.0.1:28332 \ + -zmqpubrawblock=tcp://127.0.0.1:28332 \ -zmqpubhashtx=tcp://127.0.0.1:28332 \ -zmqpubhashblock=tcp://127.0.0.1:28332