diff options
author | Jon Atack <jon@atack.com> | 2022-01-30 22:46:25 +0100 |
---|---|---|
committer | Jon Atack <jon@atack.com> | 2022-03-01 21:03:18 +0100 |
commit | 2b7a8180a94738c2fcb21232a2eca07a7b27656d (patch) | |
tree | 9e3b323e0e86167e350ee3efa0eed56ba9b5f87d /src/init.cpp | |
parent | 848b11615b67a3c49f76ebbcaa241a322d8014d8 (diff) |
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.
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp index ce666534ae..89418bc1f7 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1301,6 +1301,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); } |