Fixed segfault causes by coins view

This commit is contained in:
Evan Duffield 2015-01-23 07:48:39 -07:00
parent 7e087dadb9
commit 26ebf1d7cb

View File

@ -2206,6 +2206,13 @@ void ThreadCheckDarkSendPool()
darkSendPool.CheckTimeout();
if(c % 60 == 0){
LOCK(cs_main);
/*
cs_main is required for doing masternode.Check because something
is modifying the coins view without a mempool lock. It causes
segfaults from this code without the cs_main lock.
*/
vector<CMasterNode>::iterator it = vecMasternodes.begin();
//check them separately
while(it != vecMasternodes.end()){