redo fixes for 1324

This commit is contained in:
ThomasV 2015-07-02 09:22:59 +02:00
parent ccd07c6a80
commit fa2de58c90
1 changed files with 4 additions and 3 deletions

View File

@ -99,13 +99,14 @@ class WalletSynchronizer():
# Check that txids are unique
hashes = set(map(lambda item: item['tx_hash'], result))
if len(hashes) != len(result):
raise Exception("error: server history has non-unique txids: %s"
% addr)
self.print_error("error: server history has non-unique txids: %s"% addr)
return
# Check that the status corresponds to what was announced
hist = map(lambda item: (item['tx_hash'], item['height']), result)
if self.wallet.get_status(hist) != server_status:
raise Exception("error: status mismatch: %s" % addr)
self.print_error("error: status mismatch: %s" % addr)
return
# Store received history
self.wallet.receive_history_callback(addr, hist)