mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-21 10:01:54 +00:00
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].
This commit is contained in:
parent
4b0078dc49
commit
0f1d674d76
@ -701,7 +701,7 @@ class MutableFileNode:
|
||||
|
||||
def set_downloader_hints(self, hints):
|
||||
self._downloader_hints = hints
|
||||
extensions = hints.values()
|
||||
extensions = [ hints["k"], hints["segsize"] ]
|
||||
self._uri.set_extension_params(extensions)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user