Merge pull request #52 from billym2k/master

Fix dust issue
This commit is contained in:
dogecoin 2013-12-25 22:35:09 -08:00
commit 2ee5cb3396
5 changed files with 7 additions and 7 deletions

View file

@ -415,7 +415,7 @@ bool AppInit2()
{
if (!ParseMoney(mapArgs["-paytxfee"], nTransactionFee))
return InitError(strprintf(_("Invalid amount for -paytxfee=<amount>: '%s'"), mapArgs["-paytxfee"].c_str()));
if (nTransactionFee > 0.25 * COIN)
if (nTransactionFee > 25.0 * COIN)
InitWarning(_("Warning: -paytxfee is set very high. This is the transaction fee you will pay if you send a transaction."));
}

View file

@ -61,7 +61,7 @@ int64 nHPSTimerStart;
// Settings
int64 nTransactionFee = 0;
int64 nMinimumInputValue = CENT / 100;
int64 nMinimumInputValue = CENT;

View file

@ -31,9 +31,9 @@ static const unsigned int MAX_BLOCK_SIZE = 1000000;
static const unsigned int MAX_BLOCK_SIZE_GEN = MAX_BLOCK_SIZE/2;
static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50;
static const unsigned int MAX_ORPHAN_TRANSACTIONS = MAX_BLOCK_SIZE/100;
static const int64 MIN_TX_FEE = 10000;
static const int64 MIN_TX_FEE = 100000000;
static const int64 MIN_RELAY_TX_FEE = MIN_TX_FEE;
static const int64 MAX_MONEY = 500000000 * COIN; // DogeCoin: maximum of 100B coins (given some randomness), max transaction 500,000,000 for now
static const int64 MAX_MONEY = 10000000000 * COIN; // DogeCoin: maximum of 100B coins (given some randomness), max transaction 10,000,000,000 for now
inline bool MoneyRange(int64 nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
static const int COINBASE_MATURITY = 30;
// Threshold for nLockTime: below this value it is interpreted as block number, otherwise as UNIX timestamp.
@ -540,7 +540,7 @@ public:
{
// Large (in bytes) low-priority (new, small-coin) transactions
// need a fee.
return dPriority > COIN * 1440 / 250; // DogeCoin: 1440 blocks found a day. Priority cutoff is 1 dogecoin day / 250 bytes.
return dPriority > 100 * COIN * 1440 / 250; // DogeCoin: 1440 blocks found a day. Priority cutoff is 100 dogecoin day / 250 bytes.
}
int64 GetMinFee(unsigned int nBlockSize=1, bool fAllowFree=true, enum GetMinFee_mode mode=GMF_BLOCK) const
@ -571,7 +571,7 @@ public:
// To limit dust spam, add MIN_TX_FEE/MIN_RELAY_TX_FEE for any output that is less than 0.01
BOOST_FOREACH(const CTxOut& txout, vout)
if (txout.nValue < CENT)
if (txout.nValue < COIN)
nMinFee += nBaseFee;
// Raise the price as the block approaches full

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 58 KiB

View file

@ -1125,7 +1125,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64> >& vecSend, CW
// 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)
if (nFeeRet < MIN_TX_FEE && nChange > 0 && nChange < COIN)
{
int64 nMoveToFee = min(nChange, MIN_TX_FEE - nFeeRet);
nChange -= nMoveToFee;