add dust check instead of higher fees
This commit is contained in:
11
src/main.cpp
11
src/main.cpp
@@ -1240,6 +1240,17 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
|
||||
AssertLockHeld(cs_main);
|
||||
if (pfMissingInputs)
|
||||
*pfMissingInputs = false;
|
||||
int dust_tx_count = 0;
|
||||
CAmount min_dust = 100000;
|
||||
|
||||
BOOST_FOREACH (const CTxOut& txout, tx.vout) {
|
||||
// LogPrintf("tx_out value %d, minimum value %d dust count %d", txout.nValue, min_dust, dust_tx_count);
|
||||
if (txout.nValue < min_dust)
|
||||
dust_tx_count = dust_tx_count + 1;
|
||||
if (dust_tx_count > 10)
|
||||
return state.DoS(0, false, REJECT_DUST, "too many dust vouts");
|
||||
|
||||
}
|
||||
|
||||
if (!CheckTransaction(tx, state))
|
||||
return false; // state filled in by CheckTransaction
|
||||
|
||||
@@ -43,11 +43,11 @@ extern bool fWalletUnlockStakingOnly;
|
||||
|
||||
static const unsigned int DEFAULT_KEYPOOL_SIZE = 100;
|
||||
//! -paytxfee default
|
||||
static const CAmount DEFAULT_TRANSACTION_FEE = 100000;
|
||||
static const CAmount DEFAULT_TRANSACTION_FEE = 10000;
|
||||
//! -fallbackfee default
|
||||
static const CAmount DEFAULT_FALLBACK_FEE = 100000;
|
||||
static const CAmount DEFAULT_FALLBACK_FEE = 10000;
|
||||
//! -mintxfee default
|
||||
static const CAmount DEFAULT_TRANSACTION_MINFEE = 100000;
|
||||
static const CAmount DEFAULT_TRANSACTION_MINFEE = 10000;
|
||||
//! minimum change amount
|
||||
static const CAmount MIN_CHANGE = CENT;
|
||||
//! Default for -spendzeroconfchange
|
||||
|
||||
Reference in New Issue
Block a user