mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-10-11 03:53:22 +02:00
[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.
This commit is contained in:
@@ -16,6 +16,7 @@ import time
|
||||
|
||||
from .authproxy import JSONRPCException
|
||||
from .util import (
|
||||
append_config,
|
||||
assert_equal,
|
||||
get_rpc_proxy,
|
||||
rpc_url,
|
||||
@@ -42,7 +43,7 @@ class TestNode():
|
||||
To make things easier for the test writer, any unrecognised messages will
|
||||
be dispatched to the RPC connection."""
|
||||
|
||||
def __init__(self, i, dirname, extra_args, rpchost, timewait, binary, stderr, mocktime, coverage_dir, use_cli=False):
|
||||
def __init__(self, i, dirname, rpchost, timewait, binary, stderr, mocktime, coverage_dir, extra_conf=None, extra_args=None, use_cli=False):
|
||||
self.index = i
|
||||
self.datadir = os.path.join(dirname, "node" + str(i))
|
||||
self.rpchost = rpchost
|
||||
@@ -57,6 +58,8 @@ class TestNode():
|
||||
self.binary = binary
|
||||
self.stderr = stderr
|
||||
self.coverage_dir = coverage_dir
|
||||
if extra_conf != None:
|
||||
append_config(dirname, i, extra_conf)
|
||||
# Most callers will just need to add extra args to the standard list below.
|
||||
# For those callers that need more flexibity, they can just set the args property directly.
|
||||
# Note that common args are set in the config file (see initialize_datadir)
|
||||
|
Reference in New Issue
Block a user