| 445 | static unsigned int GetBlockScriptFlags(const CBlockIndex* pindex, const Consensus::Params& chainparams); |
| 446 | |
| 447 | static void LimitMempoolSize(CTxMemPool& pool, size_t limit, unsigned long age) { |
| 448 | int expired = pool.Expire(GetTime() - age); |
| 449 | if (expired != 0) { |
| 450 | LogPrint(BCLog::MEMPOOL, "Expired %i transactions from the memory pool\n", expired); |
| 451 | } |
| 452 | |
| 453 | std::vector<COutPoint> vNoSpendsRemaining; |
| 454 | pool.TrimToSize(limit, &vNoSpendsRemaining); |
| 455 | for (const COutPoint& removed : vNoSpendsRemaining) |
| 456 | pcoinsTip->Uncache(removed); |
| 457 | } |
| 458 | |
| 459 | /** Convert CValidationState to a human-readable message for logging */ |
| 460 | std::string FormatStateMessage(const CValidationState &state) |
no test coverage detected