diff --git a/src/net.h b/src/net.h --- a/src/net.h +++ b/src/net.h @@ -295,7 +295,8 @@ void PushMessage(CNode *pnode, CSerializedNetMsg &&msg); - template void ForEachNode(Callable &&func) { + using NodeFn = std::function; + void ForEachNode(const NodeFn &func) { LOCK(cs_vNodes); for (auto &&node : vNodes) { if (NodeFullyConnected(node)) { @@ -304,7 +305,7 @@ } }; - template void ForEachNode(Callable &&func) const { + void ForEachNode(const NodeFn &func) const { LOCK(cs_vNodes); for (auto &&node : vNodes) { if (NodeFullyConnected(node)) {