use bytes instead of str when inserting

master
Kevin Froman 2018-06-21 14:07:00 -05:00
parent 3c8d1a5b7f
commit ff8128ae33
1 changed files with 1 additions and 1 deletions

View File

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