mirror of
https://github.com/romanz/electrs.git
synced 2026-08-18 13:08:10 +02:00
Remove 0MQ Python client
This commit is contained in:
parent
77573fdd19
commit
4cebd1e25f
1 changed files with 0 additions and 19 deletions
|
|
@ -1,19 +0,0 @@
|
|||
import struct
|
||||
import zmq
|
||||
|
||||
def main():
|
||||
ctx = zmq.Context()
|
||||
sub = ctx.socket(zmq.SUB)
|
||||
sub.setsockopt_string(zmq.SUBSCRIBE, 'hashblock')
|
||||
sub.setsockopt_string(zmq.SUBSCRIBE, 'hashtx')
|
||||
sub.connect('tcp://localhost:28332')
|
||||
|
||||
while True:
|
||||
topic, msg, count = sub.recv_multipart()
|
||||
topic = topic.decode('ascii')
|
||||
count, = struct.unpack('<L', count)
|
||||
msg = msg.hex()
|
||||
print('{} {}: {}'.format(topic, msg, count))
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue