From 84e1bc5d396171391b0d97b9fa812dea2477e389 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pascal=20Eng=C3=A9libert?= <tuxmain@zettascript.org> Date: Tue, 15 Oct 2019 19:48:34 +0200 Subject: [PATCH] Accept all types of endpoints --- README.md | 2 -- server.py | 4 ++-- utils.py | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 3ebd966..1b0c1e6 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,6 @@ run in an onion network, guaranteeing a strong anonymity. ## How to install it -**Warning**: This version works with a dev version of Silkaj. If the latest release of Silkaj is still `0.7.1`, please use [this branch](https://git.duniter.org/clients/python/silkaj/tree/223_endpoint_click_decoupled) (you can also copy `network_tools.py` from this branch). - ### ➤ Debian (Ubuntu, Mint, etc.) sh install_gmixer.sh diff --git a/server.py b/server.py index c070883..9d15b5f 100644 --- a/server.py +++ b/server.py @@ -49,7 +49,7 @@ PUBLIC_HOST = BIND_HOST PUBLIC_PORT = BIND_PORT ID_SALT = "" ID_PASSWORD = "" -BMA_HOSTS = ["g1.duniter.fr 443", "g1.duniter.org 443", "g1.presles.fr 443", "g1.cgeek.fr 443", "ts.g1.librelois.fr 443"] +BMA_HOSTS = ["BASIC_MERKLED_API 149.91.88.175 10901", "BMAS g1.duniter.fr 443", "BMAS g1.duniter.org 443", "BMAS g1.presles.fr 443", "BMAS g1.cgeek.fr 443", "BMAS ts.g1.librelois.fr 443"] MIX_INTERVAL = 120 MIX_MIN_TXS = 5 # minimum amount of txs to mix MIX_REQ_AGE_MAX = 604800 # maximum mix request age before return to sender @@ -551,7 +551,7 @@ class ClientThread(Thread): self.tx_out_index = tx_out_index self.db_txs = db_txs - self.bma_endpoints = ["BMAS "+host for host in conf["client"]["bma_hosts"]] + self.bma_endpoints = conf["client"]["bma_hosts"].copy() self.work = True def detect_peers(self):# Check known peers and ask them for their known peer list diff --git a/utils.py b/utils.py index 91b68cd..409de78 100644 --- a/utils.py +++ b/utils.py @@ -249,7 +249,7 @@ async def bma_client(bma_endpoints:list): client = None downs = 0 for bma_endpoint in bma_endpoints: - client = Client("BMAS "+bma_endpoint) + client = Client(bma_endpoint) try: await client(bma.node.summary) logprint("BMA up: "+bma_endpoint, LOG_TRACE) -- GitLab