Skip to content

Commit 8b6a06c

Browse files
authored
fix unsafe vNodes access (#1403)
1 parent 828b639 commit 8b6a06c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/masternode-sync.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ bool CMasternodeSync::IsBlockchainSynced(bool fBlockAccepted)
9292
std::vector<CNode*> vNodesCopy = CopyNodeVector();
9393

9494
// We have enough peers and assume most of them are synced
95-
if(vNodes.size() >= MASTERNODE_SYNC_ENOUGH_PEERS) {
95+
if(vNodesCopy.size() >= MASTERNODE_SYNC_ENOUGH_PEERS) {
9696
// Check to see how many of our peers are (almost) at the same height as we are
9797
int nNodesAtSameHeight = 0;
9898
BOOST_FOREACH(CNode* pnode, vNodesCopy)

0 commit comments

Comments
 (0)