From bb060746df22c956b8f44e5b8cd1ae4ed73faddc Mon Sep 17 00:00:00 2001 From: John Newbery Date: Wed, 15 Apr 2020 19:06:59 -0400 Subject: scripted-diff: replace PoissonNextSend with GetExponentialRand This distribution is used for more than just the next inv send, so make the name more generic. Also rename to "exponential" to avoid the confusion that this is a poisson distribution. -BEGIN VERIFY SCRIPT- ren() { sed -i "s/\<$1\>/$2/g" $(git grep -l "$1" ./src) ; } ren PoissonNextSend GetExponentialRand ren "a poisson timer" "an exponential timer" -END VERIFY SCRIPT- --- src/random.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/random.h') diff --git a/src/random.h b/src/random.h index be73e44a87..5174c553fb 100644 --- a/src/random.h +++ b/src/random.h @@ -92,7 +92,7 @@ constexpr auto GetRandMillis = GetRandomDuration; * The probability of an event occuring before time x is 1 - e^-(x/a) where a * is the average interval between events. * */ -std::chrono::microseconds PoissonNextSend(std::chrono::microseconds now, std::chrono::seconds average_interval); +std::chrono::microseconds GetExponentialRand(std::chrono::microseconds now, std::chrono::seconds average_interval); int GetRandInt(int nMax) noexcept; uint256 GetRandHash() noexcept; -- cgit v1.2.3