diff options
| author | Gavin Andresen <[email protected]> | 2013-10-19 23:01:47 -0700 |
|---|---|---|
| committer | Gavin Andresen <[email protected]> | 2013-10-19 23:01:47 -0700 |
| commit | d3b0fa1d82d0883f2e18e95b91125dd19659a17a (patch) | |
| tree | b63032e40aacde666251fe4a9fee088de3af2bd5 /src/wallet.cpp | |
| parent | Merge pull request #3103 from gavinandresen/appbundle (diff) | |
| parent | Lower maximum size for free transaction creation (diff) | |
| download | discoin-d3b0fa1d82d0883f2e18e95b91125dd19659a17a.tar.xz discoin-d3b0fa1d82d0883f2e18e95b91125dd19659a17a.zip | |
Merge pull request #3008 from gavinandresen/CENTrule
Two small free transaction policy changes
Diffstat (limited to 'src/wallet.cpp')
| -rw-r--r-- | src/wallet.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp index 0f0ce7e63..03d79406d 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -1231,9 +1231,10 @@ 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 nMinTxFee - // or until nChange becomes zero - // NOTE: this depends on the exact behaviour of GetMinFee + // The following if statement should be removed once enough miners + // have upgraded to the 0.9 GetMinFee() rules. Until then, this avoids + // creating free transactions that have change outputs less than + // CENT bitcoins. if (nFeeRet < CTransaction::nMinTxFee && nChange > 0 && nChange < CENT) { int64 nMoveToFee = min(nChange, CTransaction::nMinTxFee - nFeeRet); |