lib/weakhash, lib/model, cmd/syncthing: Decide if to use weakhash on startup (fixes #3938)

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3949
This commit is contained in:
Audrius Butkevicius
2017-02-06 10:27:11 +00:00
parent 237893ead3
commit 67acef1794
12 changed files with 232 additions and 77 deletions

View File

@@ -65,6 +65,7 @@ func TestDefaultValues(t *testing.T) {
OverwriteRemoteDevNames: false,
TempIndexMinBlocks: 10,
UnackedNotificationIDs: []string{},
WeakHashSelectionMethod: WeakHashAuto,
}
cfg := New(device1)
@@ -203,6 +204,7 @@ func TestOverriddenValues(t *testing.T) {
UnackedNotificationIDs: []string{
"channelNotification", // added in 17->18 migration
},
WeakHashSelectionMethod: WeakHashNever,
}
os.Unsetenv("STNOUPGRADE")