Fix bug where we incorrectly calculated 'age_ts' from 'age' key rather than the reverse. Don't transmit age_ts to clients for now.
parent
59516a8bb1
commit
40d2f38abe
|
@ -25,6 +25,7 @@ def serialize_event(hs, e):
|
||||||
d = e.get_dict()
|
d = e.get_dict()
|
||||||
if "age_ts" in d:
|
if "age_ts" in d:
|
||||||
d["age"] = int(hs.get_clock().time_msec()) - d["age_ts"]
|
d["age"] = int(hs.get_clock().time_msec()) - d["age_ts"]
|
||||||
|
del d["age_ts"]
|
||||||
|
|
||||||
return d
|
return d
|
||||||
|
|
||||||
|
|
|
@ -292,8 +292,9 @@ class ReplicationLayer(object):
|
||||||
transaction = Transaction(**transaction_data)
|
transaction = Transaction(**transaction_data)
|
||||||
|
|
||||||
for p in transaction.pdus:
|
for p in transaction.pdus:
|
||||||
if "age_ts" in p:
|
if "age" in p:
|
||||||
p["age"] = int(self._clock.time_msec()) - int(p["age_ts"])
|
p["age_ts"] = int(self._clock.time_msec()) - int(p["age"])
|
||||||
|
del p["age"]
|
||||||
|
|
||||||
pdu_list = [Pdu(**p) for p in transaction.pdus]
|
pdu_list = [Pdu(**p) for p in transaction.pdus]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue