From: Zooko O'Whielacronx Date: Thu, 29 Nov 2012 20:44:32 +0000 (-0700) Subject: remove unnecessary request from upload-helper X-Git-Tag: allmydata-tahoe-1.10a1~37 X-Git-Url: https://git.rkrishnan.org/pf/content/en/service/contact.html?a=commitdiff_plain;h=abcde9645c3532c15bfdbe8459ca9cecf800979b;p=tahoe-lafs%2Ftahoe-lafs.git remove unnecessary request from upload-helper The unnecessary request was from the upload helper to the sender, and it was there in order to trigger the sender to deliver cleartext hashes. But we've long since removed cleartext hashes. Unit tests pass both before and after this change, and code-coverage shows that the block I changed is exercised in unit tests. --- diff --git a/src/allmydata/immutable/offloaded.py b/src/allmydata/immutable/offloaded.py index fbd756be..84390b1d 100644 --- a/src/allmydata/immutable/offloaded.py +++ b/src/allmydata/immutable/offloaded.py @@ -317,17 +317,7 @@ class CHKCiphertextFetcher(AskUntilSuccessMixin): if os.path.exists(self._encoding_file): self.log("ciphertext already present, bypassing fetch", level=log.UNUSUAL) - # XXX the following comment is probably stale, since - # LocalCiphertextReader.get_plaintext_hashtree_leaves does not exist. - # - # we'll still need the plaintext hashes (when - # LocalCiphertextReader.get_plaintext_hashtree_leaves() is - # called), and currently the easiest way to get them is to ask - # the sender for the last byte of ciphertext. That will provoke - # them into reading and hashing (but not sending) everything - # else. - have = os.stat(self._encoding_file)[stat.ST_SIZE] - d = self.call("read_encrypted", have-1, 1) + d = defer.succeed(None) else: # first, find out how large the file is going to be d = self.call("get_size")