From ce196a9bfc2007b4ce79a1ec874c18fdda453caa Mon Sep 17 00:00:00 2001 From: J Ross Nicoll Date: Thu, 3 Sep 2015 21:34:03 +0100 Subject: Match fee calculation to legacy code Purge all support for zero-fee transactions Disable IsDust() for backwards compatibility --- src/wallet/wallet.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/wallet/wallet.cpp') diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index c635d21db..d57c8c082 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1923,7 +1923,8 @@ bool CWallet::CreateTransaction(const vector& vecSend, dPriority = wtxNew.ComputePriority(dPriority, nBytes); // Can we complete this as a free transaction? - if (fSendFreeTransactions && nBytes <= MAX_FREE_TRANSACTION_CREATE_SIZE) + // Dogecoin: Disable free transactions + /* if (fSendFreeTransactions && nBytes <= MAX_FREE_TRANSACTION_CREATE_SIZE) { // Not enough fee: enough priority? double dPriorityNeeded = mempool.estimatePriority(nTxConfirmTarget); @@ -1934,7 +1935,7 @@ bool CWallet::CreateTransaction(const vector& vecSend, // Small enough, and priority high enough, to send for free if (dPriorityNeeded > 0 && dPriority >= dPriorityNeeded) break; - } + } */ CAmount nFeeNeeded = GetMinimumFee(txNew, nBytes, nTxConfirmTarget, mempool); @@ -2023,8 +2024,9 @@ CAmount CWallet::GetMinimumFee(const CMutableTransaction& tx, unsigned int nTxBy if (fPayAtLeastCustomFee && nFeeNeeded > 0 && nFeeNeeded < payTxFee.GetFeePerK()) nFeeNeeded = payTxFee.GetFeePerK(); // User didn't set: use -txconfirmtarget to estimate... - if (nFeeNeeded == 0) - nFeeNeeded = pool.estimateFee(nConfirmTarget).GetFee(nTxBytes); + // Dogecoin: Disable txconfirmtarget + //if (nFeeNeeded == 0) + // nFeeNeeded = pool.estimateFee(nConfirmTarget).GetFee(nTxBytes); // ... unless we don't have enough mempool data, in which case fall // back to a hard-coded fee if (nFeeNeeded == 0) { -- cgit v1.2.3