Avoid copying CNodeStats to make helgrind OK with buggy std::string
zcash: cherry picked from commit ae683c1b1960b32134f5a5a29504691c91f39cf3 zcash: https://github.com/bitcoin/bitcoin/pull/9708
This commit is contained in:
parent
208a1a5867
commit
5d3586f707
|
@ -68,9 +68,8 @@ static void CopyNodeStats(std::vector<CNodeStats>& vstats)
|
|||
LOCK(cs_vNodes);
|
||||
vstats.reserve(vNodes.size());
|
||||
for (CNode* pnode : vNodes) {
|
||||
CNodeStats stats;
|
||||
pnode->copyStats(stats);
|
||||
vstats.push_back(stats);
|
||||
vstats.emplace_back();
|
||||
pnode->copyStats(vstats.back());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue