GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Commit 2763a868 authored by juga  's avatar juga
Browse files

fix: relaylist: Use is_old fn removing consensus

since the logic is the same and the there were two bugfixes on the
same logic.
parent 77832ace
......@@ -24,9 +24,11 @@ def remove_old_consensus_timestamps(
:param int measurements_period:
:returns list: a new list of ``consensus_timestamps``
"""
oldest_date = datetime.utcnow() - timedelta(seconds=measurements_period)
new_consensus_timestamps = \
[t for t in consensus_timestamps if t >= oldest_date]
new_consensus_timestamps = [
t
for t in consensus_timestamps
if not timestamp.is_old(t, measurements_period)
]
return new_consensus_timestamps
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment