File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ def setup_nodes(self):
36
36
37
37
self .zmqContext = zmq .Context ()
38
38
self .zmqSubSocket = self .zmqContext .socket (zmq .SUB )
39
+ self .zmqSubSocket .set (zmq .RCVTIMEO , 60000 )
39
40
self .zmqSubSocket .setsockopt (zmq .SUBSCRIBE , b"hashblock" )
40
41
self .zmqSubSocket .setsockopt (zmq .SUBSCRIBE , b"hashtx" )
41
42
ip_address = "tcp://127.0.0.1:28332"
@@ -94,11 +95,10 @@ def run_test(self):
94
95
msg = self .zmqSubSocket .recv_multipart ()
95
96
topic = msg [0 ]
96
97
body = msg [1 ]
97
- hashZMQ = ""
98
- if topic == b"hashtx" :
99
- hashZMQ = bytes_to_hex_str (body )
100
- msgSequence = struct .unpack ('<I' , msg [- 1 ])[- 1 ]
101
- assert_equal (msgSequence , blockcount + 1 )
98
+ assert_equal (topic , b"hashtx" )
99
+ hashZMQ = bytes_to_hex_str (body )
100
+ msgSequence = struct .unpack ('<I' , msg [- 1 ])[- 1 ]
101
+ assert_equal (msgSequence , blockcount + 1 )
102
102
103
103
assert_equal (hashRPC , hashZMQ ) # txid from sendtoaddress must be equal to the hash received over zmq
104
104
You can’t perform that action at this time.
0 commit comments