mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-06 05:00:12 +02:00
net, init: assert each network reachability is true by default
The default network reachability values are implicitly set by this line in net.cpp: static bool vfLimited[NET_MAX] GUARDED_BY(g_maplocalhost_mutex) = {}; This commit asserts that each network is reachable during the first loop through them during bitcoind init.
This commit is contained in:
parent
848b11615b
commit
2b7a8180a9
@ -1301,6 +1301,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
|
|||||||
}
|
}
|
||||||
for (int n = 0; n < NET_MAX; n++) {
|
for (int n = 0; n < NET_MAX; n++) {
|
||||||
enum Network net = (enum Network)n;
|
enum Network net = (enum Network)n;
|
||||||
|
assert(IsReachable(net));
|
||||||
if (!nets.count(net))
|
if (!nets.count(net))
|
||||||
SetReachable(net, false);
|
SetReachable(net, false);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user