From 5e949d0e0172366e7df8e35aa8a85d3cc45de1cf Mon Sep 17 00:00:00 2001 From: TheKysek Date: Wed, 23 Aug 2017 18:43:52 +0200 Subject: [PATCH] Validate objects loaded from disk --- minode/main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/minode/main.py b/minode/main.py index 48e3d91..f339770 100644 --- a/minode/main.py +++ b/minode/main.py @@ -233,8 +233,12 @@ def main(): # We are starting it before cleaning expired objects so we can collect I2P destination objects 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.clean_objects() manager.start() advertiser = Advertiser()