Warn if server is serving bad address histories
This commit is contained in:
@@ -98,6 +98,10 @@ class Synchronizer(ThreadJob):
|
|||||||
|
|
||||||
# Check that the status corresponds to what was announced
|
# Check that the status corresponds to what was announced
|
||||||
hist = map(lambda item: (item['tx_hash'], item['height']), result)
|
hist = map(lambda item: (item['tx_hash'], item['height']), result)
|
||||||
|
# Note if the server hasn't been patched to sort the items properly
|
||||||
|
if hist != sorted(hist, key=lambda x:x[1]):
|
||||||
|
self.network.interface.print_error("serving improperly sorted "
|
||||||
|
"address histories")
|
||||||
if self.wallet.get_status(hist) != server_status:
|
if self.wallet.get_status(hist) != server_status:
|
||||||
self.print_error("error: status mismatch: %s" % addr)
|
self.print_error("error: status mismatch: %s" % addr)
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user