use bytes instead of str when inserting

This commit is contained in:
Kevin Froman 2018-06-21 14:07:00 -05:00
parent 3c8d1a5b7f
commit ff8128ae33

View File

@ -731,7 +731,7 @@ class Core:
metadata['powRandomToken'] = powToken
metadata['time'] = str(self._utils.getEpoch())
payload = json.dumps(metadata) + '\n' + data
payload = json.dumps(metadata).encode() + b'\n' + data
retData = self.setData(payload)
self.addToBlockDB(retData, selfInsert=True, dataSaved=True)