From: Daira Hopwood Date: Thu, 5 Sep 2013 16:34:03 +0000 (+0100) Subject: Sun Jan 8 22:12:40 GMT 2012 Brian Warner X-Git-Url: https://git.rkrishnan.org/(%5B%5E?a=commitdiff_plain;h=fa579c5c4645196c41aa64504bd6ed9c5d11a35f;p=tahoe-lafs%2Ftahoe-lafs.git Sun Jan 8 22:12:40 GMT 2012 Brian Warner * Retrieve.decode(): simplify setup of DeferredList-like argument make it more obviously match the expectations of _decode_blocks() and _maybe_decode_and_decrypt_segment() --- diff --git a/src/allmydata/mutable/retrieve.py b/src/allmydata/mutable/retrieve.py index cb9c37f8..0d062969 100644 --- a/src/allmydata/mutable/retrieve.py +++ b/src/allmydata/mutable/retrieve.py @@ -323,11 +323,10 @@ class Retrieve: self._block_hash_trees = None self._setup_encoding_parameters() - # This is the form expected by decode. - blocks_and_salts = blocks_and_salts.items() - blocks_and_salts = [(True, [d]) for d in blocks_and_salts] - - d = self._decode_blocks(blocks_and_salts, segnum) + # _decode_blocks() expects the output of a DeferredList that contains + # the outputs of _validate_block() (each of which is a dict mapping + # shnum to (block,salt) bytestrings). + d = self._decode_blocks([(True, blocks_and_salts)], segnum) d.addCallback(self._decrypt_segment) return d