diff --git a/src/masternode/meta.cpp b/src/masternode/meta.cpp index c8499c5cb6..4c2ef7889c 100644 --- a/src/masternode/meta.cpp +++ b/src/masternode/meta.cpp @@ -122,9 +122,8 @@ void CMasternodeMetaMan::RemoveGovernanceObject(const uint256& nGovernanceObject std::vector CMasternodeMetaMan::GetAndClearDirtyGovernanceObjectHashes() { - LOCK(cs); - std::vector vecTmp = std::move(vecDirtyGovernanceObjectHashes); - vecDirtyGovernanceObjectHashes.clear(); + std::vector vecTmp; + WITH_LOCK(cs, vecTmp.swap(vecDirtyGovernanceObjectHashes)); return vecTmp; }