mirror of
https://github.com/basicswap/basicswap.git
synced 2025-03-09 02:05:13 +00:00
tests: Fix test_xmr_persistent with BTC v28.
This commit is contained in:
parent
6f776971b1
commit
f13c481b51
3 changed files with 7 additions and 5 deletions
|
@ -211,6 +211,7 @@ LTC_RPC_PWD = os.getenv("LTC_RPC_PWD", "")
|
|||
|
||||
BTC_RPC_HOST = os.getenv("BTC_RPC_HOST", "127.0.0.1")
|
||||
BTC_RPC_PORT = int(os.getenv("BTC_RPC_PORT", 19996))
|
||||
BTC_PORT = int(os.getenv("BTC_PORT", 8333))
|
||||
BTC_ONION_PORT = int(os.getenv("BTC_ONION_PORT", 8334))
|
||||
BTC_RPC_USER = os.getenv("BTC_RPC_USER", "")
|
||||
BTC_RPC_PWD = os.getenv("BTC_RPC_PWD", "")
|
||||
|
@ -254,8 +255,8 @@ NAV_RPC_PWD = os.getenv("NAV_RPC_PWD", "")
|
|||
|
||||
BCH_RPC_HOST = os.getenv("BCH_RPC_HOST", "127.0.0.1")
|
||||
BCH_RPC_PORT = int(os.getenv("BCH_RPC_PORT", 19997))
|
||||
BCH_ONION_PORT = int(os.getenv("BCH_ONION_PORT", 8335))
|
||||
BCH_PORT = int(os.getenv("BCH_PORT", 19798))
|
||||
BCH_ONION_PORT = int(os.getenv("BCH_ONION_PORT", 8335))
|
||||
BCH_RPC_USER = os.getenv("BCH_RPC_USER", "")
|
||||
BCH_RPC_PWD = os.getenv("BCH_RPC_PWD", "")
|
||||
|
||||
|
@ -2296,6 +2297,7 @@ def main():
|
|||
"onionport": BTC_ONION_PORT + port_offset,
|
||||
"datadir": os.getenv("BTC_DATA_DIR", os.path.join(data_dir, "bitcoin")),
|
||||
"bindir": os.path.join(bin_dir, "bitcoin"),
|
||||
"port": BTC_PORT + port_offset,
|
||||
"use_segwit": True,
|
||||
"blocks_confirmed": 1,
|
||||
"conf_target": 2,
|
||||
|
|
|
@ -251,7 +251,7 @@ def getCoreBinArgs(coin_id: int, coin_settings, prepare=False, use_tor_proxy=Fal
|
|||
extra_args = []
|
||||
if "config_filename" in coin_settings:
|
||||
extra_args.append("--conf=" + coin_settings["config_filename"])
|
||||
if "port" in coin_settings:
|
||||
if "port" in coin_settings and coin_id != Coins.BTC:
|
||||
if prepare is False and use_tor_proxy:
|
||||
if coin_id == Coins.BCH:
|
||||
# Without this BCH (27.1) will bind to the default BTC port, even with proxy set
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright (c) 2020-2024 tecnovert
|
||||
# Copyright (c) 2024 The Basicswap developers
|
||||
# Copyright (c) 2024-2025 The Basicswap developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
|
@ -132,6 +132,7 @@ def run_prepare(
|
|||
os.environ["BSX_TEST_MODE"] = "true"
|
||||
os.environ["PART_RPC_PORT"] = str(PARTICL_RPC_PORT_BASE)
|
||||
os.environ["BTC_RPC_PORT"] = str(BITCOIN_RPC_PORT_BASE)
|
||||
os.environ["BTC_PORT"] = str(BITCOIN_PORT_BASE)
|
||||
os.environ["LTC_RPC_PORT"] = str(LITECOIN_RPC_PORT_BASE)
|
||||
os.environ["DCR_RPC_PORT"] = str(DECRED_RPC_PORT_BASE)
|
||||
os.environ["FIRO_RPC_PORT"] = str(FIRO_RPC_PORT_BASE)
|
||||
|
@ -229,8 +230,7 @@ def run_prepare(
|
|||
for line in lines:
|
||||
if not line.startswith("prune"):
|
||||
fp.write(line)
|
||||
fp.write("port={}\n".format(BITCOIN_PORT_BASE + node_id + port_ofs))
|
||||
fp.write("bind=127.0.0.1\n")
|
||||
# fp.write("bind=127.0.0.1\n") # Causes BTC v28 to try and bind to bind=127.0.0.1:8444, even with a bind...=onion present
|
||||
# listenonion=0 does not stop the node from trying to bind to the tor port
|
||||
# https://github.com/bitcoin/bitcoin/issues/22726
|
||||
fp.write(
|
||||
|
|
Loading…
Reference in a new issue