diff --git a/src/darksend.cpp b/src/darksend.cpp index 09bda9ed22..4787199331 100644 --- a/src/darksend.cpp +++ b/src/darksend.cpp @@ -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::iterator it = vecMasternodes.begin(); //check them separately while(it != vecMasternodes.end()){