MAX_BUCKETS = 256 # per peer -- zfec offers at most 256 shares per file
+DEFAULT_MAX_SEGMENT_SIZE = 128*1024
+
ShareData = StringConstraint(None)
URIExtensionData = StringConstraint(1000)
Number = IntegerConstraint(8) # 2**(8*8) == 16EiB ~= 18e18 ~= 18 exabytes
LeaseRenewSecret = Hash # used to protect bucket lease renewal requests
LeaseCancelSecret = Hash # used to protect bucket lease cancellation requests
-KiB = 1024
-DEFAULT_MAX_SEGMENT_SIZE = 128*KiB
-
class RIStubClient(RemoteInterface):
"""Each client publishes a service announcement for a dummy object called
the StubClient. This object doesn't actually offer any services, but the
from allmydata.mutable.common import UnrecoverableFileError
from allmydata.storage.common import storage_index_to_dir
from allmydata.test.no_network import GridTestMixin
-from allmydata.test.common import ShouldFailMixin, _corrupt_share_data
+from allmydata.test.common import ShouldFailMixin
from allmydata.util.pollmixin import PollMixin
from allmydata.interfaces import NotEnoughSharesError
unittest.TestCase):
# Many of these tests take around 60 seconds on François's ARM buildslave:
# http://tahoe-lafs.org/buildbot/builders/FranXois%20lenny-armv5tel
- # allmydata.test.test_hung_server.HungServerDownloadTest.test_2_good_8_broken_duplicate_share_fail once ERRORed after 197 seconds on Midnight Magic's NetBSD buildslave:
+ # allmydata.test.test_hung_server.HungServerDownloadTest.test_2_good_8_broken_duplicate_share_fail
+ # once ERRORed after 197 seconds on Midnight Magic's NetBSD buildslave:
# http://tahoe-lafs.org/buildbot/builders/MM%20netbsd4%20i386%20warp
# MM's buildslave varies a lot in how long it takes to run tests.
self.add(start, data)
def __len__(self):
- return len(self.missing.translate(None, "1"))
+ return len(self.missing.replace("1", ""))
def _dump(self):
return [i for (i,c) in enumerate(self.missing) if c == "0"]
def _have(self, start, length):
# A). We handle E by replacing the middle and terminating.
if start < s_start:
# case A: insert a new span, then loop with the remainder
- #print " insert new psan"
+ #print " insert new span"
s_len = s_start-start
self.spans.insert(i, (start, data[:s_len]))
i += 1
T.td["speed"]]]
for r_ev in self.download_status.read_events:
(start, length, requesttime, finishtime, bytes, decrypt, paused) = r_ev
- print r_ev
+ #print r_ev
if finishtime is not None:
rtt = finishtime - requesttime - paused
speed = self.render_rate(None, 1.0 * bytes / rtt)