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:
1 file changed
+1
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user