electrum

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

commit dd8493f97e0b4c6db3b6b4d8b0bf74ed6c5c60be
parent 65e7dca3def6c90caa5a1ca7c9504c52d1892d4b
Author: ThomasV <thomasv@gitorious>
Date:   Wed, 27 May 2015 11:07:57 +0200

make coin selection a bit faster

Diffstat:
Mlib/wallet.py | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/wallet.py b/lib/wallet.py @@ -863,8 +863,12 @@ class Abstract_Wallet(object): total += v self.add_input_info(item) tx.add_input(item) + # no need to estimate fee until we have reached desired amount + if total < amount: + continue fee = fixed_fee if fixed_fee is not None else self.estimated_fee(tx) - if total >= amount + fee: break + if total >= amount + fee: + break else: raise NotEnoughFunds() # remove unneeded inputs