From cead9cd7c6d7f9ca4270da1fa7950fe45faa8949 Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Mon, 14 Dec 2015 07:45:01 +0900 Subject: [PATCH] Ensure zeroes is always non-empty. --- lib/coinchooser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/coinchooser.py b/lib/coinchooser.py index d2cfc0fb..ccd2dbd6 100644 --- a/lib/coinchooser.py +++ b/lib/coinchooser.py @@ -241,7 +241,7 @@ class CoinChooserPrivacy(CoinChooserRandom): zeroes = map(trailing_zeroes, output_amounts) min_zeroes = min(zeroes) max_zeroes = max(zeroes) - zeroes = range(max(0, min_zeroes - 1), min(max_zeroes + 1, 8) + 1) + zeroes = range(max(0, min_zeroes - 1), (max_zeroes + 1) + 1) # Calculate change; randomize it a bit if using more than 1 output remaining = change_amount