mirror of
https://github.com/markqvist/LXMF
synced 2026-11-23 07:20:36 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
39e398be65 | ||
|
|
ee15e9f0b6 | ||
|
|
00ffbc09fe | ||
|
|
dca6cc2adc |
No files matched your search
+13
-10
@@ -1360,14 +1360,16 @@ class LXMRouter:
|
||||
def sigint_handler(self, signal, frame):
|
||||
if not self.exit_handler_running:
|
||||
RNS.log("Received SIGINT, shutting down now!", RNS.LOG_WARNING)
|
||||
sys.exit(0)
|
||||
self.exit_handler()
|
||||
RNS.exit(0)
|
||||
else:
|
||||
RNS.log("Received SIGINT, but exit handler is running, keeping process alive until storage persist is complete", RNS.LOG_WARNING)
|
||||
|
||||
def sigterm_handler(self, signal, frame):
|
||||
if not self.exit_handler_running:
|
||||
RNS.log("Received SIGTERM, shutting down now!", RNS.LOG_WARNING)
|
||||
sys.exit(0)
|
||||
self.exit_handler()
|
||||
RNS.exit(0)
|
||||
else:
|
||||
RNS.log("Received SIGTERM, but exit handler is running, keeping process alive until storage persist is complete", RNS.LOG_WARNING)
|
||||
|
||||
@@ -2198,14 +2200,15 @@ class LXMRouter:
|
||||
# 4: Limit for incoming propagation node syncs
|
||||
# 5: Propagation stamp costs for this node
|
||||
# 6: Node metadata
|
||||
if remote_app_data[2] and self.autopeer and RNS.Transport.hops_to(remote_hash) <= self.autopeer_maxdepth:
|
||||
remote_timebase = remote_app_data[1]
|
||||
remote_transfer_limit = remote_app_data[3]
|
||||
remote_sync_limit = remote_app_data[4]
|
||||
remote_stamp_cost = remote_app_data[5][0]
|
||||
remote_stamp_flex = remote_app_data[5][1]
|
||||
remote_peering_cost = remote_app_data[5][2]
|
||||
remote_metadata = remote_app_data[6]
|
||||
pn_config = msgpack.unpackb(remote_app_data)
|
||||
if pn_config[2] and self.autopeer and RNS.Transport.hops_to(remote_hash) <= self.autopeer_maxdepth:
|
||||
remote_timebase = pn_config[1]
|
||||
remote_transfer_limit = pn_config[3]
|
||||
remote_sync_limit = pn_config[4]
|
||||
remote_stamp_cost = pn_config[5][0]
|
||||
remote_stamp_flex = pn_config[5][1]
|
||||
remote_peering_cost = pn_config[5][2]
|
||||
remote_metadata = pn_config[6]
|
||||
|
||||
RNS.log(f"Auto-peering with {remote_str} discovered via incoming sync", RNS.LOG_DEBUG) # TODO: Remove debug
|
||||
self.peer(remote_hash, remote_timebase, remote_transfer_limit, remote_sync_limit, remote_stamp_cost, remote_stamp_flex, remote_peering_cost, remote_metadata)
|
||||
|
||||
@@ -15,6 +15,8 @@ PN_VALIDATION_POOL_MIN_SIZE = 256
|
||||
|
||||
active_jobs = {}
|
||||
|
||||
if RNS.vendor.platformutils.is_linux(): multiprocessing.set_start_method("fork")
|
||||
|
||||
def stamp_workblock(material, expand_rounds=WORKBLOCK_EXPAND_ROUNDS):
|
||||
wb_st = time.time()
|
||||
workblock = b""
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
__version__ = "0.9.1"
|
||||
__version__ = "0.9.2"
|
||||
Reference in new issue
Block a user