electrum

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

commit 3ae1dd3e6416001ed8a6052549d0093c31e360dc
parent b80eacf7bf8e6fe1581c6bc6afb04f2f02baae8d
Author: SomberNight <somber.night@protonmail.com>
Date:   Wed, 31 Jan 2018 16:45:47 +0100

allow coinchooser to spend local txns

Diffstat:
Mlib/coinchooser.py | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/coinchooser.py b/lib/coinchooser.py @@ -286,7 +286,7 @@ class CoinChooserRandom(CoinChooserBase): Any bucket can be: 1. "confirmed" if it only contains confirmed coins; else 2. "unconfirmed" if it does not contain coins with unconfirmed parents - 3. "unconfirmed parent" otherwise + 3. other: e.g. "unconfirmed parent" or "local" This method tries to only use buckets of type 1, and if the coins there are not enough, tries to use the next type but while also selecting @@ -294,9 +294,9 @@ class CoinChooserRandom(CoinChooserBase): """ conf_buckets = [bkt for bkt in buckets if bkt.min_height > 0] unconf_buckets = [bkt for bkt in buckets if bkt.min_height == 0] - unconf_par_buckets = [bkt for bkt in buckets if bkt.min_height == -1] + other_buckets = [bkt for bkt in buckets if bkt.min_height < 0] - bucket_sets = [conf_buckets, unconf_buckets, unconf_par_buckets] + bucket_sets = [conf_buckets, unconf_buckets, other_buckets] already_selected_buckets = [] for bkts_choose_from in bucket_sets: