|
|
@ -538,8 +538,8 @@ static bool IsCurrentForFeeEstimation() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const CTransactionRef& ptx, bool fLimitFree, |
|
|
|
bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const CTransactionRef& ptx, bool fLimitFree, |
|
|
|
bool* pfMissingInputs, int64_t nAcceptTime, bool fOverrideMempoolLimit, const CAmount& nAbsurdFee, |
|
|
|
bool* pfMissingInputs, int64_t nAcceptTime, std::list<CTransactionRef>* plTxnReplaced, |
|
|
|
std::vector<uint256>& vHashTxnToUncache) |
|
|
|
bool fOverrideMempoolLimit, const CAmount& nAbsurdFee, std::vector<uint256>& vHashTxnToUncache) |
|
|
|
{ |
|
|
|
{ |
|
|
|
const CTransaction& tx = *ptx; |
|
|
|
const CTransaction& tx = *ptx; |
|
|
|
const uint256 hash = tx.GetHash(); |
|
|
|
const uint256 hash = tx.GetHash(); |
|
|
@ -950,6 +950,8 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C |
|
|
|
hash.ToString(), |
|
|
|
hash.ToString(), |
|
|
|
FormatMoney(nModifiedFees - nConflictingFees), |
|
|
|
FormatMoney(nModifiedFees - nConflictingFees), |
|
|
|
(int)nSize - (int)nConflictingSize); |
|
|
|
(int)nSize - (int)nConflictingSize); |
|
|
|
|
|
|
|
if (plTxnReplaced) |
|
|
|
|
|
|
|
plTxnReplaced->push_back(it->GetSharedTx()); |
|
|
|
} |
|
|
|
} |
|
|
|
pool.RemoveStaged(allConflicting, false); |
|
|
|
pool.RemoveStaged(allConflicting, false); |
|
|
|
|
|
|
|
|
|
|
@ -975,10 +977,11 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bool AcceptToMemoryPoolWithTime(CTxMemPool& pool, CValidationState &state, const CTransactionRef &tx, bool fLimitFree, |
|
|
|
bool AcceptToMemoryPoolWithTime(CTxMemPool& pool, CValidationState &state, const CTransactionRef &tx, bool fLimitFree, |
|
|
|
bool* pfMissingInputs, int64_t nAcceptTime, bool fOverrideMempoolLimit, const CAmount nAbsurdFee) |
|
|
|
bool* pfMissingInputs, int64_t nAcceptTime, std::list<CTransactionRef>* plTxnReplaced, |
|
|
|
|
|
|
|
bool fOverrideMempoolLimit, const CAmount nAbsurdFee) |
|
|
|
{ |
|
|
|
{ |
|
|
|
std::vector<uint256> vHashTxToUncache; |
|
|
|
std::vector<uint256> vHashTxToUncache; |
|
|
|
bool res = AcceptToMemoryPoolWorker(pool, state, tx, fLimitFree, pfMissingInputs, nAcceptTime, fOverrideMempoolLimit, nAbsurdFee, vHashTxToUncache); |
|
|
|
bool res = AcceptToMemoryPoolWorker(pool, state, tx, fLimitFree, pfMissingInputs, nAcceptTime, plTxnReplaced, fOverrideMempoolLimit, nAbsurdFee, vHashTxToUncache); |
|
|
|
if (!res) { |
|
|
|
if (!res) { |
|
|
|
BOOST_FOREACH(const uint256& hashTx, vHashTxToUncache) |
|
|
|
BOOST_FOREACH(const uint256& hashTx, vHashTxToUncache) |
|
|
|
pcoinsTip->Uncache(hashTx); |
|
|
|
pcoinsTip->Uncache(hashTx); |
|
|
@ -990,9 +993,10 @@ bool AcceptToMemoryPoolWithTime(CTxMemPool& pool, CValidationState &state, const |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransactionRef &tx, bool fLimitFree, |
|
|
|
bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransactionRef &tx, bool fLimitFree, |
|
|
|
bool* pfMissingInputs, bool fOverrideMempoolLimit, const CAmount nAbsurdFee) |
|
|
|
bool* pfMissingInputs, std::list<CTransactionRef>* plTxnReplaced, |
|
|
|
|
|
|
|
bool fOverrideMempoolLimit, const CAmount nAbsurdFee) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return AcceptToMemoryPoolWithTime(pool, state, tx, fLimitFree, pfMissingInputs, GetTime(), fOverrideMempoolLimit, nAbsurdFee); |
|
|
|
return AcceptToMemoryPoolWithTime(pool, state, tx, fLimitFree, pfMissingInputs, GetTime(), plTxnReplaced, fOverrideMempoolLimit, nAbsurdFee); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** Return transaction in txOut, and if it was found inside a block, its hash is placed in hashBlock */ |
|
|
|
/** Return transaction in txOut, and if it was found inside a block, its hash is placed in hashBlock */ |
|
|
@ -2138,7 +2142,7 @@ bool static DisconnectTip(CValidationState& state, const CChainParams& chainpara |
|
|
|
const CTransaction& tx = *it; |
|
|
|
const CTransaction& tx = *it; |
|
|
|
// ignore validation errors in resurrected transactions
|
|
|
|
// ignore validation errors in resurrected transactions
|
|
|
|
CValidationState stateDummy; |
|
|
|
CValidationState stateDummy; |
|
|
|
if (tx.IsCoinBase() || !AcceptToMemoryPool(mempool, stateDummy, it, false, NULL, true)) { |
|
|
|
if (tx.IsCoinBase() || !AcceptToMemoryPool(mempool, stateDummy, it, false, NULL, NULL, true)) { |
|
|
|
mempool.removeRecursive(tx); |
|
|
|
mempool.removeRecursive(tx); |
|
|
|
} else if (mempool.exists(tx.GetHash())) { |
|
|
|
} else if (mempool.exists(tx.GetHash())) { |
|
|
|
vHashUpdate.push_back(tx.GetHash()); |
|
|
|
vHashUpdate.push_back(tx.GetHash()); |
|
|
|