mempool: Replace maxFeeRate of 10000*minRelayTxFee with maxTxFee

fa331db68b
This commit is contained in:
lateminer
2018-01-13 01:30:21 +03:00
parent a4dc487b0e
commit 3d26f43eb0
4 changed files with 9 additions and 7 deletions

View File

@@ -92,8 +92,8 @@ uint64_t nPruneTarget = 0;
bool fAlerts = DEFAULT_ALERTS;
bool fEnableReplacement = DEFAULT_ENABLE_REPLACEMENT;
/** Fees smaller than this (in satoshi) are considered zero fee (for relaying, mining and transaction creation) */
CFeeRate minRelayTxFee = CFeeRate(DEFAULT_MIN_RELAY_TX_FEE);
CAmount maxTxFee = DEFAULT_TRANSACTION_MAXFEE;
CTxMemPool mempool(::minRelayTxFee);
@@ -1286,10 +1286,10 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState &state, const C
LogPrint("mempool", "Rate limit dFreeCount: %g => %g\n", dFreeCount, dFreeCount+nSize);
}
if (fRejectAbsurdFee && nFees > ::minRelayTxFee.GetFee(nSize) * 10000)
if (fRejectAbsurdFee && nFees > maxTxFee)
return state.Invalid(false,
REJECT_HIGHFEE, "absurdly-high-fee",
strprintf("%d > %d", nFees, ::minRelayTxFee.GetFee(nSize) * 10000));
strprintf("%d > %d", nFees, maxTxFee));
// Calculate in-mempool ancestors, up to a limit.
CTxMemPool::setEntries setAncestors;