mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-21 15:50:07 +01:00
Merge pull request #3008 from gavinandresen/CENTrule
Two small free transaction policy changes
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user