Validate objects loaded from disk

This commit is contained in:
TheKysek 2017-08-23 18:43:52 +02:00
parent 9c73986e2a
commit 5e949d0e01
No known key found for this signature in database
GPG Key ID: 50D9AF00D0B1C497

View File

@ -233,8 +233,12 @@ def main():
# We are starting it before cleaning expired objects so we can collect I2P destination objects # We are starting it before cleaning expired objects so we can collect I2P destination objects
start_i2p_listener() start_i2p_listener()
for vector in set(shared.objects):
if not shared.objects[vector].is_valid():
del shared.objects[vector]
logging.warning('Deleted invalid object: {}'.format(base64.b16encode(vector).decode()))
manager = Manager() manager = Manager()
manager.clean_objects()
manager.start() manager.start()
advertiser = Advertiser() advertiser = Advertiser()