]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
control.py: fix speedtest: use download_best_version (not read) on mutable nodes
authorBrian Warner <warner@lothar.com>
Mon, 7 Dec 2009 06:05:12 +0000 (22:05 -0800)
committerBrian Warner <warner@lothar.com>
Mon, 7 Dec 2009 06:05:12 +0000 (22:05 -0800)
src/allmydata/control.py

index 9fe8e8e7248f032aa52551662c21fb77ba30fbaf..8c12b034a0e853a45b3035d01d195cbc67f83cd7 100644 (file)
@@ -199,7 +199,10 @@ class SpeedTest:
             if i >= self.count:
                 return
             n = self.parent.create_node_from_uri(self.uris[i])
-            d1 = n.read(DiscardingConsumer())
+            if n.is_mutable():
+                d1 = n.download_best_version()
+            else:
+                d1 = n.read(DiscardingConsumer())
             d1.addCallback(_download_one_file, i+1)
             return d1
         d.addCallback(_download_one_file, 0)