commit 671a73d02b7d195a7c568a4c02c3e10a130a4135
parent a5c5b052352ff55dd30fd0f9edcdeb98c6bc12d3
Author: thomasv <thomasv@gitorious>
Date: Sun, 15 Sep 2013 16:15:20 +0200
sanitize prioritized_addresses, making sure they are in the wallet before trying to use them
Diffstat:
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/lib/wallet.py b/lib/wallet.py
@@ -959,16 +959,18 @@ class Wallet:
fee = self.fee if fixed_fee is None else fixed_fee
if domain is None:
domain = self.addresses()
- coins = []
- prioritized_coins = []
+
for i in self.frozen_addresses:
if i in domain: domain.remove(i)
+ prioritized = []
for i in self.prioritized_addresses:
- if i in domain: domain.remove(i)
+ if i in domain:
+ domain.remove(i)
+ prioritized.append(i)
coins = self.get_unspent_coins(domain)
- prioritized_coins = self.get_unspent_coins(self.prioritized_addresses)
+ prioritized_coins = self.get_unspent_coins(prioritized)
inputs = []
coins = prioritized_coins + coins