CTxMemPool::TrimToSize

Remove transactions from the mempool until its dynamic size is <= sizelimit. pvNoSpendsRemaining, if set, will be populated with the list of outpoints which are not in mempool which no longer have any spends in this mempool.

Synopsis

Declared in <txmempool.h>

void
TrimToSize(
    size_t sizelimit,
    std::vector<COutPoint>* pvNoSpendsRemaining = nullptr);

Parameters

NameDescription
sizelimitThe target maximum dynamic memory size, in bytes.
pvNoSpendsRemainingIf set, receives outpoints no longer spent by the mempool.