]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
upload.py: rearrange _make_trackers a bit, no behavior changes
authorBrian Warner <warner@lothar.com>
Sun, 27 Feb 2011 02:11:28 +0000 (19:11 -0700)
committerBrian Warner <warner@lothar.com>
Sun, 27 Feb 2011 02:11:28 +0000 (19:11 -0700)
src/allmydata/immutable/upload.py

index 1d6313944075b72fc899197d4c72142d6667ce90..a41fc3b8e24189cbe3887c27a15c97cf0b991c51 100644 (file)
@@ -236,15 +236,18 @@ class Tahoe2ServerSelector(log.PrefixingLogMixin):
         file_cancel_secret = file_cancel_secret_hash(client_cancel_secret,
                                                      storage_index)
         def _make_trackers(servers):
-           return [ServerTracker(serverid, conn,
-                                 share_size, block_size,
-                                 num_segments, num_share_hashes,
-                                 storage_index,
-                                 bucket_renewal_secret_hash(file_renewal_secret,
-                                                            serverid),
-                                 bucket_cancel_secret_hash(file_cancel_secret,
-                                                           serverid))
-                   for (serverid, conn) in servers]
+            trackers = []
+            for (serverid, conn) in servers:
+                seed = serverid
+                renew = bucket_renewal_secret_hash(file_renewal_secret, seed)
+                cancel = bucket_cancel_secret_hash(file_cancel_secret, seed)
+                st = ServerTracker(serverid, conn,
+                                   share_size, block_size,
+                                   num_segments, num_share_hashes,
+                                   storage_index,
+                                   renew, cancel)
+                trackers.append(st)
+            return trackers
         self.uncontacted_trackers = _make_trackers(writable_servers)
 
         # We don't try to allocate shares to these servers, since they've