@@ -124,17 +124,11 @@ MessageProcessingResult CCoinJoinClientQueueManager::ProcessMessage(NodeId from,
124124 LogPrint (BCLog::COINJOIN, " DSQUEUE -- CoinJoin queue is ready, masternode=%s, queue=%s\n " , dmn->proTxHash .ToString (), dsq.ToString ());
125125 return ret;
126126 } else {
127- int64_t nLastDsq = m_mn_metaman.GetMetaInfo (dmn->proTxHash )->GetLastDsq ();
128- int64_t nDsqThreshold = m_mn_metaman.GetDsqThreshold (dmn->proTxHash , tip_mn_list.GetValidMNsCount ());
129- LogPrint (BCLog::COINJOIN, " DSQUEUE -- nLastDsq: %d nDsqThreshold: %d nDsqCount: %d\n " , nLastDsq,
130- nDsqThreshold, m_mn_metaman.GetDsqCount ());
131- // don't allow a few nodes to dominate the queuing process
132- if (nLastDsq != 0 && nDsqThreshold > m_mn_metaman.GetDsqCount ()) {
127+ if (m_mn_metaman.IsDsqOver (dmn->proTxHash , tip_mn_list.GetValidMNsCount ())) {
133128 LogPrint (BCLog::COINJOIN, " DSQUEUE -- Masternode %s is sending too many dsq messages\n " ,
134129 dmn->proTxHash .ToString ());
135130 return ret;
136131 }
137-
138132 m_mn_metaman.AllowMixing (dmn->proTxHash );
139133
140134 LogPrint (BCLog::COINJOIN, " DSQUEUE -- new CoinJoin queue, masternode=%s, queue=%s\n " , dmn->proTxHash .ToString (), dsq.ToString ());
@@ -1180,13 +1174,10 @@ bool CCoinJoinClientSession::StartNewQueue(CAmount nBalanceNeedsAnonymized, CCon
11801174 continue ;
11811175 }
11821176
1183- int64_t nLastDsq = m_mn_metaman.GetMetaInfo (dmn->proTxHash )->GetLastDsq ();
1184- int64_t nDsqThreshold = m_mn_metaman.GetDsqThreshold (dmn->proTxHash , nMnCount);
1185- if (nLastDsq != 0 && nDsqThreshold > m_mn_metaman.GetDsqCount ()) {
1177+ if (m_mn_metaman.IsDsqOver (dmn->proTxHash , nMnCount)) {
11861178 WalletCJLogPrint (m_wallet, /* Continued */
1187- " CCoinJoinClientSession::StartNewQueue -- too early to mix with node," /* Continued */
1188- " masternode=%s, nLastDsq=%d, nDsqThreshold=%d, nDsqCount=%d\n " ,
1189- dmn->proTxHash .ToString (), nLastDsq, nDsqThreshold, m_mn_metaman.GetDsqCount ());
1179+ " CCoinJoinClientSession::StartNewQueue -- too early to mix with node masternode=%s\n " ,
1180+ dmn->proTxHash .ToString ());
11901181 nTries++;
11911182 continue ;
11921183 }
0 commit comments