diff options
author | Ava Chow <github@achow101.com> | 2024-02-08 13:41:02 -0500 |
---|---|---|
committer | Ava Chow <github@achow101.com> | 2024-02-08 13:49:15 -0500 |
commit | 2bd0bf7cd963737aaab5815e81230f92151662d1 (patch) | |
tree | f246044768a4a51e1e667581c29769543bccba1d /doc/translation_process.md | |
parent | ecbf4bae9cb1815ac0b2e2d4cac15471c9da44d2 (diff) | |
parent | e064487ca28c12ba774c2f43a3c7acbdb1a278c9 (diff) |
Merge bitcoin/bitcoin#27319: addrman, refactor: improve stochastic test in `AddSingle`
e064487ca28c12ba774c2f43a3c7acbdb1a278c9 addrman, refactor: improve stochastic test in `AddSingle` (brunoerg)
Pull request description:
This PR changes this algorithm to be O(1) instead of O(n). Also, in the current implementation, if `pinfo->nRefCount` is 0, we created an unnecessary variable (`nFactor`), this changes it. the change is relatively simple and does not cause conflicts.
ACKs for top commit:
achow101:
ACK e064487ca28c12ba774c2f43a3c7acbdb1a278c9
amitiuttarwar:
ACK e064487ca28c12ba774c2f43a3c7acbdb1a278c9
stratospher:
ACK e064487ca28c12ba774c2f43a3c7acbdb1a278c9. simple use of << instead of a loop, didn't observe any behaviour difference before and after.
Tree-SHA512: ff0a65155e47f65d2ce3cb5a3fd7a86efef1861181143df13a9d8e59cb16aee9be2f8801457bba8478b17fac47b015bff5cc656f6fac2ccc071ee7178a38d291
Diffstat (limited to 'doc/translation_process.md')
0 files changed, 0 insertions, 0 deletions