MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / AcceptToMemoryPoolWithTime

Function AcceptToMemoryPoolWithTime

src/validation.cpp:1007–1021  ·  view source on GitHub ↗

(try to) add transaction to memory pool with a specified acceptance time **/

Source from the content-addressed store, hash-verified

1005
1006/** (try to) add transaction to memory pool with a specified acceptance time **/
1007static bool AcceptToMemoryPoolWithTime(const CChainParams& chainparams, CTxMemPool& pool, CValidationState &state, const CTransactionRef &tx,
1008 bool* pfMissingInputs, int64_t nAcceptTime, std::list<CTransactionRef>* plTxnReplaced,
1009 bool bypass_limits, const CAmount nAbsurdFee, bool test_accept)
1010{
1011 std::vector<COutPoint> coins_to_uncache;
1012 bool res = AcceptToMemoryPoolWorker(chainparams, pool, state, tx, pfMissingInputs, nAcceptTime, plTxnReplaced, bypass_limits, nAbsurdFee, coins_to_uncache, test_accept);
1013 if (!res) {
1014 for (const COutPoint& hashTx : coins_to_uncache)
1015 pcoinsTip->Uncache(hashTx);
1016 }
1017 // After we've (potentially) uncached entries, ensure our coins cache is still within its size limits
1018 CValidationState stateDummy;
1019 FlushStateToDisk(chainparams, stateDummy, FlushStateMode::PERIODIC);
1020 return res;
1021}
1022
1023bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransactionRef &tx,
1024 bool* pfMissingInputs, std::list<CTransactionRef>* plTxnReplaced,

Callers 2

AcceptToMemoryPoolFunction · 0.85
LoadMempoolFunction · 0.85

Calls 3

AcceptToMemoryPoolWorkerFunction · 0.85
FlushStateToDiskFunction · 0.85
UncacheMethod · 0.80

Tested by

no test coverage detected