URI: 
       tfix #2270: height sorting can use negative value - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit 31cd9753aad82de5e02c6379a78e6feea8e89f44
   DIR parent c506c3e720ea44a974415f443be87df65a90048e
  HTML Author: ThomasV <thomasv@electrum.org>
       Date:   Sat, 11 Mar 2017 12:06:15 +0100
       
       fix #2270: height sorting can use negative value
       
       Diffstat:
         M lib/coinchooser.py                  |       2 +-
       
       1 file changed, 1 insertion(+), 1 deletion(-)
       ---
   DIR diff --git a/lib/coinchooser.py b/lib/coinchooser.py
       t@@ -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 = []