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(0x7fbc8f684b38), requires_capability(0x7fbc95d46898), requires_capability(0x7fbca708c558), requires_capability(0x7fbc86274df8), requires_capability(0x7fbca78994d8), requires_capability(0x7fbc84abab28), requires_capability(0x7fbc870fa028), requires_capability(0x7fbc921e18e8)]]
void
TrimToSize(
    size_t sizelimit,
    std::vector<COutPoint>* pvNoSpendsRemaining = nullptr);

Parameters

Name

Description

sizelimit

The target maximum dynamic memory size, in bytes.

pvNoSpendsRemaining

If set, receives outpoints no longer spent by the mempool.

Created with MrDocs