aboutsummaryrefslogtreecommitdiff
path: root/doc/dependencies.md
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2022-01-23 10:29:13 +0800
committerfanquake <fanquake@gmail.com>2022-01-23 11:44:02 +0800
commit6d859cbd794a36ed1c0c72324a4ec54d029b3d3b (patch)
tree281e70ce8f1532d82c6ebec2eff9c0687393b15e /doc/dependencies.md
parente3ce019667fba2ec50a59814a26566fb67fa9125 (diff)
parent9b8dcb25b57ad31b77c9f37d9a1f5b07dc6378b4 (diff)
downloadbitcoin-6d859cbd794a36ed1c0c72324a4ec54d029b3d3b.tar.xz
Merge bitcoin/bitcoin#24021: Rename and move PoissonNextSend functions
9b8dcb25b57ad31b77c9f37d9a1f5b07dc6378b4 [net processing] Rename PoissonNextSendInbound to NextInvToInbounds (John Newbery) ea99f5d01e56ab0192d211da1034ffb299876937 [net processing] Move PoissonNextSendInbound to PeerManager (John Newbery) bb060746df22c956b8f44e5b8cd1ae4ed73faddc scripted-diff: replace PoissonNextSend with GetExponentialRand (John Newbery) 03cfa1b6035dbcf6a414f9bc432bd9e612801ebb [refactor] Use uint64_t and std namespace in PoissonNextSend (John Newbery) 9e64d69bf74c8a381fb59841519cc3736bce14d4 [move] Move PoissonNextSend to src/random and update comment (John Newbery) Pull request description: `PoissonNextSend` and `PoissonNextSendInbound` are used in the p2p code to obfuscate various regularly occurring processes, in order to make it harder for others to get timing-based information deterministically. The naming of these functions has been confusing to several people (including myself, see also #23347) because the resulting random timestamps don't follow a Poisson distribution but an exponential distribution (related to events in a Poisson process, hence the name). This PR - moves `PoissonNextSend()` out of `net` to `random` and renames it to `GetExponentialRand()` - moves `PoissonNextSendInbound()` out of `CConnman` to `PeerManager` and renames it to `NextInvToInbounds()` - adds documentation for these functions This is work by jnewbery - due to him being less active currently, I opened the PR and will address feedback. ACKs for top commit: jnewbery: ACK 9b8dcb25b5 hebasto: ACK 9b8dcb25b57ad31b77c9f37d9a1f5b07dc6378b4, I have reviewed the code and it looks OK, I agree it can be merged. theStack: ACK 9b8dcb25b57ad31b77c9f37d9a1f5b07dc6378b4 📊 Tree-SHA512: 85c366c994e7147f9981fe863fb9838502643fa61ffd32d55a43feef96a38b79a5daa2c4d38ce01074897cc95fa40c76779816edad53f5265b81b05c3a1f4f50
Diffstat (limited to 'doc/dependencies.md')
0 files changed, 0 insertions, 0 deletions