Archived
Use backend service to verify nodeID (fixes #418)
This commit is contained in:
1 parent
4fe2992924
commit
3388d5b49c
4 files changed
+27
-10
No files matched your search
@@ -6,7 +6,6 @@ import (
|
||||
"encoding/base32"
|
||||
"errors"
|
||||
"fmt"
|
||||
"log"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
@@ -120,7 +119,6 @@ func unluhnify(s string) (string, error) {
|
||||
return "", err
|
||||
}
|
||||
if g := fmt.Sprintf("%s%c", p, l); g != s[i*14:(i+1)*14] {
|
||||
log.Printf("%q; %q", g, s[i*14:(i+1)*14])
|
||||
return "", errors.New("check digit incorrect")
|
||||
}
|
||||
res = append(res, p)
|
||||
|
||||
Reference in new issue
Block a user