Destination sharing tweaks
This commit is contained in:
parent
1d4d92c931
commit
974568164f
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Reference in New Issue
Block a user