|
|
@ -1135,7 +1135,7 @@ std::string FormatStateMessage(const CValidationState &state)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const CTransaction& tx, bool fLimitFree,
|
|
|
|
bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const CTransaction& tx, bool fLimitFree,
|
|
|
|
bool* pfMissingInputs, bool fOverrideMempoolLimit, const CAmount& nAbsurdFee,
|
|
|
|
bool* pfMissingInputs, int64_t nAcceptTime, bool fOverrideMempoolLimit, const CAmount& nAbsurdFee,
|
|
|
|
std::vector<uint256>& vHashTxnToUncache)
|
|
|
|
std::vector<uint256>& vHashTxnToUncache)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const uint256 hash = tx.GetHash();
|
|
|
|
const uint256 hash = tx.GetHash();
|
|
|
@ -1308,7 +1308,7 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
CTxMemPoolEntry entry(tx, nFees, GetTime(), dPriority, chainActive.Height(), pool.HasNoInputsOf(tx), inChainInputValue, fSpendsCoinbase, nSigOpsCost, lp);
|
|
|
|
CTxMemPoolEntry entry(tx, nFees, nAcceptTime, dPriority, chainActive.Height(), pool.HasNoInputsOf(tx), inChainInputValue, fSpendsCoinbase, nSigOpsCost, lp);
|
|
|
|
unsigned int nSize = entry.GetTxSize();
|
|
|
|
unsigned int nSize = entry.GetTxSize();
|
|
|
|
|
|
|
|
|
|
|
|
// Check that the transaction doesn't have an excessive number of
|
|
|
|
// Check that the transaction doesn't have an excessive number of
|
|
|
@ -1572,11 +1572,11 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransaction &tx, bool fLimitFree,
|
|
|
|
bool AcceptToMemoryPoolWithTime(CTxMemPool& pool, CValidationState &state, const CTransaction &tx, bool fLimitFree,
|
|
|
|
bool* pfMissingInputs, bool fOverrideMempoolLimit, const CAmount nAbsurdFee)
|
|
|
|
bool* pfMissingInputs, int64_t nAcceptTime, bool fOverrideMempoolLimit, const CAmount nAbsurdFee)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
std::vector<uint256> vHashTxToUncache;
|
|
|
|
std::vector<uint256> vHashTxToUncache;
|
|
|
|
bool res = AcceptToMemoryPoolWorker(pool, state, tx, fLimitFree, pfMissingInputs, fOverrideMempoolLimit, nAbsurdFee, vHashTxToUncache);
|
|
|
|
bool res = AcceptToMemoryPoolWorker(pool, state, tx, fLimitFree, pfMissingInputs, nAcceptTime, 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);
|
|
|
@ -1584,6 +1584,12 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
|
|
|
|
return res;
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransaction &tx, bool fLimitFree,
|
|
|
|
|
|
|
|
bool* pfMissingInputs, bool fOverrideMempoolLimit, const CAmount nAbsurdFee)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return AcceptToMemoryPoolWithTime(pool, state, tx, fLimitFree, pfMissingInputs, GetTime(), 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 */
|
|
|
|
bool GetTransaction(const uint256 &hash, CTransaction &txOut, const Consensus::Params& consensusParams, uint256 &hashBlock, bool fAllowSlow)
|
|
|
|
bool GetTransaction(const uint256 &hash, CTransaction &txOut, const Consensus::Params& consensusParams, uint256 &hashBlock, bool fAllowSlow)
|
|
|
|
{
|
|
|
|
{
|
|
|
|