@@ -1135,7 +1135,7 @@ std::string FormatStateMessage(const CValidationState &state)
11351135}
11361136
11371137bool AcceptToMemoryPoolWorker (CTxMemPool& pool, CValidationState& state, const CTransaction& tx, bool fLimitFree ,
1138- bool * pfMissingInputs, bool fOverrideMempoolLimit , const CAmount& nAbsurdFee,
1138+ bool * pfMissingInputs, int64_t nAcceptTime, bool fOverrideMempoolLimit , const CAmount& nAbsurdFee,
11391139 std::vector<uint256>& vHashTxnToUncache)
11401140{
11411141 const uint256 hash = tx.GetHash ();
@@ -1308,7 +1308,7 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
13081308 }
13091309 }
13101310
1311- CTxMemPoolEntry entry (tx, nFees, GetTime () , dPriority, chainActive.Height (), pool.HasNoInputsOf (tx), inChainInputValue, fSpendsCoinbase , nSigOpsCost, lp);
1311+ CTxMemPoolEntry entry (tx, nFees, nAcceptTime , dPriority, chainActive.Height (), pool.HasNoInputsOf (tx), inChainInputValue, fSpendsCoinbase , nSigOpsCost, lp);
13121312 unsigned int nSize = entry.GetTxSize ();
13131313
13141314 // Check that the transaction doesn't have an excessive number of
@@ -1572,18 +1572,24 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
15721572 return true ;
15731573}
15741574
1575- bool AcceptToMemoryPool (CTxMemPool& pool, CValidationState &state, const CTransaction &tx, bool fLimitFree ,
1576- bool * pfMissingInputs, bool fOverrideMempoolLimit , const CAmount nAbsurdFee)
1575+ bool AcceptToMemoryPoolWithTime (CTxMemPool& pool, CValidationState &state, const CTransaction &tx, bool fLimitFree ,
1576+ bool * pfMissingInputs, int64_t nAcceptTime, bool fOverrideMempoolLimit , const CAmount nAbsurdFee)
15771577{
15781578 std::vector<uint256> vHashTxToUncache;
1579- bool res = AcceptToMemoryPoolWorker (pool, state, tx, fLimitFree , pfMissingInputs, fOverrideMempoolLimit , nAbsurdFee, vHashTxToUncache);
1579+ bool res = AcceptToMemoryPoolWorker (pool, state, tx, fLimitFree , pfMissingInputs, nAcceptTime, fOverrideMempoolLimit , nAbsurdFee, vHashTxToUncache);
15801580 if (!res) {
15811581 BOOST_FOREACH (const uint256& hashTx, vHashTxToUncache)
15821582 pcoinsTip->Uncache (hashTx);
15831583 }
15841584 return res;
15851585}
15861586
1587+ bool AcceptToMemoryPool (CTxMemPool& pool, CValidationState &state, const CTransaction &tx, bool fLimitFree ,
1588+ bool * pfMissingInputs, bool fOverrideMempoolLimit , const CAmount nAbsurdFee)
1589+ {
1590+ return AcceptToMemoryPoolWithTime (pool, state, tx, fLimitFree , pfMissingInputs, GetTime (), fOverrideMempoolLimit , nAbsurdFee);
1591+ }
1592+
15871593/* * Return transaction in txOut, and if it was found inside a block, its hash is placed in hashBlock */
15881594bool GetTransaction (const uint256 &hash, CTransaction &txOut, const Consensus::Params& consensusParams, uint256 &hashBlock, bool fAllowSlow )
15891595{
0 commit comments