Removes unnecessary encoding when unhexlifying

binascii.unhexlify(x) is equal to binascii.unhexlify(x.encode())
This commit is contained in:
Sergi Delgado Segura
2019-12-17 11:35:28 +01:00
parent 1184b4648a
commit 46a7fa824f
3 changed files with 4 additions and 4 deletions

View File

@@ -28,7 +28,7 @@ class ZMQSubscriber:
body = msg[1]
if topic == b"hashblock":
block_hash = binascii.hexlify(body).decode("UTF-8")
block_hash = binascii.hexlify(body).decode("utf-8")
block_queue.put(block_hash)
self.logger.info("New block received via ZMQ", block_hash=block_hash)