mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-27 03:33:27 -03:00
[refactor] Remove unused ForEachNodeThen() template
This commit is contained in:
parent
09cc66c00e
commit
0829516d1f
2 changed files with 0 additions and 25 deletions
22
src/net.h
22
src/net.h
|
@ -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);
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -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(); });
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue