]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commit
MutableFileNode.set_downloader_hints: never depend upon order of dict.values()
authorBrian Warner <warner@lothar.com>
Sun, 28 Aug 2011 07:41:03 +0000 (00:41 -0700)
committerBrian Warner <warner@lothar.com>
Sun, 28 Aug 2011 07:41:03 +0000 (00:41 -0700)
commit0f1d674d76490f71c02116bcfdc0620cd758c975
tree83bc05efc1caebcaa995258076c8495105aa6b6e
parent4b0078dc49d91f04055ae5519dd92be3a90669fc
MutableFileNode.set_downloader_hints: never depend upon order of dict.values()

The old code was calculating the "extension parameters" (a list) from the
downloader hints (a dictionary) with hints.values(), which is not stable, and
would result in corrupted filecaps (with the 'k' and 'segsize' hints
occasionally swapped). The new code always uses [k,segsize].
src/allmydata/mutable/filenode.py