Skip to content

Commit

Permalink
fix unsafe vNodes access (#1403)
Browse files Browse the repository at this point in the history
  • Loading branch information
UdjinM6 committed Mar 20, 2017
1 parent 828b639 commit 8b6a06c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/masternode-sync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8b6a06c

Please sign in to comment.