@@ -1135,7 +1135,7 @@ std::string FormatStateMessage(const CValidationState &state)
1135
1135
}
1136
1136
1137
1137
bool 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,
1139
1139
std::vector<uint256>& vHashTxnToUncache)
1140
1140
{
1141
1141
const uint256 hash = tx.GetHash ();
@@ -1308,7 +1308,7 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
1308
1308
}
1309
1309
}
1310
1310
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);
1312
1312
unsigned int nSize = entry.GetTxSize ();
1313
1313
1314
1314
// Check that the transaction doesn't have an excessive number of
@@ -1572,18 +1572,24 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
1572
1572
return true ;
1573
1573
}
1574
1574
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)
1577
1577
{
1578
1578
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);
1580
1580
if (!res) {
1581
1581
BOOST_FOREACH (const uint256& hashTx, vHashTxToUncache)
1582
1582
pcoinsTip->Uncache (hashTx);
1583
1583
}
1584
1584
return res;
1585
1585
}
1586
1586
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
+
1587
1593
/* * Return transaction in txOut, and if it was found inside a block, its hash is placed in hashBlock */
1588
1594
bool GetTransaction (const uint256 &hash, CTransaction &txOut, const Consensus::Params& consensusParams, uint256 &hashBlock, bool fAllowSlow )
1589
1595
{
0 commit comments