[tor-commits] [sbws/maint-1.1] fix: v3bwfile: Tor version added in bandwidth v1.4.0

juga at torproject.org juga at torproject.org
Tue Dec 15 13:52:00 UTC 2020


commit 50821110c908e5da9f1aab3b14883e39bb226614
Author: juga0 <juga at riseup.net>
Date:   Mon Dec 7 11:28:42 2020 +0000

    fix: v3bwfile: Tor version added in bandwidth v1.4.0
    
    since, by mistake, the bandwidth file version here was never updated
    to v1.5.0.
    This patch only changes the constants names, but logic remains the same.
    
    Related to torspec#35.
---
 sbws/lib/v3bwfile.py | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py
index 45563b6..553265b 100644
--- a/sbws/lib/v3bwfile.py
+++ b/sbws/lib/v3bwfile.py
@@ -125,13 +125,9 @@ HEADER_KEYS_V1_4 = [
     'time_to_report_half_network',
 ] + HEADER_RECENT_MEASUREMENTS_EXCLUDED_KEYS
 
-# KeyValues added in the Bandwidth File v1.5.0
-# XXX: Change SPEC_VERSION when all the v1.5.0 keys are added, before a new
-# sbws release.
 # Tor version will be obtained from the state file, so it won't be pass as an
 # argument, but will be self-initialized.
-HEADER_KEYS_V1_5_TO_INIT = ['tor_version']
-HEADER_KEYS_V1_5 = HEADER_KEYS_V1_5_TO_INIT
+HEADER_KEYS_V1_4_TO_INIT = ['tor_version']
 
 # KeyValues that are initialized from arguments, not self-initialized.
 HEADER_INIT_KEYS = (
@@ -139,7 +135,7 @@ HEADER_INIT_KEYS = (
     + HEADER_KEYS_V1_3
     + HEADER_KEYS_V1_2
     + HEADER_KEYS_V1_4
-    + HEADER_KEYS_V1_5_TO_INIT
+    + HEADER_KEYS_V1_4_TO_INIT
 )
 
 HEADER_INT_KEYS = HEADER_KEYS_V1_2 + HEADER_KEYS_V1_4
@@ -150,7 +146,7 @@ HEADER_UNORDERED_KEYS = (
     + HEADER_KEYS_V1_3
     + HEADER_KEYS_V1_2
     + HEADER_KEYS_V1_4
-    + HEADER_KEYS_V1_5
+    + HEADER_KEYS_V1_4_TO_INIT
 )
 # List of all the KeyValues currently being used to generate the file
 HEADER_ALL_KEYS = HEADER_KEYS_V1_1_ORDERED + HEADER_UNORDERED_KEYS





More information about the tor-commits mailing list