From c21cbe61c6249bcfca098705df6f9b4baab9f296 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Fri, 17 Feb 2017 16:32:16 -0800 Subject: [PATCH] Introduce FastRandomContext::randbool() --- src/random.h | 4 ++++ src/wallet/wallet.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/random.h b/src/random.h index 0464bdce1..82886bec5 100644 --- a/src/random.h +++ b/src/random.h @@ -42,6 +42,10 @@ public: return (Rw << 16) + Rz; } + bool randbool() { + return rand32() & 1; + } + uint32_t Rz; uint32_t Rw; }; diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 39e2ab7c1..2f9d47aa0 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2048,7 +2048,7 @@ static void ApproximateBestSubset(const std::vector