aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorJ Ross Nicoll <[email protected]>2015-09-03 21:34:03 +0100
committerJ Ross Nicoll <[email protected]>2015-09-06 11:37:03 +0100
commitce196a9bfc2007b4ce79a1ec874c18fdda453caa (patch)
tree1e369abc14f87d54cc3213699f092ce01336c747 /src/wallet
parentMerge pull request #1277 from patricklodder/1.10-fix-travis-extra-compiler (diff)
downloaddiscoin-ce196a9bfc2007b4ce79a1ec874c18fdda453caa.tar.xz
discoin-ce196a9bfc2007b4ce79a1ec874c18fdda453caa.zip
Match fee calculation to legacy code
Purge all support for zero-fee transactions Disable IsDust() for backwards compatibility
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/wallet.cpp10
-rw-r--r--src/wallet/wallet.h6
2 files changed, 9 insertions, 7 deletions
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<CRecipient>& 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<CRecipient>& 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) {
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index 8fcb09b40..2cf7b69c0 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -42,15 +42,15 @@ extern bool fPayAtLeastCustomFee;
//! -paytxfee default
static const CAmount DEFAULT_TRANSACTION_FEE = 0;
//! -paytxfee will warn if called with a higher fee than this amount (in satoshis) per KB
-static const CAmount nHighTransactionFeeWarning = 10 * COIN;
+static const CAmount nHighTransactionFeeWarning = 25 * COIN;
//! -maxtxfee default
-static const CAmount DEFAULT_TRANSACTION_MAXFEE = 100 * COIN;
+static const CAmount DEFAULT_TRANSACTION_MAXFEE = 250 * COIN;
//! -txconfirmtarget default
static const unsigned int DEFAULT_TX_CONFIRM_TARGET = 2;
//! -maxtxfee will warn if called with a higher fee than this amount (in satoshis)
static const CAmount nHighTransactionMaxFeeWarning = 100 * nHighTransactionFeeWarning;
//! Largest (in bytes) free transaction we're willing to create
-static const unsigned int MAX_FREE_TRANSACTION_CREATE_SIZE = 1000;
+static const unsigned int MAX_FREE_TRANSACTION_CREATE_SIZE = 0;
class CAccountingEntry;
class CBlockIndex;