[refactor] Remove unused ForEachNodeThen() template

This commit is contained in:
John Newbery 2020-12-23 11:58:57 +00:00
parent 09cc66c00e
commit 0829516d1f
2 changed files with 0 additions and 25 deletions

View file

@ -844,28 +844,6 @@ public:
} }
}; };
template<typename Callable, typename CallableAfter>
void ForEachNodeThen(Callable&& pre, CallableAfter&& post)
{
LOCK(cs_vNodes);
for (auto&& node : vNodes) {
if (NodeFullyConnected(node))
pre(node);
}
post();
};
template<typename Callable, typename CallableAfter>
void ForEachNodeThen(Callable&& pre, CallableAfter&& post) const
{
LOCK(cs_vNodes);
for (auto&& node : vNodes) {
if (NodeFullyConnected(node))
pre(node);
}
post();
};
// Addrman functions // Addrman functions
std::vector<CAddress> GetAddresses(size_t max_addresses, size_t max_pct); std::vector<CAddress> GetAddresses(size_t max_addresses, size_t max_pct);
/** /**

View file

@ -64,9 +64,6 @@ FUZZ_TARGET_INIT(connman, initialize_connman)
[&] { [&] {
connman.ForEachNode([](auto) {}); connman.ForEachNode([](auto) {});
}, },
[&] {
connman.ForEachNodeThen([](auto) {}, []() {});
},
[&] { [&] {
(void)connman.ForNode(fuzzed_data_provider.ConsumeIntegral<NodeId>(), [&](auto) { return fuzzed_data_provider.ConsumeBool(); }); (void)connman.ForNode(fuzzed_data_provider.ConsumeIntegral<NodeId>(), [&](auto) { return fuzzed_data_provider.ConsumeBool(); });
}, },