mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
Merge bitcoin/bitcoin#24205: init, test: improve network reachability test coverage and safety
58a14795b8test: passing -onlynet=onion with -onion=0/-noonion raises expected init error (Jon Atack)7000f66d36test: passing -onlynet=onion without -proxy/-onion raises expected init error (Jon Atack)8332e6e4cftest: passing invalid -onion raises expected init error (Jon Atack)d5edb08708test: passing invalid -proxy raises expected init error (Jon Atack)bd57dcbaf2test: hoist proxy out of 2 network loops in feature_proxy.py (Jon Atack)afdf2de282test: add CJDNS to LimitedAndReachable_Network unit tests (Jon Atack)2b7a8180a9net, init: assert each network reachability is true by default (Jon Atack) Pull request description: Adds missing network reachability test coverage and an assertion during init, noticed while reviewing #22834: - assert during init that each network reachability is true by default - add CJDNS to the `LimitedAndReachable_Network` unit tests - hoist proxy out of two network loops in feature_proxy.py - test that passing invalid `-proxy` raises expected init error - test that passing invalid `-onion` raises expected init error - test that passing `-onlynet=onion` without `-proxy` and `-onion` raises expected init error - test that passing `-onlynet=onion` with `-onion=0` and with `-noonion` raises expected init error ACKs for top commit: vasild: ACK58a14795b8brunoerg: ACK58a14795b8dongcarl: Code Review ACK58a14795b8Tree-SHA512: bdee6dd0c12bb63591ce7c9321fe77b509ab1265123054e774adc38a187746dddafe1627cbe89e990bcc78b45e194bfef8dc782710d5b217e2e2106ab0158827
This commit is contained in:
@@ -1302,6 +1302,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
|
||||
}
|
||||
for (int n = 0; n < NET_MAX; n++) {
|
||||
enum Network net = (enum Network)n;
|
||||
assert(IsReachable(net));
|
||||
if (!nets.count(net))
|
||||
SetReachable(net, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user