aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.cpp
diff options
context:
space:
mode:
authorGavin Andresen <[email protected]>2013-04-25 20:11:27 -0400
committerGavin Andresen <[email protected]>2013-05-03 10:54:31 -0400
commit000dc55181f77cd96076c76b2cc13f8bcbe4146e (patch)
tree374d5c65a265dbd59b1957ec9c128cd056be7ef6 /src/wallet.cpp
parentCreateTransaction: return strFailReason on failure (diff)
downloaddiscoin-000dc55181f77cd96076c76b2cc13f8bcbe4146e.tar.xz
discoin-000dc55181f77cd96076c76b2cc13f8bcbe4146e.zip
Un-hardcode TX_FEE constants
Allow setting of MIN_TX_FEE / MIN_RELAY_TX_FEE with -mintxfee / -mintxrelayfee Default values are the same (0.0001 BTC).
Diffstat (limited to 'src/wallet.cpp')
-rw-r--r--src/wallet.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 65d2c3b68..532a73201 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -1197,12 +1197,12 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64> >& vecSend,
}
int64 nChange = nValueIn - nValue - nFeeRet;
- // if sub-cent change is required, the fee must be raised to at least MIN_TX_FEE
+ // if sub-cent change is required, the fee must be raised to at least nMinTxFee
// or until nChange becomes zero
// NOTE: this depends on the exact behaviour of GetMinFee
- if (nFeeRet < MIN_TX_FEE && nChange > 0 && nChange < CENT)
+ if (nFeeRet < CTransaction::nMinTxFee && nChange > 0 && nChange < CENT)
{
- int64 nMoveToFee = min(nChange, MIN_TX_FEE - nFeeRet);
+ int64 nMoveToFee = min(nChange, CTransaction::nMinTxFee - nFeeRet);
nChange -= nMoveToFee;
nFeeRet += nMoveToFee;
}