diff options
| author | Luke Dashjr <[email protected]> | 2011-10-03 12:55:47 -0400 |
|---|---|---|
| committer | Luke Dashjr <[email protected]> | 2011-12-14 01:07:43 -0500 |
| commit | dbbf1d4a48c8761a67a4477bef48f17c0badef7b (patch) | |
| tree | 86c34a2d373dd816cd13d48d21a1505d5c227737 /src/wallet.cpp | |
| parent | Bugfix: fForRelay should be false when deciding required fee to include in bl... (diff) | |
| download | discoin-dbbf1d4a48c8761a67a4477bef48f17c0badef7b.tar.xz discoin-dbbf1d4a48c8761a67a4477bef48f17c0badef7b.zip | |
GetMinFee takes a mode parameter (GMF_{BLOCK,RELAY,SEND}) instead of fForRelay
Diffstat (limited to 'src/wallet.cpp')
| -rw-r--r-- | src/wallet.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp index 8bbb80cf2..2c5aa03aa 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -931,6 +931,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64> >& vecSend, CW int64 nChange = nValueIn - nValue - nFeeRet; // if sub-cent change is required, the fee must be raised to at least MIN_TX_FEE // or until nChange becomes zero + // NOTE: this depends on the exact behaviour of GetMinFee if (nFeeRet < MIN_TX_FEE && nChange > 0 && nChange < CENT) { int64 nMoveToFee = min(nChange, MIN_TX_FEE - nFeeRet); @@ -984,7 +985,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64> >& vecSend, CW // Check that enough fee is included int64 nPayFee = nTransactionFee * (1 + (int64)nBytes / 1000); bool fAllowFree = CTransaction::AllowFree(dPriority); - int64 nMinFee = wtxNew.GetMinFee(1, fAllowFree); + int64 nMinFee = wtxNew.GetMinFee(1, fAllowFree, GMF_SEND); if (nFeeRet < max(nPayFee, nMinFee)) { nFeeRet = max(nPayFee, nMinFee); |