net: reference instead of copy in BlockConnected range loop

to fix -Wrange-loop-analysis warning introduced in a029e18
This commit is contained in:
Jon Atack 2020-02-02 10:08:44 +01:00
parent f05c1ac444
commit 9a299a59cc
No known key found for this signature in database
GPG key ID: 4F5721B3D0E3921D

View file

@ -1182,7 +1182,7 @@ void PeerLogicValidation::BlockConnected(const std::shared_ptr<const CBlock>& pb
}
{
LOCK(g_cs_recent_confirmed_transactions);
for (const auto ptx : pblock->vtx) {
for (const auto& ptx : pblock->vtx) {
g_recent_confirmed_transactions->insert(ptx->GetHash());
}
}