tcatch exception in signrawtransaction, if wallet is not synchronized - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 9543d2b5ec54ba6793fe09291bc5cb0593a3538a DIR parent 32cca276fe7a13af0a41d319c5d0ed92211edabc HTML Author: ThomasV <thomasv@gitorious> Date: Sat, 15 Mar 2014 09:59:00 +0100 catch exception in signrawtransaction, if wallet is not synchronized Diffstat: M lib/wallet.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) --- DIR diff --git a/lib/wallet.py b/lib/wallet.py t@@ -741,7 +741,13 @@ class NewWallet: # add redeem script for coins that are in the wallet # FIXME: add redeemPubkey too! - unspent_coins = self.get_unspent_coins() + + try: + unspent_coins = self.get_unspent_coins() + except: + # an exception may be raised is the wallet is not synchronized + unspent_coins = [] + for txin in tx.inputs: for item in unspent_coins: if txin['prevout_hash'] == item['prevout_hash'] and txin['prevout_n'] == item['prevout_n']: