correct TypeError: Strings must be encoded before hashing in node.py

This commit is contained in:
Mario Fetka 2024-03-26 17:38:20 +01:00
parent 690db8072e
commit d5d7a45488

View File

@ -199,7 +199,7 @@ class Node:
logger.debug("our own pubkey is: %s" % pubkey) logger.debug("our own pubkey is: %s" % pubkey)
self.uid = str(hashlib.sha224(pubkey).hexdigest()) self.uid = str(hashlib.sha224(pubkey.encode(encoding = 'UTF-8', errors = 'strict')).hexdigest())
logger.debug("that makes our own uid: %s", self.uid) logger.debug("that makes our own uid: %s", self.uid)
self.addresses = c.addresses self.addresses = c.addresses
self.port = c.port self.port = c.port