@@ -309,7 +309,7 @@ std::string FormatStateMessage(const CValidationState &state)
309309}
310310
311311bool AcceptToMemoryPoolWorker (CTxMemPool& pool, CValidationState &state, const CTransactionRef& _tx, bool fLimitFree ,
312- bool * pfMissingInputs, bool fOverrideMempoolLimit , bool fRejectAbsurdFee , bool ignoreFees,
312+ bool * pfMissingInputs, int64_t nAcceptTime, bool fOverrideMempoolLimit , bool fRejectAbsurdFee , bool ignoreFees,
313313 std::vector<COutPoint>& coins_to_uncache)
314314{
315315 AssertLockHeld (cs_main);
@@ -495,7 +495,7 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState &state, const C
495495 }
496496 }
497497
498- CTxMemPoolEntry entry (_tx, nFees, GetTime () , dPriority, chainHeight, pool.HasNoInputsOf (tx), inChainInputValue, fSpendsCoinbaseOrCoinstake , nSigOps);
498+ CTxMemPoolEntry entry (_tx, nFees, nAcceptTime , dPriority, chainHeight, pool.HasNoInputsOf (tx), inChainInputValue, fSpendsCoinbaseOrCoinstake , nSigOps);
499499 unsigned int nSize = entry.GetTxSize ();
500500
501501 // Don't accept it if it can't get into a block
@@ -611,11 +611,11 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState &state, const C
611611 return true ;
612612}
613613
614- bool AcceptToMemoryPool (CTxMemPool& pool, CValidationState &state, const CTransactionRef& tx, bool fLimitFree ,
615- bool * pfMissingInputs, bool fOverrideMempoolLimit , bool fRejectAbsurdFee , bool fIgnoreFees )
614+ bool AcceptToMemoryPoolWithTime (CTxMemPool& pool, CValidationState &state, const CTransactionRef& tx, bool fLimitFree ,
615+ bool * pfMissingInputs, int64_t nAcceptTime, bool fOverrideMempoolLimit , bool fRejectAbsurdFee , bool fIgnoreFees )
616616{
617617 std::vector<COutPoint> coins_to_uncache;
618- bool res = AcceptToMemoryPoolWorker (pool, state, tx, fLimitFree , pfMissingInputs, fOverrideMempoolLimit , fRejectAbsurdFee , fIgnoreFees , coins_to_uncache);
618+ bool res = AcceptToMemoryPoolWorker (pool, state, tx, fLimitFree , pfMissingInputs, nAcceptTime, fOverrideMempoolLimit , fRejectAbsurdFee , fIgnoreFees , coins_to_uncache);
619619 if (!res) {
620620 for (const COutPoint& outpoint: coins_to_uncache)
621621 pcoinsTip->Uncache (outpoint);
@@ -626,6 +626,13 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
626626 return res;
627627}
628628
629+ bool AcceptToMemoryPool (CTxMemPool& pool, CValidationState& state, const CTransactionRef& tx,
630+ bool fLimitFree , bool * pfMissingInputs, bool fOverrideMempoolLimit ,
631+ bool fRejectInsaneFee , bool ignoreFees)
632+ {
633+ return AcceptToMemoryPoolWithTime (pool, state, tx, fLimitFree , pfMissingInputs, GetTime (), fOverrideMempoolLimit , fRejectInsaneFee , ignoreFees);
634+ }
635+
629636bool GetOutput (const uint256& hash, unsigned int index, CValidationState& state, CTxOut& out)
630637{
631638 CTransaction txPrev;
0 commit comments