traise exception in case of server error - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit da5a69d88174ce2f5c0c41cbdfb2d385b4a5c677
DIR parent 62be41161bbc20bbfe085db9d24b3aec9b66348b
HTML Author: ThomasV <thomasv@gitorious>
Date: Wed, 7 Nov 2012 20:46:18 +0100
raise exception in case of server error
Diffstat:
M lib/wallet.py | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
---
DIR diff --git a/lib/wallet.py b/lib/wallet.py
t@@ -541,8 +541,7 @@ class Wallet:
def receive_tx_callback(self, tx_hash, tx):
if not self.check_new_tx(tx_hash, tx):
- print "error: transaction not consistent with history", tx_hash
- return
+ raise BaseException("error: received transaction is not consistent with history"%tx_hash)
with self.lock:
self.transactions[tx_hash] = tx
t@@ -555,8 +554,7 @@ class Wallet:
def receive_history_callback(self, addr, hist):
if not self.check_new_history(addr, hist):
- print "error: history check failed", tx_hash
- return
+ raise BaseException("error: received history for %s is not consistent with known transactions"%addr)
with self.lock:
self.history[addr] = hist