This prevents unbounded memory usage when a attacker spams a node with "inv" messages.
Add mruset and use it for setInventoryKnown #907
pull sipa wants to merge 1 commits into bitcoin:master from sipa:mruinventory changing 4 files +157 −1-
sipa commented at 5:15 PM on February 27, 2012: member
-
Add mruset and use it for setInventoryKnown c4341fa6ab
-
in src/mruset.h:None in ea5caf7e52 outdated
26 | + iterator end() const { return set.end(); } 27 | + size_type size() const { return set.size(); } 28 | + bool empty() const { return set.empty(); } 29 | + iterator find(const key_type& k) const { return set.find(k); } 30 | + size_type count(const key_type& k) const { return set.count(k); } 31 | + bool inline friend operator==(const mruset& a, const mruset& b) { return a.set() == a.set(); }
gavinandresen commented at 8:03 PM on February 27, 2012:typo: == b.set()
sipa commented at 8:05 PM on February 27, 2012:Seems I forgot to add the changes to this file to the commit; fixed
gavinandresen commented at 8:45 PM on February 27, 2012: contributorACK
gavinandresen merged this on Feb 28, 2012gavinandresen closed this on Feb 28, 2012ptschip referenced this in commit 306a2057ae on Jan 12, 2018ptschip referenced this in commit dde2d83c44 on Jan 17, 2018dexX7 referenced this in commit 4a252329d8 on Apr 4, 2019sipa referenced this in commit 77ccaf5cb9 on Apr 2, 2021sipa referenced this in commit cb8f70f488 on Apr 2, 2021sipa referenced this in commit a110aca93f on Apr 2, 2021sipa referenced this in commit bdca9bcb6c on Apr 23, 2021rebroad referenced this in commit 6e13b4e771 on Jun 23, 2021DrahtBot locked this on Sep 8, 2021ContributorsLinked (view graph)
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: 2026-04-19 09:16 UTC
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-04-19 09:16 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me