[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [sbws/maint-1.1] fix: relalist: Use the consensus timestamp
commit aa6b79d343dfe43fa6bb447a9d9c37d41c37e589
Author: juga0 <juga@xxxxxxxxxx>
Date: Fri Mar 5 11:51:59 2021 +0000
fix: relalist: Use the consensus timestamp
to the relay consensus timestamps list, so that it can be
tested it was in a concrete consensus.
---
sbws/lib/relaylist.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/sbws/lib/relaylist.py b/sbws/lib/relaylist.py
index 4f33799..2a0bd8d 100644
--- a/sbws/lib/relaylist.py
+++ b/sbws/lib/relaylist.py
@@ -71,7 +71,11 @@ class Relay:
self.relay_in_recent_consensus = timestamps.DateTimeSeq(
[], MAX_RECENT_CONSENSUS_COUNT
)
- self.update_relay_in_recent_consensus()
+ # Use the same timestamp as the consensus, so that it can be tested
+ # that the relay was in a consensus using this timestamp.
+ # Note that this doesn't change the number of consensus the relay was
+ # in.
+ self.update_relay_in_recent_consensus(timestamp)
# The number of times that a relay is "prioritized" to be measured.
# It is incremented in ``RelayPrioritizer.best_priority``
self.relay_recent_priority_list = timestamps.DateTimeSeq(
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits