fix #3955: fix interference between verifier and catch_up
This commit is contained in:
@@ -181,7 +181,8 @@ class Blockchain(util.PrintError):
|
||||
if d < 0:
|
||||
chunk = chunk[-d:]
|
||||
d = 0
|
||||
self.write(chunk, d, index > len(self.checkpoints))
|
||||
truncate = index >= len(self.checkpoints)
|
||||
self.write(chunk, d, truncate)
|
||||
self.swap_with_parent()
|
||||
|
||||
def swap_with_parent(self):
|
||||
@@ -338,7 +339,7 @@ class Blockchain(util.PrintError):
|
||||
self.save_chunk(idx, data)
|
||||
return True
|
||||
except BaseException as e:
|
||||
self.print_error('verify_chunk failed', str(e))
|
||||
self.print_error('verify_chunk %d failed'%idx, str(e))
|
||||
return False
|
||||
|
||||
def get_checkpoints(self):
|
||||
|
||||
Reference in New Issue
Block a user