electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 31cd9753aad82de5e02c6379a78e6feea8e89f44
parent c506c3e720ea44a974415f443be87df65a90048e
Author: ThomasV <thomasv@electrum.org>
Date:   Sat, 11 Mar 2017 12:06:15 +0100

fix #2270: height sorting can use negative value

Diffstat:
Mlib/coinchooser.py | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/coinchooser.py b/lib/coinchooser.py @@ -223,7 +223,7 @@ class CoinChooserOldestFirst(CoinChooserBase): def choose_buckets(self, buckets, sufficient_funds, penalty_func): '''Spend the oldest buckets first.''' # Unconfirmed coins are young, not old - adj_height = lambda height: 99999999 if height == 0 else height + adj_height = lambda height: 99999999 if height <= 0 else height buckets.sort(key = lambda b: max(adj_height(coin['height']) for coin in b.coins)) selected = []