onionr can now import blocks from disk

This commit is contained in:
Kevin Froman 2018-05-10 02:42:24 -05:00
parent 5813190cc4
commit 193845104e
No known key found for this signature in database
GPG key ID: 0D414D0FE405B63B
3 changed files with 25 additions and 4 deletions

View file

@ -253,7 +253,7 @@ class Core:
return
def addToBlockDB(self, newHash, selfInsert=False):
def addToBlockDB(self, newHash, selfInsert=False, dataSaved=False):
'''
Add a hash value to the block db
@ -266,7 +266,7 @@ class Core:
conn = sqlite3.connect(self.blockDB)
c = conn.cursor()
currentTime = math.floor(time.time())
if selfInsert:
if selfInsert or dataSaved:
selfInsert = 1
else:
selfInsert = 0