[tor-commits] [sbws/master] fix: relaylist: Update relay status before consensus

juga at torproject.org juga at torproject.org
Mon Mar 9 18:01:37 UTC 2020


commit 51eb50046b2b9b8a5eba15f3c0fd4c93c97e1e77
Author: juga0 <juga at riseup.net>
Date:   Sun Mar 8 18:11:51 2020 +0000

    fix: relaylist: Update relay status before consensus
    
    Update relay status before updating the consensus timestamps
    Timestamps that are not old yet were getting removed because the
    document.valid_after timestamp was still the one from the previous
    consensus.
    
    Closes #33570.
---
 sbws/lib/relaylist.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sbws/lib/relaylist.py b/sbws/lib/relaylist.py
index aaec6ea..9ffff49 100644
--- a/sbws/lib/relaylist.py
+++ b/sbws/lib/relaylist.py
@@ -456,9 +456,9 @@ class RelayList:
                 # If a relay in the previous consensus and is in the current
                 # one, update its timestamp, router status and descriptor.
                 fp = r.fingerprint
-                r.update_consensus_timestamps(timestamp)
                 # new_relays_dict[fp] is the router status.
                 r.update_router_status(new_relays_dict[fp])
+                r.update_consensus_timestamps(timestamp)
                 try:
                     descriptor = c.get_server_descriptor(fp, default=None)
                 except (DescriptorUnavailable, ControllerError) as e:





More information about the tor-commits mailing list