mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-11 12:22:39 -03: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
1 changed files with 1 additions and 0 deletions
|
@ -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…
Reference in a new issue