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:
Matt Corallo 2017-02-06 11:44:38 -05:00 committed by Larry Ruane
parent 208a1a5867
commit 5d3586f707
1 changed files with 2 additions and 3 deletions

View File

@ -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());
}
}