mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
[net processing] Move GetNodeStateStats into PeerManager
This commit is contained in:
parent
257cf05f9b
commit
a529fd3e3f
4 changed files with 21 additions and 18 deletions
|
|
@ -121,11 +121,13 @@ public:
|
|||
}
|
||||
|
||||
// Try to retrieve the CNodeStateStats for each node.
|
||||
TRY_LOCK(::cs_main, lockMain);
|
||||
if (lockMain) {
|
||||
for (auto& node_stats : stats) {
|
||||
std::get<1>(node_stats) =
|
||||
GetNodeStateStats(std::get<0>(node_stats).nodeid, std::get<2>(node_stats));
|
||||
if (m_context->peerman) {
|
||||
TRY_LOCK(::cs_main, lockMain);
|
||||
if (lockMain) {
|
||||
for (auto& node_stats : stats) {
|
||||
std::get<1>(node_stats) =
|
||||
m_context->peerman->GetNodeStateStats(std::get<0>(node_stats).nodeid, std::get<2>(node_stats));
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue