From 0f69bfd2959980d03ccb01e8953502215de6ff0c Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Thu, 19 Jul 2018 14:46:13 -0500 Subject: [PATCH] fixed bytes issue with new pow and older python --- onionr/onionrproofs.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/onionr/onionrproofs.py b/onionr/onionrproofs.py index b6a63d8a..04746508 100644 --- a/onionr/onionrproofs.py +++ b/onionr/onionrproofs.py @@ -159,6 +159,9 @@ class POW: self.metadata['powRandomToken'] = base64.b64encode(rand).decode() payload = json.dumps(self.metadata).encode() + b'\n' + self.data token = myCore._crypto.sha3Hash(payload) + if type(token) is bytes: + # crypto.sha3Hash returns bytes on some older python versions + self.puzzle = self.puzzle.encode() #print(token) if self.puzzle == token[0:self.difficulty]: self.hashing = False