* fixed locale issue in docker
* fixed uploaded blocks not saving type properly
This commit is contained in:
parent
40ea61707f
commit
cfbc834eb5
3 changed files with 11 additions and 4 deletions
|
@ -21,7 +21,7 @@ import core, onionrexceptions, logger
|
|||
def importBlockFromData(content, coreInst):
|
||||
retData = False
|
||||
|
||||
dataHash = coreInst._getSha3Hash(content)
|
||||
dataHash = coreInst._crypto.sha3Hash(content)
|
||||
|
||||
if coreInst._blacklist.inBlacklist(dataHash):
|
||||
raise onionrexceptions.BlacklistedBlock('%s is a blacklisted block' % (dataHash,))
|
||||
|
@ -40,7 +40,7 @@ def importBlockFromData(content, coreInst):
|
|||
if coreInst._crypto.verifyPow(content): # check if POW is enough/correct
|
||||
logger.info('Block passed proof, saving.')
|
||||
blockHash = coreInst.setData(content)
|
||||
blockHash = coreInst.addToBlockDB(blockHash, dataSaved=True)
|
||||
coreInst.addToBlockDB(blockHash, dataSaved=True)
|
||||
coreInst._utils.processBlockMetadata(blockHash) # caches block metadata values to block database
|
||||
retData = True
|
||||
return retData
|
|
@ -22,6 +22,8 @@
|
|||
import logger, config, threading, time, readline, datetime
|
||||
from onionrblockapi import Block
|
||||
import onionrexceptions
|
||||
import locale
|
||||
locale.setlocale(locale.LC_ALL, '')
|
||||
|
||||
plugin_name = 'pms'
|
||||
PLUGIN_VERSION = '0.0.1'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue