diff --git a/tests/test_framework/bitcoind.py b/tests/test_framework/bitcoind.py index ab8e69ac3..4513f87da 100644 --- a/tests/test_framework/bitcoind.py +++ b/tests/test_framework/bitcoind.py @@ -61,7 +61,7 @@ def __init__(self, bitcoin_dir, rpcport=None): "-debugexclude=tor", ] bitcoind_conf = { - "port": self.p2pport, + "bind": f"127.0.0.1:{self.p2pport}", "rpcport": rpcport, "fallbackfee": Decimal(1000) / COIN, "rpcthreads": 32, diff --git a/tests/test_framework/utils.py b/tests/test_framework/utils.py index 7f961038b..37f588e3f 100644 --- a/tests/test_framework/utils.py +++ b/tests/test_framework/utils.py @@ -360,7 +360,8 @@ def tail(self): self.logs_cond.notifyAll() self.running = False self.proc.stdout.close() - self.proc.stderr.close() + if self.proc.stderr is not None: + self.proc.stderr.close() def is_in_log(self, regex, start=0): """Look for `regex` in the logs."""