diff options
author | Martin Zumsande <mzumsande@gmail.com> | 2022-09-01 18:25:25 -0400 |
---|---|---|
committer | Martin Zumsande <mzumsande@gmail.com> | 2022-09-19 11:06:43 -0400 |
commit | a8a9ed67cc447d204304ccfd844c45fd76486c6a (patch) | |
tree | 6bbf20a836f8449c612e416491d72e79f86259f7 /test | |
parent | 55e1deb745531a0749f668ed7265770c70a58563 (diff) | |
download | bitcoin-a8a9ed67cc447d204304ccfd844c45fd76486c6a.tar.xz |
init: Abort if i2p/cjdns are chosen via -onlynet but unreachable
...because -i2psam or -cjdnsreachable are not provided.
This mimics existing behavior for -onlynet=onion and non-specified proxy.
Diffstat (limited to 'test')
-rwxr-xr-x | test/functional/feature_proxy.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/functional/feature_proxy.py b/test/functional/feature_proxy.py index d02d56d068..c90852562e 100755 --- a/test/functional/feature_proxy.py +++ b/test/functional/feature_proxy.py @@ -332,6 +332,16 @@ class ProxyTest(BitcoinTestFramework): msg = "Error: Invalid -i2psam address or hostname: 'def:xyz'" self.nodes[1].assert_start_raises_init_error(expected_msg=msg) + self.log.info("Test passing invalid -onlynet=i2p without -i2psam raises expected init error") + self.nodes[1].extra_args = ["-onlynet=i2p"] + msg = "Error: Outbound connections restricted to i2p (-onlynet=i2p) but -i2psam is not provided" + self.nodes[1].assert_start_raises_init_error(expected_msg=msg) + + self.log.info("Test passing invalid -onlynet=cjdns without -cjdnsreachable raises expected init error") + self.nodes[1].extra_args = ["-onlynet=cjdns"] + msg = "Error: Outbound connections restricted to CJDNS (-onlynet=cjdns) but -cjdnsreachable is not provided" + self.nodes[1].assert_start_raises_init_error(expected_msg=msg) + self.log.info("Test passing -onlynet=onion with -onion=0/-noonion raises expected init error") msg = ( "Error: Outbound connections restricted to Tor (-onlynet=onion) but " |