Skip to content

Commit 8ad2c90

Browse files
committed
Merge bitcoin/bitcoin#31343: test: avoid internet traffic in rpc_net.py
988721d test: avoid internet traffic in rpc_net.py (Sebastian Falbesoner) Pull request description: In order to avoid connecting to the internet in the functional test `rpc_net.py`, specify a non-working proxy (parameter `-proxy=127.0.0.1:1`, same approach as in #31142) for the nodes. There is at least one known instance where this is currently happening on master where a connection attempt to a public IP is made (see also the discussion in #31339): https://github.com/bitcoin/bitcoin/blob/17834bd1976df7a2ff6c2f5f05a59ae3fd3f6875/test/functional/rpc_net.py#L253 Can be tested by running ``` $ sudo tcpdump -i eth0 host 11.22.33.44 ``` both on master and the PR branch and verifying that no packets appear in the tcpdump in the latter anymore. ACKs for top commit: achow101: ACK 988721d tdb3: ACK 988721d vasild: ACK 988721d Tree-SHA512: 0f51fedccbfac0f80a7e6f9c5ba9193d0c20b5a788553c7cd7e583225df7b1151b86cd848d6ccf61f7b2de848f0ac98d73d7b5db100aa54fe8cbeeb4c0549106
2 parents a582ee6 + 988721d commit 8ad2c90

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/functional/rpc_net.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ class NetTest(BitcoinTestFramework):
6363
def set_test_params(self):
6464
self.num_nodes = 2
6565
self.extra_args = [["-minrelaytxfee=0.00001000"], ["-minrelaytxfee=0.00000500"]]
66+
# Specify a non-working proxy to make sure no actual connections to public IPs are attempted
67+
for args in self.extra_args:
68+
args.append("-proxy=127.0.0.1:1")
6669
self.supports_cli = False
6770

6871
def run_test(self):

0 commit comments

Comments
 (0)