l0rinc
commented at 10:33 PM on August 6, 2026:
contributor
Problem: The mempool memory estimate omits the txid set used to retry the initial broadcast of locally submitted transactions, so getmempoolinfo and -maxmempool undercount retained memory.
Fix: Count this set when calculating mempool memory usage.
test: characterize unbroadcast memory accounting
Track a mempool transaction before and after adding its txid to the unbroadcast set, which currently retains a node without changing reported memory usage.
8d5c4a9290
mempool: include unbroadcast txid memory
Include `m_unbroadcast_txids` in `DynamicMemoryUsage()` to count the set nodes retained for locally submitted transactions awaiting their first successful broadcast, with at most one entry per mempool transaction.
db21e03c9d
DrahtBot added the label Mempool on Aug 6, 2026
DrahtBot
commented at 10:33 PM on August 6, 2026:
contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
If your review is incorrectly listed, please copy-paste <code><!--meta-tag:bot-skip--></code> into the comment that the bot should ignore.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
DrahtBot closed this on Aug 7, 2026
DrahtBot reopened this on Aug 7, 2026
jeanpablojp
commented at 1:07 PM on August 8, 2026:
contributor
ACKdb21e03c9d50386072a1123568f917ba65dcf348
I have tested the code. m_unbroadcast_txids is a std::set<Txid> that memusage.h handles, 80 bytes per txid on my build, and it was not counted elsewhere in DynamicMemoryUsage(). Dropping the term makes the added test fail (760 <= 760), so it covers the change. Built the merge with master (05a7c47): unit suite, mempool_unbroadcast.py and mempool_persist.py pass.
sedited requested review from instagibbs on Sep 20, 2026
sedited requested review from ismaelsadeeq on Sep 20, 2026
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: 2026-09-20 20:52 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me