Browse Source

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.
3.2.x
SomberNight 7 years ago
parent
commit
92e510f8aa
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 5
      lib/synchronizer.py

5
lib/synchronizer.py

@ -124,11 +124,6 @@ class Synchronizer(ThreadJob):
# tx_fees # tx_fees
tx_fees = [(item['tx_hash'], item.get('fee')) for item in result] 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)) 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 # Check that txids are unique
if len(hashes) != len(result): if len(hashes) != len(result):
self.print_error("error: server history has non-unique txids: %s"% addr) self.print_error("error: server history has non-unique txids: %s"% addr)

Loading…
Cancel
Save