From 92e510f8aa31ebf75a3b55fae28c62db8cef6d19 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Tue, 3 Jul 2018 21:41:40 +0200 Subject: [PATCH] synchronizer: remove warning about improperly sorted histories Not sure if it is still useful but in its current form it was giving false positives all the time. Specifically, the expected sorting is: confirmed txns in blockchain order + mempool txns in arbitrary order. The "sorted" invocation puts mempool txns at the beginning, so the warning is always triggered if there is any unconfirmed history. --- lib/synchronizer.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/synchronizer.py b/lib/synchronizer.py index 6a1f3abb4..48635df81 100644 --- a/lib/synchronizer.py +++ b/lib/synchronizer.py @@ -124,11 +124,6 @@ class Synchronizer(ThreadJob): # tx_fees tx_fees = [(item['tx_hash'], item.get('fee')) for item in result] tx_fees = dict(filter(lambda x:x[1] is not None, tx_fees)) - # Note if the server hasn't been patched to sort the items properly - if hist != sorted(hist, key=lambda x:x[1]): - interface = self.network.interface - # note: we don't actually know which interface was used if it was *just* changed - if interface: interface.print_error("serving improperly sorted address histories") # Check that txids are unique if len(hashes) != len(result): self.print_error("error: server history has non-unique txids: %s"% addr)