hopefully fixed everything for new sig format

This commit is contained in:
Kevin Froman 2018-05-05 03:03:05 -05:00
parent ff5bdd62f2
commit 908ccbe664
No known key found for this signature in database
GPG key ID: 0D414D0FE405B63B
3 changed files with 53 additions and 25 deletions

View file

@ -641,6 +641,7 @@ class Core:
metadata = json.dumps(metadata)
metadata = metadata.encode()
signature = ''
if sign:
signature = self._crypto.edSign(metadata + data, self._crypto.privKey, encodeResult=True)
@ -650,9 +651,9 @@ class Core:
ourID = ourID.decode()
except AttributeError:
pass
metadata = {'sig': signature, 'meta': metadata.decode()}
metadata = json.dumps(metadata)
metadata = metadata.encode()
metadata = {'sig': signature, 'meta': metadata.decode()}
metadata = json.dumps(metadata)
metadata = metadata.encode()
if len(data) == 0:
logger.error('Will not insert empty block')