Skip to content

Commit 2b7a818

Browse files
committed
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.
1 parent 848b116 commit 2b7a818

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/init.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,6 +1301,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
13011301
}
13021302
for (int n = 0; n < NET_MAX; n++) {
13031303
enum Network net = (enum Network)n;
1304+
assert(IsReachable(net));
13041305
if (!nets.count(net))
13051306
SetReachable(net, false);
13061307
}

0 commit comments

Comments
 (0)