mirror of
https://github.com/aljazceru/python-teos.git
synced 2026-02-15 19:44:19 +01:00
Removes unnecessary encoding when unhexlifying
binascii.unhexlify(x) is equal to binascii.unhexlify(x.encode())
This commit is contained in:
@@ -335,7 +335,7 @@ class Inspector:
|
||||
rcode = errors.APPOINTMENT_EMPTY_FIELD
|
||||
message = "empty signature received"
|
||||
|
||||
pk = Cryptographer.load_public_key_der(unhexlify(pk_der.encode("utf-8")))
|
||||
pk = Cryptographer.load_public_key_der(unhexlify(pk_der))
|
||||
valid_sig = Cryptographer.verify(Cryptographer.signature_format(appointment), signature, pk)
|
||||
|
||||
if not valid_sig:
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user