diff options
author | Sjors Provoost <sjors@sprovoost.nl> | 2018-03-06 16:48:15 -0500 |
---|---|---|
committer | Sjors Provoost <sjors@sprovoost.nl> | 2018-03-06 16:48:15 -0500 |
commit | b156ff7c30175f5d23bde97a56a2c34af2196466 (patch) | |
tree | 2dbaaf83b0c4b0692269ad762917d8feb48a02b2 /test/functional/test_framework/util.py | |
parent | d3f4dd313e5fe58903caf2f4d04827e7f7944e17 (diff) | |
download | bitcoin-b156ff7c30175f5d23bde97a56a2c34af2196466.tar.xz |
[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.py | 6 |
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 |