Skip to content
Snippets Groups Projects
Commit 73cfaa348650 authored by Mads Kiilerich's avatar Mads Kiilerich
Browse files

discovery: indices between sample and yesno must match (issue4438)

3ef893520a85 changed 'sample' from a list to a set. The iteration order is thus
undefined and the yesno indices are not stable.

To solve this, repeat the listification and comment from elsewhere in the code.

Note: the randomness in the discovery protocol can make this problem hard to
reproduce.
parent 86c35b7ae300
No related branches found
No related tags found
No related merge requests found
......@@ -134,6 +134,8 @@
roundtrips += 1
ownheads = dag.heads()
sample = _limitsample(ownheads, initialsamplesize)
# indices between sample and externalized version must match
sample = list(sample)
if remote.local():
# stopgap until we have a proper localpeer that supports batch()
srvheadhashes = remote.heads()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment