aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework/util.py
diff options
context:
space:
mode:
authorSjors Provoost <sjors@sprovoost.nl>2018-03-06 16:48:15 -0500
committerSjors Provoost <sjors@sprovoost.nl>2018-03-06 16:48:15 -0500
commitb156ff7c30175f5d23bde97a56a2c34af2196466 (patch)
tree2dbaaf83b0c4b0692269ad762917d8feb48a02b2 /test/functional/test_framework/util.py
parentd3f4dd313e5fe58903caf2f4d04827e7f7944e17 (diff)
[tests] bind functional test nodes to 127.0.0.1
Prevents OSX firewall allow-this-application-to-accept-inbound-connections permission popups and is generally safer. To prevent binding to 127.0.0.1, set self.bind_to_localhost_only = False.
Diffstat (limited to 'test/functional/test_framework/util.py')
-rw-r--r--test/functional/test_framework/util.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/functional/test_framework/util.py b/test/functional/test_framework/util.py
index e9e7bbd8e4..a4b8d5af02 100644
--- a/test/functional/test_framework/util.py
+++ b/test/functional/test_framework/util.py
@@ -300,6 +300,12 @@ def initialize_datadir(dirname, n):
def get_datadir_path(dirname, n):
return os.path.join(dirname, "node" + str(n))
+def append_config(dirname, n, options):
+ datadir = get_datadir_path(dirname, n)
+ with open(os.path.join(datadir, "bitcoin.conf"), 'a', encoding='utf8') as f:
+ for option in options:
+ f.write(option + "\n")
+
def get_auth_cookie(datadir):
user = None
password = None