From 4d3b5348ae38148f1bc2f1f104bc065b95ba2864 Mon Sep 17 00:00:00 2001 From: Iain Barnett Date: Fri, 20 Apr 2018 17:52:03 +0100 Subject: [PATCH] lib/protocol: Add note about non-standard Luhn calculation (#4895) Skip-check: authors --- lib/protocol/luhn.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/protocol/luhn.go b/lib/protocol/luhn.go index ee5155f0..0985dcef 100644 --- a/lib/protocol/luhn.go +++ b/lib/protocol/luhn.go @@ -17,6 +17,8 @@ var ( // generate returns a check digit for the string s, which should be composed // of characters from the Alphabet a. +// Doesn't follow the actual Luhn algorithm +// see https://forum.syncthing.net/t/v0-9-0-new-node-id-format/478/6 for more. func (a luhnAlphabet) generate(s string) (rune, error) { factor := 1 sum := 0