mirror of
https://github.com/markqvist/Reticulum.git
synced 2025-08-03 03:56:10 -04:00
Implemented loop detection for pathfinding and congestionn avoidance for announce rebroadcasts.
This commit is contained in:
parent
64c30488c2
commit
8e19d5bd97
2 changed files with 61 additions and 15 deletions
|
@ -2,6 +2,7 @@ import os
|
|||
import sys
|
||||
import glob
|
||||
import time
|
||||
import random
|
||||
|
||||
from .Reticulum import Reticulum
|
||||
from .Identity import Identity
|
||||
|
@ -32,6 +33,8 @@ logfile = None
|
|||
logdest = LOG_STDOUT
|
||||
logtimefmt = "%Y-%m-%d %H:%M:%S"
|
||||
|
||||
random.seed(os.urandom(10))
|
||||
|
||||
def loglevelname(level):
|
||||
if (level == LOG_CRITICAL):
|
||||
return "Critical"
|
||||
|
@ -66,6 +69,10 @@ def log(msg, level=3):
|
|||
file.write(logstring+"\n")
|
||||
file.close()
|
||||
|
||||
def rand():
|
||||
result = random.random()
|
||||
return result
|
||||
|
||||
def hexprint(data):
|
||||
print(hexrep(hexrep))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue