fix unsafe vNodes access (#1403)

This commit is contained in:
UdjinM6 2017-03-20 04:20:52 +03:00 committed by GitHub
parent 828b639e36
commit 8b6a06c09f

View File

@ -92,7 +92,7 @@ bool CMasternodeSync::IsBlockchainSynced(bool fBlockAccepted)
std::vector<CNode*> vNodesCopy = CopyNodeVector();
// We have enough peers and assume most of them are synced
if(vNodes.size() >= MASTERNODE_SYNC_ENOUGH_PEERS) {
if(vNodesCopy.size() >= MASTERNODE_SYNC_ENOUGH_PEERS) {
// Check to see how many of our peers are (almost) at the same height as we are
int nNodesAtSameHeight = 0;
BOOST_FOREACH(CNode* pnode, vNodesCopy)