Stop trimming when mapTx is empty #8220

pull sipa wants to merge 1 commits into bitcoin:master from sipa:notrimempty changing 1 files +1 −1
  1. sipa commented at 4:52 pm on June 18, 2016: member

    When CTxMemPool::TrimToSize is called with a very low number (like somewhere in mempool_tests), it is possible that the memory usage never sinks below the specified number.

    This is unlikely to be a problem right now, but will be with the introduction of CTxMemPool::vTxHashes in #8068.

  2. Stop trimming when mapTx is empty ad0752e41f
  3. MarcoFalke added the label Mempool on Jun 18, 2016
  4. pstratem commented at 6:04 pm on June 18, 2016: contributor
    @sipa ie sizelimit < overhead of zero transactions ?
  5. sipa commented at 6:10 pm on June 18, 2016: member
    @pstratem Yes, given that there are various support data structures in the mempool whose size is hard to scale linearly with the number of transactions, this seems like a reasonable solution. There are certainly others (like requiring the trim size to be at least a multiple of a transaction + overhead), but this is so simple and probably something that should have been there as a safeguard from the start.
  6. gmaxwell commented at 6:18 pm on June 18, 2016: contributor
    utACK.
  7. pstratem commented at 6:51 pm on June 18, 2016: contributor
    utACK ad0752e41f7804fd1d0e639c51e927ed4f430e09
  8. pstratem commented at 8:04 pm on June 18, 2016: contributor
    ACK ad0752e41f7804fd1d0e639c51e927ed4f430e09
  9. dcousens commented at 12:34 pm on June 19, 2016: contributor
    utACK ad0752e
  10. gmaxwell commented at 8:30 pm on June 19, 2016: contributor
    ACK ad0752e41f7804fd1d0e639c51e927ed4f430e09 (upgrade from prior utack)
  11. laanwj merged this on Jun 20, 2016
  12. laanwj closed this on Jun 20, 2016

  13. laanwj referenced this in commit 1f86d64f6d on Jun 20, 2016
  14. codablock referenced this in commit 61de3d95f6 on Sep 16, 2017
  15. codablock referenced this in commit 6e3826bdfa on Sep 19, 2017
  16. codablock referenced this in commit 07cb9f6442 on Dec 27, 2017
  17. codablock referenced this in commit c2dabf8bd8 on Dec 28, 2017
  18. andvgal referenced this in commit 26fe6f3321 on Jan 6, 2019
  19. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 15:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me