diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp index b7228d23b2..40c0dde327 100644 --- a/src/masternodeman.cpp +++ b/src/masternodeman.cpp @@ -204,6 +204,15 @@ void CMasternodeMan::CheckAndRemove() } +void CMasternodeMan::Clear() +{ + LOCK(cs); + vMasternodes.clear(); + mAskedUsForMasternodeList.clear(); + mWeAskedForMasternodeList.clear(); + mWeAskedForMasternodeListEntry.clear(); +} + int CMasternodeMan::CountEnabled() { int i = 0; diff --git a/src/masternodeman.h b/src/masternodeman.h index 95f0d72365..07ad32db10 100644 --- a/src/masternodeman.h +++ b/src/masternodeman.h @@ -84,7 +84,7 @@ public: void CheckAndRemove(); // Clear masternode vector - void Clear() { LOCK(cs); vMasternodes.clear(); } + void Clear(); int CountEnabled();