hopefully fixed block sync issue
This commit is contained in:
parent
cb90c24e64
commit
5b20930d5c
3 changed files with 10 additions and 3 deletions
|
@ -474,7 +474,7 @@ class API:
|
|||
elif action == 'getData':
|
||||
resp = ''
|
||||
if self._utils.validateHash(data):
|
||||
if not os.path.exists('data/blocks/' + data + '.db'):
|
||||
if os.path.exists('data/blocks/' + data + '.dat'):
|
||||
block = Block(hash=data.encode(), core=self._core)
|
||||
resp = base64.b64encode(block.getRaw().encode()).decode()
|
||||
if len(resp) == 0:
|
||||
|
|
|
@ -216,6 +216,7 @@ class OnionrCommunicatorDaemon:
|
|||
logger.warn('POW failed for block ' + blockHash)
|
||||
else:
|
||||
logger.warn('Metadata for ' + blockHash + ' is invalid.')
|
||||
self._core._blacklist.addToDB(blockHash)
|
||||
else:
|
||||
# if block didn't meet expected hash
|
||||
tempHash = self._core._crypto.sha3Hash(content) # lazy hack, TODO use var
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue