aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2015-11-20 16:48:06 +0100
committerMarcoFalke <falke.marco@gmail.com>2016-02-02 20:08:51 +0100
commitfa79db2641182b47b4077345d8261d28c4a87bf0 (patch)
treec6ff08fcad0581a631a82b97835929ffef27b23c /src/main.cpp
parentfd13fe7ca01b6104ce591af2b90ee6951ccc5a16 (diff)
downloadbitcoin-fa79db2641182b47b4077345d8261d28c4a87bf0.tar.xz
Move maxTxFee out of mempool
Also, remove default values in CMerkleTx::AcceptToMemoryPool()
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 4d16b9f9ac..9ed9d0e0b2 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -813,7 +813,7 @@ std::string FormatStateMessage(const CValidationState &state)
}
bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState &state, const CTransaction &tx, bool fLimitFree,
- bool* pfMissingInputs, bool fOverrideMempoolLimit, bool fRejectAbsurdFee,
+ bool* pfMissingInputs, bool fOverrideMempoolLimit, CAmount nAbsurdFee,
std::vector<uint256>& vHashTxnToUncache)
{
const uint256 hash = tx.GetHash();
@@ -1002,10 +1002,10 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState &state, const C
dFreeCount += nSize;
}
- if (fRejectAbsurdFee && nFees > maxTxFee)
+ if (nAbsurdFee && nFees > nAbsurdFee)
return state.Invalid(false,
REJECT_HIGHFEE, "absurdly-high-fee",
- strprintf("%d > %d", nFees, maxTxFee));
+ strprintf("%d > %d", nFees, nAbsurdFee));
// Calculate in-mempool ancestors, up to a limit.
CTxMemPool::setEntries setAncestors;
@@ -1220,10 +1220,10 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState &state, const C
}
bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransaction &tx, bool fLimitFree,
- bool* pfMissingInputs, bool fOverrideMempoolLimit, bool fRejectAbsurdFee)
+ bool* pfMissingInputs, bool fOverrideMempoolLimit, const CAmount nAbsurdFee)
{
std::vector<uint256> vHashTxToUncache;
- bool res = AcceptToMemoryPoolWorker(pool, state, tx, fLimitFree, pfMissingInputs, fOverrideMempoolLimit, fRejectAbsurdFee, vHashTxToUncache);
+ bool res = AcceptToMemoryPoolWorker(pool, state, tx, fLimitFree, pfMissingInputs, fOverrideMempoolLimit, nAbsurdFee, vHashTxToUncache);
if (!res) {
BOOST_FOREACH(const uint256& hashTx, vHashTxToUncache)
pcoinsTip->Uncache(hashTx);