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>

[[requires_capability(0x7ff37b420a28), requires_capability(0x7ff376fd83d8), requires_capability(0x7ff38def75f8), requires_capability(0x7ff3640f8608), requires_capability(0x7ff3920f88f8), requires_capability(0x7ff37f5caa18), requires_capability(0x7ff37d011c98), requires_capability(0x7ff374c154a8)]]
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.