mdbx-test: less probability for aborting nested transactions in nested testcase.

Change-Id: Idf12b69313af7f11a0c9c457942d7a442e37e7b4
This commit is contained in:
Leonid Yuriev
2019-10-18 08:46:52 +03:00
parent b11d655173
commit 7878b2e31d
3 changed files with 8 additions and 1 deletions

View File

@@ -332,6 +332,8 @@ double double_from_upper(uint64_t salt) {
bool flipcoin() { return bleach32((uint32_t)entropy_ticks()) & 1; }
bool flipcoin_x2() { return (bleach32((uint32_t)entropy_ticks()) & 3) == 0; }
bool flipcoin_x3() { return (bleach32((uint32_t)entropy_ticks()) & 7) == 0; }
bool flipcoin_x4() { return (bleach32((uint32_t)entropy_ticks()) & 15) == 0; }
bool jitter(unsigned probability_percent) {
const uint32_t top = UINT32_MAX - UINT32_MAX % 100;