From: Brian Warner Date: Tue, 6 Jan 2009 20:57:21 +0000 (-0700) Subject: storage.py: explain what this large and hard-to-recognize 4294967295 number is X-Git-Url: https://git.rkrishnan.org/pf/content/de.html?a=commitdiff_plain;h=ebe767bccf54598833963028d753948c27bd9d97;p=tahoe-lafs%2Ftahoe-lafs.git storage.py: explain what this large and hard-to-recognize 4294967295 number is --- diff --git a/src/allmydata/storage.py b/src/allmydata/storage.py index 0ffb275e..97be42f0 100644 --- a/src/allmydata/storage.py +++ b/src/allmydata/storage.py @@ -118,7 +118,8 @@ class ShareFile: # etc. We do saturation -- a share data length larger than what can fit into the # field is marked as the largest length that can fit into the field. That way, even # if this does happen, the old < v1.3.0 server will still allow clients to read the - # first part of the share. + # first part of the share. The largest size that will fit in this 4-byte field is + # 2**32-1, or 4294967295. f.write(struct.pack(">LLL", 1, min(4294967295, max_size), 0)) f.close() self._lease_offset = max_size + 0x0c