diff --git a/minode/connection.py b/minode/connection.py index 8d6b6de..623eeec 100644 --- a/minode/connection.py +++ b/minode/connection.py @@ -294,7 +294,7 @@ class Connection(threading.Thread): if obj.is_valid() and obj.vector not in shared.objects: with shared.objects_lock: shared.objects[obj.vector] = obj - if obj.object_type == shared.i2p_dest_obj_type: + if obj.object_type == shared.i2p_dest_obj_type and obj.version == shared.i2p_dest_obj_version: dest = base64.b64encode(obj.object_payload, altchars=b'-~') logging.debug('Received I2P destination object, adding to i2p_unchecked_node_pool') logging.debug(dest) diff --git a/minode/manager.py b/minode/manager.py index c3a9ae7..ae257c6 100644 --- a/minode/manager.py +++ b/minode/manager.py @@ -162,5 +162,5 @@ class Manager(threading.Thread): if shared.i2p_session_nick: logging.info('Publishing our I2P destination') dest_pub_raw = base64.b64decode(shared.i2p_dest_pub, altchars=b'-~') - obj = structure.Object(b'\x00' * 8, int(time.time() + 2 * 3600), 0x493250, 1, 1, dest_pub_raw) + obj = structure.Object(b'\x00' * 8, int(time.time() + 2 * 3600), shared.i2p_dest_obj_type, shared.i2p_dest_obj_version, 1, dest_pub_raw) pow.do_pow_and_publish(obj) diff --git a/minode/shared.py b/minode/shared.py index 321b8e1..ee02dbe 100644 --- a/minode/shared.py +++ b/minode/shared.py @@ -24,6 +24,7 @@ user_agent = b'/MiNode:0.2.2/' timeout = 600 header_length = 24 i2p_dest_obj_type = 0x493250 +i2p_dest_obj_version = 1 i2p_enabled = False i2p_sam_host = '127.0.0.1'