work on pm and gui improvements & some bug fixes

This commit is contained in:
Kevin Froman 2018-04-15 21:22:19 -05:00
parent 3a2efce637
commit a3aa8e3ae6
No known key found for this signature in database
GPG key ID: 0D414D0FE405B63B
5 changed files with 101 additions and 21 deletions

View file

@ -513,3 +513,17 @@ class Core:
conn.close()
return
def insertBlock(self, data, header='txt'):
'''
Inserts a block into the network
'''
retData = ''
if len(data) == 0:
logger.error('Will not insert empty block')
else:
addedHash = self.setData('-' + header + '-' + data)
self.addToBlockDB(addedHash, selfInsert=True)
self.setBlockType(addedHash, header)
retData = addedHash
return retData