mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-25 15:10:38 +01:00
Merge pull request #1335 from frennkie/add-testnet-filter
ip2tor: add testnet filter
This commit is contained in:
commit
9ca5f62bcb
1 changed files with 6 additions and 1 deletions
|
@ -53,6 +53,11 @@ else:
|
||||||
LND_TLS_PATH="/Users/rotzoll/Downloads/RaspiBlitzCredentials/tls.cert"
|
LND_TLS_PATH="/Users/rotzoll/Downloads/RaspiBlitzCredentials/tls.cert"
|
||||||
SUBSCRIPTIONS_FILE="/Users/rotzoll/Downloads/RaspiBlitzCredentials/subscriptions.toml"
|
SUBSCRIPTIONS_FILE="/Users/rotzoll/Downloads/RaspiBlitzCredentials/subscriptions.toml"
|
||||||
|
|
||||||
|
if cfg.chain.value == "test":
|
||||||
|
is_testnet = True
|
||||||
|
else:
|
||||||
|
is_testnet = False
|
||||||
|
|
||||||
####### HELPER CLASSES #########
|
####### HELPER CLASSES #########
|
||||||
|
|
||||||
class BlitzError(Exception):
|
class BlitzError(Exception):
|
||||||
|
@ -119,7 +124,7 @@ def apiGetHosts(session, shopurl):
|
||||||
|
|
||||||
# make HTTP request
|
# make HTTP request
|
||||||
try:
|
try:
|
||||||
url="{0}/api/v1/public/hosts/".format(shopurl)
|
url="{0}/api/v1/public/hosts/?is_testnet={1}".format(shopurl, int(is_testnet))
|
||||||
response = session.get(url)
|
response = session.get(url)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise BlitzError("failed HTTP request",url,e)
|
raise BlitzError("failed HTTP request",url,e)
|
||||||
|
|
Loading…
Add table
Reference in a new issue