@@ -212,17 +212,6 @@ void CPrivateSendServer::ProcessMessage(CNode* pfrom, const std::string& strComm
212212 PushStatus (pfrom, STATUS_REJECTED, ERR_FEES, connman);
213213 return ;
214214 }
215-
216- {
217- LOCK (cs_main);
218- CValidationState validationState;
219- mempool.PrioritiseTransaction (tx.GetHash (), tx.GetHash ().ToString (), 1000 , 0.1 *COIN);
220- if (!AcceptToMemoryPool (mempool, validationState, MakeTransactionRef (tx), false , NULL , false , maxTxFee, true )) {
221- LogPrintf (" DSVIN -- transaction not valid! tx=%s" , tx.ToString ());
222- PushStatus (pfrom, STATUS_REJECTED, ERR_INVALID_TX, connman);
223- return ;
224- }
225- }
226215 }
227216
228217 PoolMessage nMessageID = MSG_NOERR;
@@ -443,16 +432,7 @@ void CPrivateSendServer::ChargeFees(CConnman& connman)
443432 LogPrintf (" CPrivateSendServer::ChargeFees -- found uncooperative node (didn't %s transaction), charging fees: %s\n " ,
444433 (nState == POOL_STATE_SIGNING) ? " sign" : " send" , vecOffendersCollaterals[0 ]->ToString ());
445434
446- LOCK (cs_main);
447-
448- CValidationState state;
449- bool fMissingInputs ;
450- if (!AcceptToMemoryPool (mempool, state, vecOffendersCollaterals[0 ], false , &fMissingInputs , false , maxTxFee)) {
451- // should never really happen
452- LogPrintf (" CPrivateSendServer::ChargeFees -- ERROR: AcceptToMemoryPool failed!\n " );
453- } else {
454- connman.RelayTransaction (*vecOffendersCollaterals[0 ]);
455- }
435+ connman.RelayTransaction (*vecOffendersCollaterals[0 ]);
456436 }
457437}
458438
@@ -472,22 +452,10 @@ void CPrivateSendServer::ChargeRandomFees(CConnman& connman)
472452{
473453 if (!fMasternodeMode ) return ;
474454
475- LOCK (cs_main);
476-
477455 for (const auto & txCollateral : vecSessionCollaterals) {
478-
479456 if (GetRandInt (100 ) > 10 ) return ;
480-
481457 LogPrintf (" CPrivateSendServer::ChargeRandomFees -- charging random fees, txCollateral=%s" , txCollateral->ToString ());
482-
483- CValidationState state;
484- bool fMissingInputs ;
485- if (!AcceptToMemoryPool (mempool, state, txCollateral, false , &fMissingInputs , false , maxTxFee)) {
486- // should never really happen
487- LogPrintf (" CPrivateSendServer::ChargeRandomFees -- ERROR: AcceptToMemoryPool failed!\n " );
488- } else {
489- connman.RelayTransaction (*txCollateral);
490- }
458+ connman.RelayTransaction (*txCollateral);
491459 }
492460}
493461
0 commit comments