Skip to content

Commit 1d620d1

Browse files
authored
Fix calls to AcceptToMemoryPool in PS submodules (#1823)
1 parent 1448506 commit 1d620d1

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/privatesend-client.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ bool CPrivateSendClient::SendDenominate(const std::vector<CTxDSIn>& vecTxDSIn, c
419419

420420
mempool.PrioritiseTransaction(tx.GetHash(), tx.GetHash().ToString(), 1000, 0.1*COIN);
421421
TRY_LOCK(cs_main, lockMain);
422-
if(!lockMain || !AcceptToMemoryPool(mempool, validationState, CTransaction(tx), false, NULL, false, true, true)) {
422+
if(!lockMain || !AcceptToMemoryPool(mempool, validationState, CTransaction(tx), false, NULL, false, maxTxFee, true)) {
423423
LogPrintf("CPrivateSendClient::SendDenominate -- AcceptToMemoryPool() failed! tx=%s", tx.ToString());
424424
UnlockCoins();
425425
keyHolderStorage.ReturnAll();

src/privatesend-server.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ void CPrivateSendServer::ProcessMessage(CNode* pfrom, std::string& strCommand, C
216216
LOCK(cs_main);
217217
CValidationState validationState;
218218
mempool.PrioritiseTransaction(tx.GetHash(), tx.GetHash().ToString(), 1000, 0.1*COIN);
219-
if(!AcceptToMemoryPool(mempool, validationState, CTransaction(tx), false, NULL, false, true, true)) {
219+
if(!AcceptToMemoryPool(mempool, validationState, CTransaction(tx), false, NULL, false, maxTxFee, true)) {
220220
LogPrintf("DSVIN -- transaction not valid! tx=%s", tx.ToString());
221221
PushStatus(pfrom, STATUS_REJECTED, ERR_INVALID_TX, connman);
222222
return;
@@ -343,7 +343,7 @@ void CPrivateSendServer::CommitFinalTransaction(CConnman& connman)
343343
TRY_LOCK(cs_main, lockMain);
344344
CValidationState validationState;
345345
mempool.PrioritiseTransaction(hashTx, hashTx.ToString(), 1000, 0.1*COIN);
346-
if(!lockMain || !AcceptToMemoryPool(mempool, validationState, finalTransaction, false, NULL, false, true, true))
346+
if(!lockMain || !AcceptToMemoryPool(mempool, validationState, finalTransaction, false, NULL, false, maxTxFee, true))
347347
{
348348
LogPrintf("CPrivateSendServer::CommitFinalTransaction -- AcceptToMemoryPool() error: Transaction not valid\n");
349349
SetNull();
@@ -446,7 +446,7 @@ void CPrivateSendServer::ChargeFees(CConnman& connman)
446446

447447
CValidationState state;
448448
bool fMissingInputs;
449-
if(!AcceptToMemoryPool(mempool, state, vecOffendersCollaterals[0], false, &fMissingInputs, false, true)) {
449+
if(!AcceptToMemoryPool(mempool, state, vecOffendersCollaterals[0], false, &fMissingInputs, false, maxTxFee)) {
450450
// should never really happen
451451
LogPrintf("CPrivateSendServer::ChargeFees -- ERROR: AcceptToMemoryPool failed!\n");
452452
} else {
@@ -481,7 +481,7 @@ void CPrivateSendServer::ChargeRandomFees(CConnman& connman)
481481

482482
CValidationState state;
483483
bool fMissingInputs;
484-
if(!AcceptToMemoryPool(mempool, state, txCollateral, false, &fMissingInputs, false, true)) {
484+
if(!AcceptToMemoryPool(mempool, state, txCollateral, false, &fMissingInputs, false, maxTxFee)) {
485485
// should never really happen
486486
LogPrintf("CPrivateSendServer::ChargeRandomFees -- ERROR: AcceptToMemoryPool failed!\n");
487487
} else {

src/privatesend.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ bool CPrivateSend::IsCollateralValid(const CTransaction& txCollateral)
213213
{
214214
LOCK(cs_main);
215215
CValidationState validationState;
216-
if(!AcceptToMemoryPool(mempool, validationState, txCollateral, false, NULL, false, true, true)) {
216+
if(!AcceptToMemoryPool(mempool, validationState, txCollateral, false, NULL, false, maxTxFee, true)) {
217217
LogPrint("privatesend", "CPrivateSend::IsCollateralValid -- didn't pass AcceptToMemoryPool()\n");
218218
return false;
219219
}

0 commit comments

Comments
 (0)